uptimerobot

Simple module to add a server to uptime robot's monitoring

Diego Lima

diegolima

3,813 downloads

3,790 latest version

1.9 quality score

Version information

  • 0.1.1 (latest)
  • 0.1.0
released Jul 4th 2017

Start using this module

Documentation

diegolima/uptimerobot — version 0.1.1 Jul 4th 2017

uptimerobot

Table of Contents

  1. Overview
  2. Module Description
  3. Setup - The basics of getting started with uptimerobot
  4. Usage - Configuration options and additional functionality
  5. Reference
  6. Limitations
  7. Development

Overview

This module aims to make it easy to monitor servers using uptimerobot's service. Currently its tested on both Ubuntu 14.04+ and Centos 6+, but should work on any system that has curl available.

Module Description

This module uses UptimeRobot's REST API to manage monitored servers. Currently it only allows adding servers into the monitoring service. New servers should appear as monitored on the dashboard.

Setup

What uptimerobot affects

  • Installs the "curl" package on the monitored server, along with any dependencies.
  • Creates the file /etc/uptimerobot.monitored containing the API's response.

Setup Requirements

This module expects that a package named "curl" exists in your distribution. If curl is available from any other source it should be perfectly usable but changes to the module might be necessary.

Beginning with uptimerobot

Install the module by placing it on your modules directory (tipically /etc/puppetlabs/code/environments/production/modules) or by using:

puppet module install diegolima-uptimerobot

Usage

To simply add the server into monitoring you can add the following class to your manifest:

class { 'uptimerobot::monitor':
  key          => 'your-api-key-here',
  url          => 'https://www.diegolima.org',
  friendlyname => 'Diegolima.org',
  alert        => 'id-of-users-that-should-receive-alerts,separated-by-commas',
}

Reference

You can set up defaults using the uptimerobot::params class, though the included ones should be sensible enough for most users:

class { 'uptimerobot::params':
  api      => 'https://api.uptimerobot.com/v2/newMonitor',
  format   => 'json',
  lockfile => '/etc/uptimerobot.monitored',
  type     => '1',
  alert    => '',
}

Limitations

Due to the way the module currently works your system must have a package called "curl" even if curl is provided from somewhere else.

Development

Feel free to fork this module and send pull requests with any changes/improvements you make!