eventdefinition modify

Prev Next

This command modifies an event definition. The event definition includes actions that can be triggered when an event occurs that matches the definition. These actions override the global actions that you can define for all events using eventdefinitionconfig modify.

Usage
eventdefinition modify --id ID
                      [--email-recipients RECIPIENTS]
                      [--webhook-url URL]
                      [--webhook-method POST|GET|DELETE|PUT|PATCH]
                      [--webhook-data PAYLOAD]
                      [--webhook-params key1=value1,key2=value2,...]
                      [--cooldown SECONDS]
                      [--raise-at-count COUNT]
                      [--severity CRITICAL|MAJOR|MINOR|INFO]
                      [--trigger-on TRIGGER_ON]
                      [--trigger-off TRIGGER_OFF]
                      [--time-frame TIMEFRAME]
                      [--disable-actions]
                      [--enable-actions]
                      [--disable]
                      [--enable]
                      [--disable-alarm-only]
                      [--enable-alarm-only]
Required Parameters

--id ID

Specifies the event definition to modify.

Options

--email-recipients RECIPIENTS

Configures email recipients to be notified on events and/or alarms of this definition.

Specify RECIPIENTS as a comma separated list of email addresses (no spaces).

Example: --email-recipients storage_admin@company.com,bsmith@company.com,abrown@company.com

--webhook-url URL

Include this option to configure a webhook to be triggered by events of this specific type. A webhook contacts an external application and invokes an HTTP method in the external application. This feature requires the external application to support webhooks.

This option specifies the webhook URL of the external application that you want to trigger. Obtain the webhook URL from the external application.

You may want to append custom parameters to the URL. To specify the custom parameters, use also --webhook-params.

See also --webhook-method.

--webhook-method POST|GET|PUT|PATCH|DELETE

Include this option if you are configuring a webhook for the event definition. See --webhook-url.

This option specifies which HTTP method to invoke when the webhook is triggered. If the method sends a payload, use --webhook-data to specify the payload.

--webhook-data PAYLOAD

Include this option to specify a payload to send if you are configuring a webhook for the event definition. Relevant depending on the webhook method. See first --webhook-url and --webhook-method.

Specify the PAYLOAD in JSON format encapsulated with ''. Use the data structure supported by the external application. You can include the event message in a text string by specifying the $event variable.

For example: --webhook-data '"text":"$event"'

--webhook-params PARAMS

Specifies custom parameters to append to the webhook URL if configured. See --webhook-url.

Specify PARAMS as a comma separated set of key value pairs in the format key=value.

For example: myparam1=x,myparam2=y

--cooldown SECONDS

Sets a minimum number of seconds to wait between two consecutive events.

--raise-at-count COUNT

Sets the number of event occurrences after which the alarm is raised.

--severity CRITICAL|MAJOR|MINOR|INFO

Changes the severity of events with this definition.

--trigger-on TRIGGER_ON

Sets the value at which an alarm is triggered on.

Relevant to the following event types: OBJECT_MODIFIED , THRESHOLD, RATE.

For OBJECT_MODIFIED type events, specify one or more valid values for the property in the definition of the event. Separate the values with a comma.

For example: --trigger-on FAILED,TIMEOUT

For THRESHOLD and RATE type events, specify an operator and a numeric value in the format: '<operator>', <value>

<operator> can be:

  • gt. Greater than

  • ge. Greater than or equal to

  • lt. Lower than

  • eq. Equal to

<value> is the numeric value.

For example: --trigger-on 'gt', 50

--trigger-off TRIGGER_OFF

Sets the value at which an alarm is triggered off.

Relevant to the following event types: OBJECT_MODIFIED and THRESHOLD.

Input format as for --trigger-on.

--time-frame TIMEFRAME

Sets the time frame for a RATE type event, in which an alarm is triggered if a property exceeds a threshold value within the configured time frame.

For example: --time-frame 12h

--disable-actions

Disables any configured email recipients and webhook for the event definition.

 --enable-actions

Reenables email recipients and webhook for the event definition, if disabled.

--disable

Disables the event definition, which stops events of the given definition being logged as events, or triggering call home, alarms or actions such as email, webhook or syslogs.

--enable

Re-enables a disabled event definition. See --disable.

--disable-alarm-only

If specified, email recipients and webhooks (if configured) are initiated by all events of this definition and not only by alarms. For example, if the object type is CNode, and the Property is state , then if --disable-alarm-only is specified, any change in state of a CNode will initiate the actions you configured for this event.

--enable-alarm-only

If specified, email recipients and webhooks (if configured) are initiated only by alarms and not by any and every event of this definition.

Example

This example configures a webhook for a specific event definition. The webhook triggers a POST request on an external application, sending the event message in the payload . Since --disable-alarm-only is specified, the webhook will be triggered by all events of this definition, rather than only by alarms.

vcli: admin> eventdefinition modify --id 117 --disable-alarm-only --webhook-url https://hooks.slack.com/services/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 --webhook-method POST --webhook-data {"text": "$event"}