I've tried to use this command:
aodh alarm create --type gnocchi_aggregation_by_resources_threshold --name cpu-high --metric cpu_util --threshold 70 --comparison-operator gt --description 'instance running hot' --evaluation-periods 1 --aggregation-method mean --alarm-action $ALRM_URL01 --granularity 60 --repeat-actions False --query '{"=": {"metadata.user_metadata.cluster_id": "$MYCLUSTER_ID""}}' --resource-type instance
But got error message: Resource type instance has no metadata.user_metadata.cluster_id attribute (HTTP 400)
So, aodh created alarm type with gnocchi_aggregation_by_resources_threshold or gnocchi_resources_threshold was not work.
I've tried to use this command:
aodh alarm create aggregation_ by_resources_ threshold operator gt periods 1 method mean user_metadata. cluster_ id": "$MYCLUSTER_ID""}}'
--type gnocchi_
--name cpu-high
--metric cpu_util
--threshold 70
--comparison-
--description 'instance running hot'
--evaluation-
--aggregation-
--alarm-action $ALRM_URL01
--granularity 60
--repeat-actions False
--query '{"=": {"metadata.
--resource-type instance
But got error message: user_metadata. cluster_ id attribute (HTTP 400)
Resource type instance has no metadata.
So, aodh created alarm type with gnocchi_ aggregation_ by_resources_ threshold or gnocchi_ resources_ threshold
was not work.