r/openstack • u/calpazhan • Jul 28 '25
Is it possible to use aodh without gnocchi?
Hello all,
I'm trying to figure out to usage of aodh service. I don't want to use gnocchi cause I'm already sent metrics to prometheus with pushgateway.
I created these two rules for test but they didn't work.
openstack alarm create \
--type prometheus \
--name cpu_high_alarm \
--query 'rate(cpu{resource_id="288e9494-164d-46a8-9b93-bff2a3b29f08"}[5m]) / 1e9' \
--comparison-operator gt \
--threshold 0.001 \
--evaluation-periods 1 \
--alarm-action 'log://' \
--ok-action 'log://' \
--insufficient-data-action 'log://'
openstack alarm create \
--type prometheus \
--name memory_high_alarm \
--query 'memory_usage{resource_id="288e9494-164d-46a8-9b93-bff2a3b29f08"}' \
--comparison-operator gt \
--threshold 10 \
--evaluation-periods 1 \
--alarm-action 'log://' \
--ok-action 'log://' \
--insufficient-data-action 'log://'
Do you think I'm doing wrong?
If I figure out the aodh, I'm going to try to use heat autoscaling. Is ti possible to do that with this way without gnocchi?
Thank you for your help and comments in advance.
1
u/calpazhan Aug 05 '25
We are now using prometheus. But somehow it couldn't get the promethues ip address and port. We installed a custom image which has static environment variable to show promethues servers.
aodh_evaluator_image_fullwith this custom image.Now we are able to get alarm with promsql.
I'm working with heat now. If we success, I would share the results with you.
2
u/huxijinzhizi Jul 30 '25
Forget gnocchi, and aodh, just prometheus and alertmanager
1
u/pakeha_nisei Jul 31 '25
Yes, you should be able to use Prometheus with Heat auto-scaling. In the Heat template use
OS::Aodh::PrometheusAlarmto create the two alarms used for triggering the scaling actions, and usealarm_actionsto link the triggers to their respective scaling policies.1
u/khoinh5 Sep 19 '25
I have same this problem too, do we need enable gnocchi?
1
u/khoinh5 Sep 19 '25
Hello,
From https://opendev.org/openstack/python-observabilityclient/src/branch/master/observabilityclient/utils/metric_utils.py#L27
We need nano /etc/openstack/prometheus.yaml with
host: your-prometheus-host.example.com
port: your prometheus port
on where aodh_evaluator service is running.
and our rules will work.