Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

felipesantiago/ansible-uptimerobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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_api_key.

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

Running

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

TODO

  • Add alert support for monitors
  • Alert management support
  • Public pages support
  • Maintenance windows support
  • Ansible check mode support