New in version 2018.3.0.
This state is useful for creating or closing alerts in OpsGenie during state runs.
used_space:
disk.status:
- name: /
- maximum: 79%
- minimum: 20%
opsgenie_create_action_sender:
opsgenie.create_alert:
- api_key: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
- reason: 'Disk capacity is out of designated range.'
- name: disk.status
- onfail:
- disk: used_space
opsgenie_close_action_sender:
opsgenie.close_alert:
- api_key: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
- name: disk.status
- require:
- disk: used_space
Close an alert in OpsGenie. It's a wrapper function for create_alert. Example usage with Salt's requisites and other global state arguments could be found above.
Required 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 above case.
Optional 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.
Create an alert in OpsGenie. Example usage with Salt's requisites and other global state arguments could be found above.
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.
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 above case.
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.