pingdom

Puppet Pingdom module.
Cliff Wells

Cliff Wells

cwells

12,827 downloads

5,155 latest version

5.0 quality score

Version information

  • 0.9.14 (latest)
  • 0.9.13
  • 0.9.12
  • 0.9.11
  • 0.9.10
  • 0.9.9
  • 0.9.8
  • 0.9.7
  • 0.9.6
  • 0.9.5
  • 0.9.4
  • 0.9.3
  • 0.9.2
  • 0.9.1
  • 0.9.0
  • 0.8.1
  • 0.8.0
  • 0.7.7
  • 0.7.6
  • 0.7.5
  • 0.7.4
  • 0.7.3
  • 0.7.2
  • 0.7.1
  • 0.7.0
  • 0.6.9
  • 0.6.8
  • 0.6.7
  • 0.6.6
  • 0.6.4
  • 0.6.3
  • 0.6.2
  • 0.6.1
  • 0.5.1
  • 0.5.0
  • 0.4.2
  • 0.4.1
  • 0.4.0
  • 0.3.9
  • 0.3.8
  • 0.3.7
  • 0.3.6
  • 0.3.5
  • 0.3.4
  • 0.3.3
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.2.9
  • 0.2.8
  • 0.2.7
  • 0.2.6
  • 0.2.5
  • 0.2.4
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.9
  • 0.1.8
  • 0.1.7
  • 0.1.6
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Jul 3rd 2019
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.0.0 < 6.0.0
  • RedHat, CentOS, OracleLinux, Scientific, Amazon, Debian, Ubuntu, FreeBSD, DragonFly, OpenBSD, Gentoo, ArchLinux

Start using this module

Documentation

cwells/pingdom — version 0.9.14 Jul 3rd 2019

puppet-pingdom

Puppet type and provider for the Pingdom API.

Status

Currently supports the Pingdom 2.1 API.

This module has no external dependencies, and should be widely-compatible and simple to install.

Please consider helping by submitting bug reports. Pull requests also welcome.

Warning

0.9.0 introduces a breaking change. Pingdom_check.contacts has been renamed to Pingdom_check.users to be consistent with naming conventions.


Types

pingdom_check pingdom_user pingdom_team [1] pingdom_settings

[1] Multi-user accounts only.

Check providers

dns http httpcustom imap ping pop3 smtp tcp udp


Example usage

Defaults:
Pingdom_team {
    account_email => Sensitive($pingdom_account_email),
    user_email    => Sensitive($pingdom_user_email),
    password      => Sensitive($pingdom_password),
    appkey        => $pingdom_appkey
}

Pingdom_user {
    account_email => Sensitive($pingdom_account_email),
    user_email    => Sensitive($pingdom_user_email),
    password      => Sensitive($pingdom_password),
    appkey        => $pingdom_appkey
}

Pingdom_check {
    account_email => Sensitive($pingdom_account_email),
    user_email    => Sensitive($pingdom_user_email),
    password      => Sensitive($pingdom_password),
    appkey        => $pingdom_appkey,
    probe_filters => ['NA']
}
Contacts:
pingdom_user { 'Steve Smith':
    ensure          => present,
    contact_targets => [
        { email  => 'ssmith@domain.com' },
        { number => '555-123-1212', countrycode => '1' }
    ]
}

pingdom_user { 'DevOps Pager':
    ensure          => present,
    contact_targets => [
        { number => '555-123-1213', countrycode => '1' }
    ]
}
Teams:
pingdom_team { 'DevOps':
    ensure => present,
    users  => [
        'Steve Smith',
        'DevOps Pager'
    ]
}
HTTP check:
pingdom_check { "http://${facts['fqdn']}/check":
    ensure         => present,
    provider       => 'http',
    host           => $facts['fqdn'],
    url            => '/check',
    auth           => Sensitive("admin:p@ssw0rd"),
    resolution     => 5,
    requestheaders => {
        'Accept' => 'x-application/json'
    },
    postdata => Sensitive({
        'api_key'  => 'abcdef1234567890abcdef1234567890',
        'api_user' => 'automation'
    }),
    teams          => ['DevOps'],
    tags           => ['http']
}
DNS check:
pingdom_check { "dns://${facts['fqdn']}":
    ensure     => present,
    provider   => 'dns',
    host       => $facts['fqdn'],
    expectedip => '1.2.3.4',
    nameserver => '8.8.8.8',
    users      => ['DevOps Pager'],
    tags       => ['dns']
}
Ping check:
pingdom_check { "ping://${facts['fqdn']}":
    ensure   => present,
    provider => 'ping',
    host     => $facts['fqdn'],
    tags     => ['ping']
}
Settings:
pingdom_settings { 'Pingdom Settings':
    firstname   => 'Brad',
    lastname    => 'Brown',
    company     => 'Company, Inc.',
    email       => 'bbrown@company.com',
    cellphone   => '555-123-3333',
    description => 'This account is managed by Puppet.'
}
Hiera:
pingdom::account_email: support@company.com
pingdom::user_email: puppet@company.com
pingdom::password: ENC[PKCS7,EYAMLENCODEDPASSWORD]
pingdom::appkey: ABCDEF1234567890FEDCBA

pingdom::settings:
  'Pingdom Settings':
    firstname: Brad
    lastname: Brown
    company: Company, Inc.
    email: bbrown@company.com
    cellphone: 555-123-3333
    description: This account is managed by Puppet.

pingdom::users:
  'Steve Smith':
    contact_targets:
    - email: devops@company.com
    - number: 555-123-1234
      countrycode: 1

  'DevOps Pager':
    contact_targets:
    - number: 555-123-3214
      countrycode: 1

pingdom::teams:
  'DevOps':
    users:
    - Steve Smith
    - DevOps Pager

pingdom::checks:
  "http://%{facts.fqdn}/status":
    provider: http
    host: "%{facts.fqdn}"
    url: /status
    teams:
    - DevOps
    tags:
    - http

  "ping://%{facts.fqdn}":
    provider: ping
    host: "%{facts.fqdn}"
    users:
    - DevOps Pager
    tags:
    - ping

After configuring Hiera, simply include pingdom in your manifest:

class myclass {
    include pingdom
}

Installation

See instructions on PuppetForge.


Attention

This module utilizes a feature named autofilter [default: true]. Be aware that this feature will automatically tag your checks with a shortened SHA1 hash of the check's name property, and automatically set filter_tags to include this tag. This allows us to efficiently locate this check in the future. However, if you have existing checks, enabling autofilter will cause them to no longer be found (since they lack the requisite SHA1 tag in filter_tags).

To get around this, and have your existing checks tagged, set autofilter => 'bootstrap' and run Puppet on all your nodes. This will enable tagging, but not set filter_tags. If you have a lot of existing checks, this may be a slow Puppet run. Once the run has completed, set autofilter => true or simply remove the parameter altogether.


Known issues

  • puppet resource pingdom_check command will likely never work, since self.instances is a class method and doesn't have access to instantiation-time parameters such as credentials.
  • Users API is incomplete (can only manage contacts, not admins).
  • There's a difference in login requirements for Starter and Standard plans (specifically, these two levels lack multi-user login). I'm currently only able to test against Enterprise. If you have a Starter or Standard plan and have issues authenticating to Pingdom, reach out to me and we can get it working.
  • The Integrations API isn't documented, so we can't manage integrations yet.