How to change gnocchi archive-policy for a metric
Hi, greetings (telemetry) experts, (battling with this change to aodh/gnocchi!)
Am running RDO Packstack (Pike) all-in-1 on CentOS7 and have aodh and gnocchi enabled.
Am trying to create an aodh alarm for excessive CPU use, but alarm is showing 'insufficient data'
aodh alarm create --type gnocchi_resources_threshold --name cpu_hi --description 'cpu running hot' --metric cpu_util --threshold 70 --comparison-operator gt --aggregation-method mean --granularity 120 --evaluation-periods 1 --resource-type instance --alarm-action 'log://' --resource-id $ServerUUID
gnocchi measurements seem to be accumulating as can query my resource (serverUUID) for cpu_util
$ gnocchi measures show cpu_util --resource-id ef71a9c5-1f13-409f-9515-3a955b1637ca
+---------------------------+-------------+---------------+
| timestamp | granularity | value |
+---------------------------+-------------+---------------+
| 2018-02-14T15:40:00+01:00 | 300.0 | 6.0545565637 |
| 2018-02-14T15:45:00+01:00 | 300.0 | 54.0420935459 |
| 2018-02-14T15:50:00+01:00 | 300.0 | 57.8902041207 |
| 2018-02-14T15:55:00+01:00 | 300.0 | 6.2597518298 |
| 2018-02-14T16:00:00+01:00 | 300.0 | 5.8051771301 |
| 2018-02-14T16:05:00+01:00 | 300.0 | 72.7606542992 |
| 2018-02-14T16:10:00+01:00 | 300.0 | 96.3522174786 |
| 2018-02-14T16:15:00+01:00 | 300.0 | 96.4160094293 |
| 2018-02-14T16:20:00+01:00 | 300.0 | 96.5402082843 |
| 2018-02-14T16:25:00+01:00 | 300.0 | 96.4775903627 |
| 2018-02-14T16:30:00+01:00 | 300.0 | 96.4278695426 |
| 2018-02-14T16:35:00+01:00 | 300.0 | 96.6071384618 ...............
these measurements correspond to a default archive-policy of LOW (5min intervals). (yes, am stressing CPU to try and trigger aodh alarm (for a quick demo) , its fairly obvious my alarm granularity is too low at 120 secs - so, wrong archive_policy ?
Is there any way to change the archive_policy for this one particular metric to Medium for example (or do I have to change to Medium policy for ALL metrics)? If I run gnocchi metric list I see all 1004 metrics currently use LOW. In case I can't change a single metric's policy, How does one change the general archive policy ? (note: running all-in-1 in a 30GB VM so haven't got loads of storage)
thanks