Commit Graph

18 Commits

Author SHA1 Message Date
Dou Yuan a0c56384b5 jsonpath-rw-ext uses operator.add for "+" and operator.sub for "-". operator.add can do string concatenation, but operator.sub cannot do string subtraction. so the original hack does not work, perhaps we should use sub to get an empty string.
Change-Id: I9183a4a9f9cc345d8b4508bd7de1afa0eccd89d1
2023-05-22 20:49:02 +08:00
Matthias Runge 7df749884b Add volume.manage to metrics.
This allows to monitor cinder managed ceph volumes
to be monitored.
The second addition here allows the same for snapshots.

Change-Id: I7f045fa618e78351e05ad69bc9580e98487f0c29
2020-05-28 16:51:25 +02:00
Zuul 0fe64bc93d Merge "Handle volume.retype event from cinder" 2019-04-18 05:58:40 +00:00
Pavlo Shchelokovskyy 6df5f3f4b2 Handle volume.retype event from cinder
it is essentially similar to other volume.* events

Change-Id: If40d3039e55b9f5768d81b61596b0f49991666a9
2019-04-02 19:13:29 +03:00
Dmitriy Rabotjagov 643f7b5702 Fixes KeyError on volume create/delete
Seems, that cinder changed format of notifications in rocky,
as image_id in glance_metadata is not a list anymore.

Due to this bug agent-notification get stuck and info about
volume delete was not delivered to gnocchi.

Change-Id: Id5a2b3e1fb9aed3e620c8b0e9ffb9cf1a447fea8
Closes-Bug: 1801348
2018-11-26 19:43:57 +00:00
Mehdi Abaakouk be22389c47 cinder: link volume to image and instance
This change tracks the image_id and the instance_id of
volume.

Change-Id: I5e15080fad6cabece132d4609ed473494a64495e
2018-02-27 16:14:19 +01:00
Mehdi Abaakouk 36414e1ceb Add new attributes to instance
This change adds launched_at/started_at/deleted_at attribute to instance.

Rely on started_at/ended_at of Gnocchi to known when the operation have
done is not precise. Nova records the exact time of this event, just
copy them to Gnocchi.

Change-Id: If7870fd525d1ef58e4c2dbbbf93525bab3623b0f
2018-02-27 16:14:19 +01:00
Zuul 4f265a4744 Merge "ignore compute.instance.update for metrics" 2018-02-14 17:46:59 +00:00
Zuul 4f16f37fe7 Merge "support cinder capacity statistics" 2018-02-05 17:30:13 +00:00
gord chung 192620941c ignore compute.instance.update for metrics
nova sends *.update events in between create.start and create.end
events and it might not have a host name (which we need). in reality
to any changes to vcpus/memory/root_gb/ephemeral_gb metrics will
either send a *.resize notification and/or require a reboot which
sends it's own notification. because of that, just ignore
*.update notifications

Change-Id: I1f975c2d73adfc19126d70bdb1ab452e37b278fd
closes-bug: #1718290
2018-01-31 20:04:35 +00:00
zhaolihui c1fad9b20e remove repeated host
It maybe remove repeated host in memory meter.

Change-Id: I8972f5efab0c7a28af6b440883f394d35d897eef
2018-01-29 10:29:48 +08:00
gord chung 0317051379 support cinder capacity statistics
cinder sends a notification about its capacity:
https://review.openstack.org/#/c/206923

for provider pool, the name_to_id is an concatenation of host#pool_name.

Change-Id: Ica0b55658ae9ac9ec1ed4ef5ab8cda450a139c7d
Implements: cinder-capacity-notifications
2018-01-24 17:07:00 +00:00
gord chung 3a5fd619fa ignore compute.instance.create.start for metrics
do not build metrics off compute.instance.create.start as it
doesn't have enough information in it to push to Gnocchi. there is
an .end event that happens seconds later so .start event has little
value outside context of event.

we change fnmatch to regex for more useful regex comparison and it's
faster

not a complete fix as compute.instance.update also is missing host
value occasionally

Partial-Bug: #1718290
Change-Id: I2aa7045873fd740255a3be5f64b9e9f5fd94e2d4
2018-01-12 22:01:45 +00:00
Jenkins 69ea11652d Merge "Fix share.size meter" 2017-08-02 19:47:42 +00:00
Victoria Martinez de la Cruz 04d77e1d9e Fix share.size meter
Availability zone and name attributes were marked
as required while they are not, hence causing errors
when Gnocchi tried to create the resource.

This patch set removes the requirement over those attributes.
Availability zone has been removed, it will be shown only
when its present. Name has been replaced with share_id, which
is always present.

Other attributes has been added as well to keep track of other
relevant data.

Closes-Bug: #1706440

Change-Id: I191bcfae155278f7688c1148ad7e6994a0322fa6
2017-07-28 18:12:41 -03:00
gord chung 130a9ed343 stop converting to old message format
process notifications as is. this should not impact upgrades as
this does not change what is outputed by notification agent in
any way, just how it does initial processing.

note, this *will* change what is stored in Events if raw field is
enabled. that said, the raw field is unqueryable from Panko pov and
it actually is storing the raw message now.

Change-Id: If79f91687c6c1bc27d906045573674b002534ab1
2017-07-28 13:01:05 +00:00
Victoria Martinez de la Cruz d89b6c3b4c Add share create/delete/expand/shrink meters
Partially-Implements: blueprint manila-meters

Change-Id: Iaeb1e1ffc2b9c5f6e93f68f8b319066335781377
2017-06-16 12:18:54 -03:00
Hanxi Liu f05939d742 Support loading multiple meter definition files
Closes-Bug: #1479775
Change-Id: Iad15476cabd1f35f13322a0903f4ff0abf9a0160
2017-05-10 20:49:48 +08:00