Skip to content

Latest commit

 

History

History
378 lines (343 loc) · 14.8 KB

community.missing_collection.checkly_alert_channels_module.rst

File metadata and controls

378 lines (343 loc) · 14.8 KB

community.missing_collection.checkly_alert_channels

Management of the checkly Alert Channels.

Version added: 0.3.0

The below requirements are needed on the host that executes this module.

  • requests
Parameter Choices/Defaults Comments
activated
boolean
    Choices:
  • no ←
  • yes
do you want to active check_id/group_id with subscription.
api_key
string / required
api key for checkly.
check_id
string
use only in update-sub command.
You can either pass a check_id or a group_id, but not both.
command
string
    Choices:
  • create ←
  • update
  • update-sub
  • delete
type of operation on alert channels.
config
dictionary
dict of data for alert channel.
object (AlertChannelCreateConfig).
group_id
string
use only in update-sub command.
You can either pass a check_id or a group_id, but not both.
id
string
id of alert channel.
required only for `delete` and `update`.
send_degraded
boolean
    Choices:
  • no ←
  • yes
send alert when degraded.
send_failure
boolean
    Choices:
  • no ←
  • yes
send alert when failure.
send_recovery
boolean
    Choices:
  • no ←
  • yes
send alert when recovery.
ssl_expiry
boolean
    Choices:
  • no ←
  • yes
Determines if an alert should be send for expiring SSL certificates.
ssl_expiry_threshold
integer
Default:
30
At what moment in time to start alerting on SSL certificates.
type
string
    Choices:
  • EMAIL ←
  • SLACK
  • WEBHOOK
  • SMS
  • PAGERDUTY
  • OPSGENIE
type of alert channels.
url
string
Default:
checkly alert channel api.

- name: create alert channel
  community.missing_collection.checkly_alert_channels:
    api_key: 'a8f08873c494445ba156e572e1324300'
    command: 'create'
    config:
      address: 'dpsangwal@gmail.com'
  register: __

- name: update a alert channel aka email address
  community.missing_collection.checkly_alert_channels:
    api_key: 'a8f08873c494445ba156e572e1324300'
    command: 'update'
    id: '{{ __.result.id }}'
    config:
      address: 'example1@gmail.com'

- name: update a alert channel subcriptions only
  community.missing_collection.checkly_alert_channels:
    api_key: 'a8f08873c494445ba156e572e1324300'
    command: 'update-sub'
    id: '{{ __.result.id }}'
    activated: true
    check_id: '1ceaff6c-12ce-4322-9ac1-2dd2c14a2967'

- name: delete a alert channel
  community.missing_collection.checkly_alert_channels:
    api_key: 'a8f08873c494445ba156e572e1324300'
    command: 'delete'
    id: '{{ __.result.id }}'

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
result
dictionary
when command is create/update/update-sub and success.
result of checkly api.

Sample:
{'config': {'address': 'dpsangwal@gmail.com'}, 'created_at': '2021-08-31T18:23:51.054Z', 'id': 39323, 'sendDegraded': False, 'sendFailure': False, 'sendRecovery': False, 'sslExpiry': False, 'sslExpiryThreshold': 30, 'type': 'EMAIL'}


Authors