Skip to content

Latest commit

 

History

History
665 lines (631 loc) · 26.1 KB

community.missing_collection.statuscake_uptime_module.rst

File metadata and controls

665 lines (631 loc) · 26.1 KB

community.missing_collection.statuscake_uptime

Management of the Status Cake (Uptime).

Version added: 0.3.0

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

  • requests
Parameter Choices/Defaults Comments
api_key
string / required
api key for statuscake.
basic_pass
string
Basic authentication password.
basic_user
string
Basic authentication username.
check_rate
integer
Default:
60
Number of seconds between tests.
Example 0 30 60 300 900 1800 3600 86400
command
string
    Choices:
  • create ←
  • update
  • delete
type of operation on uptime.
confirmation
integer
Default:
2
Number of confirmation servers to confirm downtime before an alert is triggered.
contact_groups_csv
string
Comma separated list of contact group IDs.
custom_header
string
JSON object. Represents headers to be sent when making requests.
dns_ip
string
IP address to compare a DNS test against.
dns_server
string
Hostname or IP address of the nameserver to query.
do_not_find
boolean
    Choices:
  • no ←
  • yes
Whether to consider the test as down if the string in FindString is present within the response.
enable_ssl_alert
boolean
    Choices:
  • no ←
  • yes
Send an alert if the SSL certificate is soon to expire.
final_endpoint
string
Specify where the redirect chain should end.
find_string
string
String to look for within the response. Considered down if not found.
follow_redirects
boolean
    Choices:
  • no ←
  • yes
Whether to follow redirects when testing.
host
string
Name of the hosting provider.
id
string
id of uptime test.
required only for delete and update.
include_header
boolean
    Choices:
  • no ←
  • yes
Include header content in string match search.
name
string
name of uptime test.
required only for create and update.
paused
boolean
    Choices:
  • no ←
  • yes
Whether the test should be run.
port
integer
Destination port for TCP tests.
post_body
string
JSON object. This is converted to form data on request.
post_raw
string
Raw HTTP POST string to send to the server.
regions
list
List of regions on which to run tests.
status_codes_csv
string
Comma separated list of status codes that trigger an alert.
tags_csv
string
Comma separated list of tags.
test_type
string
    Choices:
  • DNS
  • HEAD
  • HTTP ←
  • PING
  • PUSH
  • PUT
  • SMTP
  • SSH
  • TCP
type of test for Uptime.
timeout
integer
Default:
40
How long to wait to receive the first byte.
trigger_rate
integer
Default:
4
The number of minutes to wait before sending an alert.
url
string
Default:
statuscake uptime api.
use_jar
boolean
    Choices:
  • no ←
  • yes
Enable cookie storage.
user_agent
string
User agent to be used when making requests.
website_url
string
URL or IP address of the website under test.
{'example': 'https://www.google.com'}

- name: create uptime test
  community.missing_collection.statuscake_uptime:
    api_key: 'Ohxxxxxxxxxxxxxxxxpi'
    command: 'create'
    website_url: 'https://www.google.com'
    test_type: 'HTTP'
    check_rate: 60
    name: 'google_http_check'
  register: __id

- name: update uptime test check rate and name
  community.missing_collection.statuscake_uptime:
    api_key: 'Ohxxxxxxxxxxxxxxxxpi'
    command: 'update'
    id: '{{ __id.id }}'
    name: "new_google_http_check"
    check_rate: 86400

- name: delete uptime test
  community.missing_collection.statuscake_uptime:
    api_key: 'Ohxxxxxxxxxxxxxxxxpi'
    command: 'delete'
    id: '{{ __id.id }}'

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

Key Returned Description
id
string
when command is `create` and success.
id of uptime test.

Sample:
88175


Authors