Module for sending data to OpsGenie
New in version 2018.3.0.
This module can be used in Reactor System for posting data to OpsGenie as a remote-execution function.
For example:
opsgenie_event_poster:
local.opsgenie.post_data:
- tgt: 'salt-minion'
- kwarg:
name: event.reactor
api_key: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
reason: {{ data['data']['reason'] }}
action_type: Create
salt.modules.opsgenie.
post_data
(api_key=None, name='OpsGenie Execution Module', reason=None, action_type=None)¶Post data to OpsGenie. It's designed for Salt's Event Reactor.
After configuring the sls reaction file as shown above, you can trigger the module with your designated tag (og-tag in this case).
CLI Example:
salt-call event.send 'og-tag' '{"reason" : "Overheating CPU!"}'
Required parameters:
It's the API Key you've copied while adding integration in OpsGenie.
It will be used as alert's default message in OpsGenie.
OpsGenie supports the default values Create/Close for action_type. You can customize this field with OpsGenie's custom actions for other purposes like adding notes or acknowledging alerts.
Optional parameters:
It will be used as alert's alias. If you want to use the close functionality you must provide name field for both states like in this case.
Generated on August 05, 2021 at 04:04:00 UTC.
You are viewing docs for the previous stable release, 3000.9. Switch to docs for the latest stable release, 3003.1, or to a recent doc build from the master branch.
© 2021 SaltStack. All Rights Reserved, SaltStack Inc. | Privacy Policy