aodh alarm create: error: gnocchi_resources_threshold requires

Bug #1754540 reported by xiaoxu790
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Aodh
New
Undecided
Unassigned

Bug Description

Version
openstack :pike
centos 7

# aodh alarm create --name cpu_hi --type gnocchi_resources_threshold \
--description 'instance running hot' --metric cpu_util --threshold 70.0 \
--comparison-operator gt --aggregation-method mean --granularity 600 \
--evaluation-periods 3 \
--alarm-action "http://172.17.51.30:8778/v1/webhooks/1f3d4cc8-40ff-48fc-9385-7ead5630977b/trigger?V=1&count=2" \
--query metadata.user_metadata.cluster_id=0ad6fc18-c571-438b-964b-70f47e06ed95

usage: aodh alarm create [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN]
                         [--max-width <integer>] [--fit-width] [--print-empty]
                         [--noindent] [--prefix PREFIX] --name <NAME> -t
                         <TYPE> [--project-id <PROJECT_ID>]
                         [--user-id <USER_ID>] [--description <DESCRIPTION>]
                         [--state <STATE>] [--severity <SEVERITY>]
                         [--enabled {True|False}]
                         [--alarm-action <Webhook URL>]
                         [--ok-action <Webhook URL>]
                         [--insufficient-data-action <Webhook URL>]
                         [--time-constraint <Time Constraint>]
                         [--repeat-actions {True|False}] [--query <QUERY>]
                         [--comparison-operator <OPERATOR>]
                         [--evaluation-periods <EVAL_PERIODS>]
                         [--threshold <THRESHOLD>] [--metric <METRIC>]
                         [--event-type <EVENT_TYPE>]
                         [--granularity <GRANULARITY>]
                         [--aggregation-method <AGGR_METHOD>]
                         [--resource-type <RESOURCE_TYPE>]
                         [--resource-id <RESOURCE_ID>] [--metrics <METRICS>]
                         [--composite-rule <COMPOSITE_RULE>]
aodh alarm create: error: gnocchi_resources_threshold requires --metric, --threshold, --resource-id, --resource-type and --aggregation-method

Why is there such a mistake?

xiaoxu790 (xiaoxu790)
description: updated
description: updated
Revision history for this message
Rajat Sharma (tajar29) wrote :

I think you are missing --resource-id and --resource-type in the command.

Revision history for this message
Chiawei Xie (dommgifer) wrote :

Same issue in senlin bug report:
https://bugs.launchpad.net/senlin/+bug/1801755

I have same problem.

How to create alarm for senlin cluster all instance , not using --resource-id to specify one instance.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.