.. ## WARNING ###################################### .. This file is automatically generated, do not edit .. ################################################# ============================== Monitoring command-line client ============================== The monasca client is the command-line interface (CLI) for the Monitoring API and its extensions. This chapter documents :command:`monasca` version ``1.0.27``. For help on a specific :command:`monasca` command, enter: .. code-block:: console $ monasca help COMMAND .. _monasca_command_usage: monasca usage ~~~~~~~~~~~~~ .. code-block:: console usage: monasca [-j] [--version] [-d] [-v] [-k] [--cert-file CERT_FILE] [--key-file KEY_FILE] [--os-cacert OS_CACERT] [--keystone_timeout KEYSTONE_TIMEOUT] [--os-username OS_USERNAME] [--os-password OS_PASSWORD] [--os-user-domain-id OS_USER_DOMAIN_ID] [--os-user-domain-name OS_USER_DOMAIN_NAME] [--os-project-id OS_PROJECT_ID] [--os-project-name OS_PROJECT_NAME] [--os-domain-id OS_DOMAIN_ID] [--os-domain-name OS_DOMAIN_NAME] [--os-auth-url OS_AUTH_URL] [--os-region-name OS_REGION_NAME] [--os-auth-token OS_AUTH_TOKEN] [--os-no-client-auth] [--monasca-api-url MONASCA_API_URL] [--monasca-api-version MONASCA_API_VERSION] [--os-service-type OS_SERVICE_TYPE] [--os-endpoint-type OS_ENDPOINT_TYPE] ... alarm-definition-create Create an alarm definition. alarm-definition-delete Delete the alarm definition. alarm-definition-list List alarm definitions for this tenant. alarm-definition-patch Patch the alarm definition. alarm-definition-show Describe the alarm definition. alarm-definition-update Update the alarm definition. alarm-delete Delete the alarm. alarm-history Alarm state transition history. alarm-history-list List alarms state history. alarm-list List alarms for this tenant. alarm-patch Patch the alarm state. alarm-show Describe the alarm. alarm-update Update the alarm state. measurement-list List measurements for the specified metric. metric-create Create metric. metric-create-raw Create metric from raw json body. metric-list List metrics for this tenant. metric-statistics List measurement statistics for the specified metric. notification-create Create notification. notification-delete Delete notification. notification-list List notifications for this tenant. notification-show Describe the notification. notification-update Update notification. bash-completion Prints all of the commands and options to stdout. help Display help about this program or one of its subcommands. .. _monasca_command_options: monasca optional arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~ ``-j, --json`` output raw json response ``--version`` Shows the client version and exits. ``-d, --debug`` Defaults to ``env[MONASCA_DEBUG]``. ``-v, --verbose`` Print more verbose output. ``-k, --insecure`` Explicitly allow the client to perform "insecure" SSL (https) requests. The server's certificate will not be verified against any certificate authorities. This option should be used with caution. ``--cert-file CERT_FILE`` Path of certificate file to use in SSL connection. This file can optionally be prepended with the private key. ``--key-file KEY_FILE`` Path of client key to use in SSL connection. This option is not necessary if your key is prepended to your cert file. ``--os-cacert OS_CACERT`` Specify a CA bundle file to use in verifying a TLS (https) server certificate. Defaults to ``env[OS_CACERT]``. Without either of these, the client looks for the default system CA certificates. ``--keystone_timeout KEYSTONE_TIMEOUT`` Number of seconds to wait for a response from keystone. ``--os-username OS_USERNAME`` Defaults to ``env[OS_USERNAME]``. ``--os-password OS_PASSWORD`` Defaults to ``env[OS_PASSWORD]``. ``--os-user-domain-id OS_USER_DOMAIN_ID`` Defaults to ``env[OS_USER_DOMAIN_ID]``. ``--os-user-domain-name OS_USER_DOMAIN_NAME`` Defaults to ``env[OS_USER_DOMAIN_NAME]``. ``--os-project-id OS_PROJECT_ID`` Defaults to ``env[OS_PROJECT_ID]``. ``--os-project-name OS_PROJECT_NAME`` Defaults to ``env[OS_PROJECT_NAME]``. ``--os-domain-id OS_DOMAIN_ID`` Defaults to ``env[OS_DOMAIN_ID]``. ``--os-domain-name OS_DOMAIN_NAME`` Defaults to ``env[OS_DOMAIN_NAME]``. ``--os-auth-url OS_AUTH_URL`` Defaults to ``env[OS_AUTH_URL]``. ``--os-region-name OS_REGION_NAME`` Defaults to ``env[OS_REGION_NAME]``. ``--os-auth-token OS_AUTH_TOKEN`` Defaults to ``env[OS_AUTH_TOKEN]``. ``--os-no-client-auth`` Do not contact keystone for a token. Defaults to ``env[OS_NO_CLIENT_AUTH]``. ``--monasca-api-url MONASCA_API_URL`` Defaults to ``env[MONASCA_API_URL]``. ``--monasca-api-version MONASCA_API_VERSION`` Defaults to ``env[MONASCA_API_VERSION]`` or 2_0 ``--os-service-type OS_SERVICE_TYPE`` Defaults to ``env[OS_SERVICE_TYPE]``. ``--os-endpoint-type OS_ENDPOINT_TYPE`` Defaults to ``env[OS_ENDPOINT_TYPE]``. .. _monasca_alarm-definition-create: monasca alarm-definition-create ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-definition-create [--description ] [--severity ] [--match-by ] [--alarm-actions ] [--ok-actions ] [--undetermined-actions ] Create an alarm definition. Positional arguments -------------------- ```` Name of the alarm definition to create. ```` The alarm expression to evaluate. Quoted. Optional arguments ------------------ ``--description `` Description of the alarm. ``--severity `` Severity is one of [LOW, MEDIUM, HIGH, CRITICAL]. ``--match-by `` The metric dimensions to match to the alarm dimensions. One or more dimension key names separated by a comma. Key names need quoting when they contain special chars [&,(,),{,},>,<] that confuse the CLI parser. ``--alarm-actions `` The notification method to use when an alarm state is ALARM. This param may be specified multiple times. ``--ok-actions `` The notification method to use when an alarm state is OK. This param may be specified multiple times. ``--undetermined-actions `` The notification method to use when an alarm state is UNDETERMINED. This param may be specified multiple times. .. _monasca_alarm-definition-delete: monasca alarm-definition-delete ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-definition-delete Delete the alarm definition. Positional arguments -------------------- ```` The ID of the alarm definition. .. _monasca_alarm-definition-list: monasca alarm-definition-list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-definition-list [--name ] [--dimensions ] [--offset ] [--limit ] List alarm definitions for this tenant. Optional arguments ------------------ ``--name `` Name of the alarm definition. ``--dimensions `` key value pair used to specify a metric dimension. This can be specified multiple times, or once with parameters separated by a comma. Dimensions need quoting when they contain special chars [&,(,),{,},>,<] that confuse the CLI parser. ``--offset `` The offset used to paginate the return data. ``--limit `` The amount of data to be returned up to the API maximum limit. .. _monasca_alarm-definition-patch: monasca alarm-definition-patch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-definition-patch [--name ] [--description ] [--expression ] [--alarm-actions ] [--ok-actions ] [--undetermined-actions ] [--actions-enabled ] [--severity ] Patch the alarm definition. Positional arguments -------------------- ```` The ID of the alarm definition. Optional arguments ------------------ ``--name `` Name of the alarm definition. ``--description `` Description of the alarm. ``--expression `` The alarm expression to evaluate. Quoted. ``--alarm-actions `` The notification method to use when an alarm state is ALARM. This param may be specified multiple times. ``--ok-actions `` The notification method to use when an alarm state is OK. This param may be specified multiple times. ``--undetermined-actions `` The notification method to use when an alarm state is UNDETERMINED. This param may be specified multiple times. ``--actions-enabled `` The actions-enabled boolean is one of [true,false] ``--severity `` Severity is one of [LOW, MEDIUM, HIGH, CRITICAL]. .. _monasca_alarm-definition-show: monasca alarm-definition-show ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-definition-show Describe the alarm definition. Positional arguments -------------------- ```` The ID of the alarm definition. .. _monasca_alarm-definition-update: monasca alarm-definition-update ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-definition-update [--description ] [--alarm-actions ] [--ok-actions ] [--undetermined-actions ] [--match-by ] [--severity ] Update the alarm definition. Positional arguments -------------------- ```` The ID of the alarm definition. ```` Name of the alarm definition. ```` The alarm expression to evaluate. Quoted. ```` The actions-enabled boolean is one of [true,false] Optional arguments ------------------ ``--description `` Description of the alarm. ``--alarm-actions `` The notification method to use when an alarm state is ALARM. This param may be specified multiple times. ``--ok-actions `` The notification method to use when an alarm state is OK. This param may be specified multiple times. ``--undetermined-actions `` The notification method to use when an alarm state is UNDETERMINED. This param may be specified multiple times. ``--match-by `` The metric dimensions to match to the alarm dimensions. One or more dimension key names separated by a comma. Key names need quoting when they contain special chars [&,(,),{,},>,<] that confuse the CLI parser. ``--severity `` Severity is one of [LOW, MEDIUM, HIGH, CRITICAL]. .. _monasca_alarm-delete: monasca alarm-delete ~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-delete Delete the alarm. Positional arguments -------------------- ```` The ID of the alarm. .. _monasca_alarm-history: monasca alarm-history ~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-history [--offset ] [--limit ] Alarm state transition history. Positional arguments -------------------- ```` The ID of the alarm. Optional arguments ------------------ ``--offset `` The offset used to paginate the return data. ``--limit `` The amount of data to be returned up to the API maximum limit. .. _monasca_alarm-history-list: monasca alarm-history-list ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-history-list [--dimensions ] [--starttime ] [--endtime ] [--offset ] [--limit ] List alarms state history. Optional arguments ------------------ ``--dimensions `` key value pair used to specify a metric dimension. This can be specified multiple times, or once with parameters separated by a comma. Dimensions need quoting when they contain special chars [&,(,),{,},>,<] that confuse the CLI parser. ``--starttime `` measurements >= UTC time. format: 2014-01-01T00:00:00Z. OR format: -120 (for previous 2 hours) ``--endtime `` measurements <= UTC time. format: 2014-01-01T00:00:00Z. ``--offset `` The offset used to paginate the return data. ``--limit `` The amount of data to be returned up to the API maximum limit. .. _monasca_alarm-list: monasca alarm-list ~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-list [--alarm-definition-id ] [--metric-name ] [--metric-dimensions ] [--state ] [--state-updated-start-time ] [--lifecycle-state ] [--link ] [--offset ] [--limit ] List alarms for this tenant. Optional arguments ------------------ ``--alarm-definition-id `` The ID of the alarm definition. ``--metric-name `` Name of the metric. ``--metric-dimensions `` key value pair used to specify a metric dimension. This can be specified multiple times, or once with parameters separated by a comma. Dimensions need quoting when they contain special chars [&,(,),{,},>,<] that confuse the CLI parser. ``--state `` ALARM_STATE is one of [UNDETERMINED, OK, ALARM]. ``--state-updated-start-time `` Return all alarms whose state was updated on or after the time specified ``--lifecycle-state `` The lifecycle state of the alarm ``--link `` The link to external data associated with the alarm ``--offset `` The offset used to paginate the return data. ``--limit `` The amount of data to be returned up to the API maximum limit. .. _monasca_alarm-patch: monasca alarm-patch ~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-patch [--state ] [--lifecycle-state ] [--link ] Patch the alarm state. Positional arguments -------------------- ```` The ID of the alarm. Optional arguments ------------------ ``--state `` ALARM_STATE is one of [UNDETERMINED, OK, ALARM]. ``--lifecycle-state `` The lifecycle state of the alarm ``--link `` A link to an external resource with information about the alarm .. _monasca_alarm-show: monasca alarm-show ~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-show Describe the alarm. Positional arguments -------------------- ```` The ID of the alarm. .. _monasca_alarm-update: monasca alarm-update ~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca alarm-update Update the alarm state. Positional arguments -------------------- ```` The ID of the alarm. ```` ALARM_STATE is one of [UNDETERMINED, OK, ALARM]. ```` The lifecycle state of the alarm ```` A link to an external resource with information about the alarm .. _monasca_measurement-list: monasca measurement-list ~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca measurement-list [--dimensions ] [--endtime ] [--offset ] [--limit ] [--merge_metrics] List measurements for the specified metric. Positional arguments -------------------- ```` Name of the metric to list measurements. ```` measurements >= UTC time. format: 2014-01-01T00:00:00Z. OR Format: -120 (previous 120 minutes Optional arguments ------------------ ``--dimensions `` key value pair used to specify a metric dimension. This can be specified multiple times, or once with parameters separated by a comma. Dimensions need quoting when they contain special chars [&,(,),{,},>,<] that confuse the CLI parser. ``--endtime `` measurements <= UTC time. format: 2014-01-01T00:00:00Z. ``--offset `` The offset used to paginate the return data. ``--limit `` The amount of data to be returned up to the API maximum limit. ``--merge_metrics`` Merge multiple metrics into a single result. .. _monasca_metric-create: monasca metric-create ~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca metric-create [--dimensions ] [--value-meta ] [--time ] [--project-id ] Create metric. Positional arguments -------------------- ```` Name of the metric to create. ```` Metric value. Optional arguments ------------------ ``--dimensions `` key value pair used to create a metric dimension. This can be specified multiple times, or once with parameters separated by a comma. Dimensions need quoting when they contain special chars [&,(,),{,},>,<] that confuse the CLI parser. ``--value-meta `` key value pair for extra information about a value. This can be specified multiple times, or once with parameters separated by a comma. value_meta need quoting when they contain special chars [&,(,),{,},>,<] that confuse the CLI parser. ``--time `` Metric timestamp in milliseconds. Default: current timestamp. ``--project-id `` The Project ID to create metric on behalf of. Requires monitoring-delegate role in keystone. .. _monasca_metric-create-raw: monasca metric-create-raw ~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca metric-create-raw Create metric from raw json body. Positional arguments -------------------- ```` The raw JSON body in single quotes. See api doc. .. _monasca_metric-list: monasca metric-list ~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca metric-list [--name ] [--dimensions ] [--starttime ] [--endtime ] [--offset ] [--limit ] List metrics for this tenant. Optional arguments ------------------ ``--name `` Name of the metric to list. ``--dimensions `` key value pair used to specify a metric dimension. This can be specified multiple times, or once with parameters separated by a comma. Dimensions need quoting when they contain special chars [&,(,),{,},>,<] that confuse the CLI parser. ``--starttime `` measurements >= UTC time. format: 2014-01-01T00:00:00Z. OR Format: -120 (previous 120 minutes ``--endtime `` measurements <= UTC time. format: 2014-01-01T00:00:00Z. ``--offset `` The offset used to paginate the return data. ``--limit `` The amount of data to be returned up to the API maximum limit. .. _monasca_metric-statistics: monasca metric-statistics ~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca metric-statistics [--dimensions ] [--endtime ] [--period ] [--offset ] [--limit ] [--merge_metrics] List measurement statistics for the specified metric. Positional arguments -------------------- ```` Name of the metric to report measurement statistics. ```` Statistics is one or more (separated by commas) of [AVG, MIN, MAX, COUNT, SUM]. ```` measurements >= UTC time. format: 2014-01-01T00:00:00Z. OR Format: -120 (previous 120 minutes Optional arguments ------------------ ``--dimensions `` key value pair used to specify a metric dimension. This can be specified multiple times, or once with parameters separated by a comma. Dimensions need quoting when they contain special chars [&,(,),{,},>,<] that confuse the CLI parser. ``--endtime `` measurements <= UTC time. format: 2014-01-01T00:00:00Z. ``--period `` number of seconds per interval (default is 300) ``--offset `` The offset used to paginate the return data. ``--limit `` The amount of data to be returned up to the API maximum limit. ``--merge_metrics`` Merge multiple metrics into a single result. .. _monasca_notification-create: monasca notification-create ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca notification-create
Create notification. Positional arguments -------------------- ```` Name of the notification to create. ```` The notification type. Type must be EMAIL, WEBHOOK, or PAGERDUTY. ``
`` A valid EMAIL Address, URL, or SERVICE KEY .. _monasca_notification-delete: monasca notification-delete ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca notification-delete Delete notification. Positional arguments -------------------- ```` The ID of the notification. .. _monasca_notification-list: monasca notification-list ~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca notification-list [--offset ] [--limit ] List notifications for this tenant. Optional arguments ------------------ ``--offset `` The offset used to paginate the return data. ``--limit `` The amount of data to be returned up to the API maximum limit. .. _monasca_notification-show: monasca notification-show ~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca notification-show Describe the notification. Positional arguments -------------------- ```` The ID of the notification. If not specified returns all. .. _monasca_notification-update: monasca notification-update ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console usage: monasca notification-update
Update notification. Positional arguments -------------------- ```` The ID of the notification. ```` Name of the notification. ```` The notification type. Type must be either EMAIL, WEBHOOK, or PAGERDUTY. ``
`` A valid EMAIL Address, URL, or SERVICE KEY