felipesantiago / ansible-uptimerobot

Ansible uptimerobot module
Apache License 2.0
13 stars 5 forks source link
ansible ansible-modules ansible-role monitoring python uptimerobot uptimerobot-api

Ansible uptimerobot module

Add/remove sites to uptimerobot service.

Ansible's official module currently only supports startand pause.

Configuration exemple:

Change your group_vars/all/uptimerobot.yml:

Manage monitors:

uptimerobot_targets:
  - { name: "Google", url: "https://gogole.com", state: "present"}
  - { name: "Slashdot", url: "https://slashdot.org", state: "present"}

Manage Alert contacts:

uptimerobot_alert_entries:
  - { alert_name: "Slack",  alert_type: "11", status: "2", value: "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXX", state: "present" }

See uptimerobot API documentation for more details

Important: ansible-vault is highly recommended to store your _uptimerobot_apikey.

$ ansible-vault encrypt group_vars/all/uptimerobot_api_key.yml

Running

$ ansible-playbook main.yml --vault-pass your_vault_pass_file

TODO