Commit Graph

108 Commits

Author SHA1 Message Date
jayonlau 8c8a85a1d8 Clean up extra spaces
Although these errors are not important, they affect the code specification.

Change-Id: I906cf1ad1530de750c71cd622317d849347786ca
2021-09-26 22:52:47 -04:00
Yanos Angelopoulos 085f64578f Set 'libvirt_type' and 'libvirt_uri' options in the 'libvirt' plugin to be defined in conf.d/libvirt.yaml
The 'libvirt_type' and 'libvirt_uri' options are currently set by oslo configuration library.
However, in 'monasca_agent/collector/virt/libvirt/inspector.py' file these options cannot be
provided by a configuration file. Changing this to retrieve both options from
'conf.d/libvirt.yaml' file.

Change-Id: I1918fda471e951f42db0d302e371108b664e936c
2020-11-11 02:40:33 +02:00
Matthew Oliver 833e5946fe Add swift_handoffs check plugin to monasca
A powerful metric to watch for a swift cluster is the
number of handoff partitions on a drive on a storage node.

A build up of handoff nodes on a particular server could
indicate a disk problem somewhere in the cluster. A bottleneck
somewhere. Or better, when would be a good time to rebalance
the ring (as you'd want to do it when existing backend data
movement is at a minimum.

So it turns out to be a great visualisation of the health of
a cluster.

That's what this check plugin does. Each instance check takes
the following values:

  ring: <path to a Swift ring file>
  devices: <path to the directory of mountpoints>
  granularity: <either server or device>

To be able to determine primary vs handoff partitions on a drive
the swift ring needs to be consulted. If a storage node stores
more then 1 ring, and an instance would be defined for each.

You give swift a bunch of disks. These disks are placed in what
swift calls the 'devices' location. That is a directory where a
mount point for each mounted swift drive is located.

Finally, you can decide on the granularity, which defaults to
`server` if not defined. Only 2 metrics are created from this
check:

  swift.partitions.primary_count
  swift.partitions.handoff_count

But with the hostname dimension a ring dimension will also be set.
Allowing the graphing of the handoff vs partitions of each ring.
When the granularity is set to device, then an additional
dimension to the metric is added, the device name (the name of
the devices mount point). This allows the graphing and monitoring
of each device in a server if a finer granularity is required.

Because we need to consult the Swift ring there is a runtime
requirement on the Python Swift module being installed. But
this isn't required for the unit tests. Making it a runtime
dependency means when the check is loaded it'll log an error
and then exit if it can't import the swift module.

This is the second of two Swift check plugins I've been working on.
For more details see my blog post[1]

[1] - https://oliver.net.au/?p=358

Change-Id: Ie91add9af39f2ab0e5b575390c0c6355563c0bfc
2019-10-18 17:16:14 +02:00
Matthew Oliver 0d929d01a8 Add swift_recon check plugin to monasca
Swift outputs alot of statsd metrics that you can point directly
at monasca-agents. However there is another swift endpoint,
recon, that is used to gather more metrics.

The Swift recon (or reconnaissance) API is an endpoint each of the
storage node servers make available via a REST API. This API can
either be hit manually or via the swift-recon tool.

This patch adds a check plugin that hits the recon REST API and
and send metrics to monasca.

This is the first of two Swift check plugins I'm working on.
For more details see my blog post[1]

[1] - https://oliver.net.au/?p=358

Change-Id: I503d74936f6f37fb261c1592845968319695475a
2019-10-09 19:06:08 +02:00
Lukasz Zajaczkowski f23ceda96b Enable the system metrics in Docker environment
Story: 2003093
Task: 23185
Change-Id: I9700a6fcb650fbcf983f2a4f145b430876f12429
2018-08-22 10:12:38 +02:00
Lukasz Zajaczkowski 029127aa42 Enable the process plugin in Docker environment
Change-Id: I860a960f900fcb89ce4c7ddb096f9c37cba9c4c9
Story: 2002783
Task: 22667
2018-07-09 10:57:33 +02:00
Dobroslaw Zybort e13de8083e Allow Keystone config in init_config for http check
Now the user will be able to configure one, default Keystone for all
services in `http_check.yml` instead of providing them one by one for
every instance.

Setting Keystone config in every instance is marked as depreciated.

Story: 2001843
Task: 12610

Change-Id: If52b52efab6cc14a7df583b1dc2596b04e6813bc
2018-04-23 11:11:02 +02:00
Eduardo 1133a0a04f Add LXC swap metric collector and fix lxc bug
LXC plugin throw up a exception when try collect cpu metrics. This
patch fix it (tests are passing) and add swap collector.

Change-Id: I3b12ac6ce199006bc1e024d2b2626657519e4f0b
Story: 2001563
Task: 6507
2018-03-07 16:54:46 -03:00
mhoppal cc6f1b9ec2 Add container memory percentage metric when running in k8s
Change-Id: I42767eaaf29d872c444a36017eb1972f108176b5
2017-12-13 09:46:19 -07:00
Zuul 0cd493be24 Merge "Introduce agent plugin for LXC" 2017-12-06 06:22:26 +00:00
Zuul 78e8c3ac6d Merge "Fix RabbitMQ whitelist documentation error" 2017-12-06 05:58:07 +00:00
Doug Szumski 14a3e89421 Fix RabbitMQ whitelist documentation error
In monasca_agent/collector/checks_d/rabbitmq.py QUEUE_TYPE is defined
as 'queues'. In conf.d/rabbitmq.yaml.example the whitelist stores the
permitted queues in the list 'queue'. This should be 'queues'. If the
documentation is followed the user specified white list is ignored.
The same looks to be the case for exchanges and nodes.

Story: 2001290
Change-Id: I3e70a888f5c0db27951e619da8bc17ae9eaf9da9
2017-11-14 15:44:27 +00:00
Dirk Mueller 5f0a3d974b readd nsfs to the list of ignored filesystems
nsfs was accidentally removed in the last change here but
is not automatically blacklisted because it is not listed
as nodev in /proc/filesystems. Add it back to avoid
that neutron network namespaces get collected as local disks
in monasca

Change-Id: I6c6df857aa3cae38563d920a58aa5b464b9d6bac
2017-11-04 12:11:06 +01:00
Luís Eduardo 1f3af5ad70 Introduce agent plugin for LXC
An agent that provides LXC cgroup data. This agent does not require sudo.

Story: 2001242
Task: 5772
Change-Id: Ia20889f91d1c1bfad98745c2ddd61b40f610a838
2017-10-15 21:28:33 -03:00
Koji Nakazono d8f0857f62 Fix the example http_check.yaml for Keystone
Need "project_name" under "keystone_config" if user wants to use
another Keystone. Add "project_name" to the http_check.yaml example.

Change-Id: I642fdf8cc2789d2c2ba8bcb10adbd8b30b9bc91a
2017-10-06 11:33:09 +09:00
Haruki Yamanashi 2e5c6475e7 Change template/example of Libvirt config file
Some of parameters which can be configured for Libvirt monitoring are
missing from the template file and example of documentation.
This commit adds the parameter examples.

Change-Id: I98e9a928179d22373c658894a82d64df9dc7d043
Story: 2001137
Task: 4853
2017-08-18 09:04:06 +09:00
ryan-brandt a24c8edcfb Add a smaller vcenter plugin for status
This plugin will add a vm.status for vcenter, this is kept
separate from the original plugin to allow different timing
between the two types of data or to consume fewer resources
for smaller environments.

Change-Id: I014a2ceafd3a819abe37ef581bc8d6a17a6c1606
2017-07-31 09:46:09 -06:00
Jenkins 5e07c43e5e Merge "Add prometheus client plugin" 2017-06-29 18:30:04 +00:00
Jenkins 3262ab9234 Merge "Add Dimensions into White List" 2017-06-26 20:36:37 +00:00
Flávio Ramalho 612492c774 Ceph cluster plugin
This change adds a ceph plugin to collect metrics regarding
ceph clusters. Includes documentation, detection and tests.

Change-Id: Ia4b61e751f0f8087fc9ab3adff889734b8afc2d6
2017-06-19 10:11:13 -03:00
Flávio Ramalho d2c6bedf36 Fix load plugin dimension
This change removes a line that set the dimension to be None. In
that way, the dimensions of the measurement can be set through the
plugin configuration file.

Change-Id: I038ee56f58426a79c27f65427de6d58ca4d0952e
2017-05-24 09:03:02 -03:00
Michael James Hoppal dc634a73b8 Add prometheus client plugin
The plugin can be configured two ways:

Scrape metrics from a configured set of endpoints that were set up
via prometheus client libraries.

Attempt to autodetect running endpoints we should be monitoring in
a kubernetes environment by either looking at running services or
pods and evaluate their annotations to see if it is set for scraping.

Change-Id: I6d174daa705aff23fbfece9de759a1718a91050f
2017-05-23 13:02:50 -06:00
Jenkins 50ca49b7a0 Merge "Fix libvirt plugin when using keystone v3" 2017-05-16 08:50:14 +00:00
liyingjun 37df865559 Fix libvirt plugin when using keystone v3
Change the auth related options corresponding to keystone v3:
admin_password -> password
admin_tenant_name -> project_name
admin_user -> username
identity_uri -> auth_url

Change-Id: Id1dd6424cfa2f040864f4336a1b996e02f470b3a
2017-05-15 22:52:45 +08:00
Kaiyan Sheng 8187a0c73f Add Dimensions into White List
Before submitting metrics, we want to check with the white list to
see what are the metrics we want to report and what are the dimension
we want in these metrics. If the key under "metrics" section is not
in the default dimension, the corresponding value specified in white
list will be used to update the dimension. If there is no key value
pairs under "metrics" section, then check and use the key value pairs
under "dimensions" section.

Change-Id: Ic81cc4c393112eb50f700655cefa839e454354db
2017-05-04 15:40:24 -06:00
Jenkins 11e0441334 Merge "Ignore more non-device related filesystems" 2017-04-25 18:00:37 +00:00
Michael James Hoppal 7ffae8e9fc Add Kubernetes API Plugin
Plugin that connects to the Kubernetes API to gather metrics
about the Kubernetes environment.

Taken from original review https://review.openstack.org/#/c/391559/

Change-Id: Ifff9285e9a2ac06d59383b986619ee62c59c712e
2017-04-24 14:23:35 -06:00
Dirk Mueller 2988905a9f Ignore more non-device related filesystems
The blacklist wasn't really accurate on any recent system anymore
because many more additional filesystems are being implemented these
days (examples: mqueue, binfmt_misc, systemd-1, ...). Instead of
hardcoding all of them, simply ignore all nodev filesystems.

Change-Id: I1fc42ae700475d51e1daf1ed79c6e223532da1d9
2017-04-22 22:47:31 +02:00
Kaiyan Sheng 814b69d49d Add white list for reporting metrics
Use white list in init_config to control what are the metrics
to report. If there is no white_list section in the init_config,
then report all the metrics.

Change-Id: Ia5d9bed47748af83bbc27575f992449584364479
2017-04-12 21:51:39 -06:00
Michael James Hoppal 3510491d3d Add Kubernetes plugin
Monitors containers and pods by querying kubelet for metadata and
cadvisor for metrics

Taken from original review https://review.openstack.org/#/c/391559/

Change-Id: I77fa1ec4056e79ecdb49627d9a8abdc71a9732d2
2017-03-17 11:20:02 -06:00
Kaiyan Sheng 059d7eedd5 Add cAdvisor host plugin
Queries a given cAdvisor instance for host metrics. This is useful
when the agent in running in a container and does not have access
to all host level metrics

Taken from original review https://review.openstack.org/#/c/391559/

Change-Id: Ifc3d514e5256bdbc6089ec653065348a488f7c57
2017-03-14 16:05:12 -06:00
Kevin Kirkpatrick dae6e46c4c Implements A10 Load Balancer plugin configurations
Change-Id: Ic8a66d15f96da7262a3ceb0d2c74031fbb291cb9
2017-02-09 10:13:20 -07:00
Donagh McCabe a72f907eef Add json_plugin: simple way to post metrics to Monasca
This patch adds a plugin that reads metrics from JSON files. This
makes it very easy to integrate with Monasca -- instead of writing
a new plugin, simply write your metrics to a file.

The advantage of this mechanism is that:
- It's simple and easy to understand
- It is asynchronous with Monasca Agent. There are two technical
  advantages to this:
    - Your check does not need to run at same frequency as
      the agent.
    - If your check blocks, this does not affect other checks
      in the agent because the agent is not blocked.
- You can create the metrics as a side effect of doing other
  stuff. For example, a server process can write the JSON
  file while it is processing requests. With the normal plugin
  architecture, you need to write code that talks to your
  server process to access the metrics.
- You can write the check code in any language.

Change-Id: I1e998fa677e16cc04d46edd46d0e6433131825e7
2016-12-09 14:04:02 +00:00
Jenkins 97778d6b05 Merge "Improve docker plugin" 2016-11-10 21:09:35 +00:00
Michael James Hoppal e7ca18385f Improve docker plugin
Rewrote the plugin to look at the cgroups and docker api to
generate metrics for docker containers

Added using the docker python library to connect to
docker

Added the ability to set kubernetes specific dimensions if
running in a kubernetes cluster

Change-Id: I322e1d983c3ec554732fbfe0e14ccb9e6b3b29f5
Co-Authored-By: Tim Buckley <timothy.jas.buckley@hpe.com>
2016-11-08 14:20:02 -07:00
Brad Klein 71a0d5dd26 Expand libvirt and ovs plugins to publish entity names
This is useful in dashboards where we display libvirt and ovs
metrics for a physical host, it will elimnate the step of translating
vm and tenant ids if needing to investigate project usage.

The libvirt plugin metadata config array will now support
'vm_name' and 'tenant_name', and the ovs plugin will now
support the metadata config value for 'tenant_name'.

Change-Id: If76418b83119a12b8534fb7f7cb224339f357be8
2016-11-01 08:42:08 -06:00
Anant Patil ebab1484b4 Include scale_group metadata for customer metrics
To enable customer VMs to use auto-scaling feature of Heat, the customer
metrics must include the scale_group. This change enables the monasca
agent to include scale group dimension with customer metrics.

Change-Id: I058557e6987888ff38d1bc7d21a26aa738b242a6
2016-09-21 14:54:23 +00:00
Tomasz Trębski 1a25c633b8 Invalid kafka_consumer documentation
kafka_consumer is able to figure
out partitions on its own, there is
no need to specify them here.

Change-Id: I9f97d95bf49b7b89a4eccfa119e07cb30e4f37b1
2016-09-01 10:39:56 +02:00
Jenkins a717fb0b86 Merge "Made collection times configurable" 2016-08-11 14:53:11 +00:00
Andrea Adams fb4ee3a588 Made collection times configurable
The collector now checks the yaml configuration file for a variable
called collect_period.
If collect_period is specified, the collector will skip calling the
plugin and collecting metrics for the plugin until the specified
number of seconds has passed.

Change-Id: I423b1f14d4b0580e625e5f57c729c4a6c9923a93
2016-08-10 16:09:41 -06:00
Jenkins ab5b6bb7b9 Merge "Kibana metrics" 2016-08-04 09:22:39 +00:00
Chris Morrell fc214a8596 Add SolidFire Monasca Check Plugin:
This adds a very basic plugin that monitors SolidFire storage clusters. The
plugin provides cluster fault and usage metrics. This uses a stripped down
version of the Cinder volume driver to provide connectivity to the cluster.

Change-Id: Ibd0d577b6bf45747a0daaec2c5c3479741ae0937
2016-08-02 14:55:05 +00:00
Tomasz Trębski 704ab58a4e Kibana metrics
- auto detecting kibana process
- building configuration
- collecting metrics

Change-Id: I4c457b8396d8131fa18c76305a8f069626c51256
2016-08-01 08:08:44 +02:00
Selvakumar S 372049951a Added new flags to avoid collecting unnecessary metrics
Added two new flags in ovs.yaml to avoid posting huge metrics
in scale environment.
i) use_rate_metrics- This flag decides whether rate metrics is
required or not for publishing metrics
ii) use_health_metrics - This flag decides whether health related
metrics like errors,
dropped and collisions are required for metric collection

Co-Authored-By: Gandharva <gandharvas@hpe.com>
Change-Id: I78188c4f5b68718b01a0e19eaf612dd02b8e85fe
2016-06-24 06:19:05 -07:00
Jenkins 78eef33bdd Merge "Add detection plugin for enabling ovs plugin" 2016-06-14 20:25:30 +00:00
Gandharva 253d48cbe4 Add detection plugin for enabling ovs plugin
This plugin detects the ovs exsistance and writes the configurations to
ovs.yaml in conf.d directory. The configurations will be fetched from the
neutron configuration file.

Change-Id: I0b469276231764f6c854a6b0149cd3a4269ac4a2
2016-06-16 05:02:47 +05:30
Michael James Hoppal 8b4ed96fa7 Rework Vertica plugin
Adding the metrics to monitor resource pools, resources
and projections per a node.

Metrics for Vertica are now:

vertica.connection_status
vertica.node_status
vertica.projection.ros_count
vertica.projection.tuple_mover_mergeouts
vertica.projection.tuple_mover_moveouts
vertica.projection.wos_used_bytes
vertica.resource.disk_space_rejections
vertica.resource.pool.memory_inuse_kb
vertica.resource.pool.memory_size_actual_kb
vertica.resource.pool.rejection_count
vertica.resource.pool.running_query_count
vertica.resource.request_queue_depth
vertica.resource.resource_rejections
vertica.resource.wos_used_bytes

Change-Id: I6e30d524ca77f900f231b9a626bfa853e31dbeb1
2016-06-06 14:46:27 -06:00
Michael James Hoppal 076cca54ba Add nsfs to the ignore file system list for the disk check
We see undeterminded alarms with this filesystem as it is temporary

Change-Id: I8d1562a90f6c6d476baaa088fe479e202c59e871
2016-04-04 12:25:04 -06:00
Deklan Dieterly a52841531a Ignore freezer backups
Ignore freezer backups in metrics.

Fixes problem with disk usage alarms flapping
 for /var/freezer directory which may or may not
 exist.

Change-Id: I562bdd71f43e9ca14735954727e4e8837d3b8e92
2016-03-24 10:48:21 -06:00
Rakesh H S 2ec8f70579 Monasca-setup to configure for instance scale_group metadata
Fix to enable instance scale_group metadata dimension in libvirt
plugin to support monasca based autoscaling.

Change-Id: Ia7c51091c6a07105f6d9e295957ad7bf724e004e
2016-03-01 17:33:26 +00:00