Note
This plugin is part of the cisco.meraki collection.
To install it use: ansible-galaxy collection install cisco.meraki.
To use it in a playbook, specify: cisco.meraki.meraki_alert.
New in version 2.1.0: of cisco.meraki
| Parameter | Choices/Defaults | Comments | ||
|---|---|---|---|---|
| alerts list / elements=dictionary | Alert-specific configuration for each type. | |||
| alert_destinations dictionary | A hash of destinations for this specific alert. | |||
| all_admins boolean |
| If true, all network admins will receive emails. | ||
| emails list / elements=string | A list of emails that will recieve the alert(s). | |||
| http_server_ids list / elements=string | A list of HTTP server IDs to send a Webhook to. | |||
| snmp boolean |
| If true, then an SNMP trap will be sent if there is an SNMP trap server configured for this network. | ||
| alert_type string | The type of alert. | |||
| enabled boolean |
| A boolean depicting if the alert is turned on or off. | ||
| filters raw | A hash of specific configuration data for the alert. Only filters specific to the alert will be updated. No validation checks occur against filters. | |||
| auth_key string / required | Authentication key provided by the dashboard. Required if environmental variable MERAKI_KEY is not set. | |||
| default_destinations dictionary | Properties for destinations when alert specific destinations aren't specified. | |||
| all_admins boolean |
| If true, all network admins will receive emails. | ||
| emails list / elements=string | A list of emails that will recieve the alert(s). | |||
| http_server_ids list / elements=string | A list of HTTP server IDs to send a Webhook to. | |||
| snmp boolean |
| If true, then an SNMP trap will be sent if there is an SNMP trap server configured for this network. | ||
| host string | Default: "api.meraki.com" | Hostname for Meraki dashboard. Can be used to access regional Meraki environments, such as China. | ||
| internal_error_retry_time integer | Default: 60 | Number of seconds to retry if server returns an internal server error. | ||
| net_id string | ID number of a network. | |||
| net_name string | Name of a network. aliases: name, network | |||
| org_id string | ID of organization. | |||
| org_name string | Name of organization. aliases: organization | |||
| output_format string |
| Instructs module whether response keys should be snake case (ex. net_id) or camel case (ex. netId). | ||
| output_level string |
| Set amount of debug output during module execution. | ||
| rate_limit_retry_time integer | Default: 165 | Number of seconds to retry if rate limiter is triggered. | ||
| state string |
| Create or modify an alert. | ||
| timeout integer | Default: 30 | Time to timeout for HTTP requests. | ||
| use_https boolean |
| If no, it will use HTTP. Otherwise it will use HTTPS.Only useful for internal Meraki developers. | ||
| use_proxy boolean |
| If no, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | ||
| validate_certs boolean |
| Whether to validate HTTP certificates. | ||
Note
ANSIBLE_MERAKI_FORMAT environment variable to camelcase.- name: Update settings
meraki_alert:
auth_key: abc123
org_name: YourOrg
net_name: YourNet
state: present
default_destinations:
emails:
- 'youremail@yourcorp'
- 'youremail2@yourcorp'
all_admins: yes
snmp: no
alerts:
- type: "gatewayDown"
enabled: yes
filters:
timeout: 60
alert_destinations:
emails:
- 'youremail@yourcorp'
- 'youremail2@yourcorp'
all_admins: yes
snmp: no
- type: "usageAlert"
enabled: yes
filters:
period: 1200
threshold: 104857600
alert_destinations:
emails:
- 'youremail@yourcorp'
- 'youremail2@yourcorp'
all_admins: yes
snmp: no
- name: Query all settings
meraki_alert:
auth_key: abc123
org_name: YourOrg
net_name: YourNet
state: query
delegate_to: localhost
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | |||
|---|---|---|---|---|---|
| data complex | info | Information about the created or manipulated object. | |||
| alerts complex | success | Alert-specific configuration for each type. | |||
| alert_destinations complex | success | A hash of destinations for this specific alert. | |||
| all_admins boolean | success | If true, all network admins will receive emails. | |||
| emails list / elements=string | success | A list of emails that will recieve the alert(s). | |||
| http_server_ids list / elements=string | success | A list of HTTP server IDs to send a Webhook to. | |||
| snmp boolean | success | If true, then an SNMP trap will be sent if there is an SNMP trap server configured for this network. | |||
| enabled boolean | success | A boolean depicting if the alert is turned on or off. | |||
| filters complex | success | A hash of specific configuration data for the alert. Only filters specific to the alert will be updated. No validation checks occur against filters. | |||
| type string | success | The type of alert. | |||
| default_destinations complex | success | Properties for destinations when alert specific destinations aren't specified. | |||
| all_admins boolean | success | If true, all network admins will receive emails. Sample: True | |||
| emails list / elements=string | success | A list of emails that will recieve the alert(s). | |||
| http_server_ids list / elements=string | success | A list of HTTP server IDs to send a Webhook to. | |||
| snmp boolean | success | If true, then an SNMP trap will be sent if there is an SNMP trap server configured for this network. Sample: True | |||
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/cisco/meraki/meraki_alert_module.html