Forge Home

uptimerobot

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

4,853 downloads

4,814 latest version

1.9 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

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

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'diegolima-uptimerobot', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add diegolima-uptimerobot
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install diegolima-uptimerobot --version 0.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

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!