Forge Home

9,897 downloads

9,897 latest version

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

  • 1.0.0 (latest)
released Aug 17th 2014
This version is compatible with:
  • , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'arioch-icinga', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add arioch-icinga
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install arioch-icinga --version 1.0.0

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

arioch/icinga — version 1.0.0 Aug 17th 2014

Build
Status

Sample Usage

cat site.pp

Nagios_service {
  host_name           => $::fqdn,
  use                 => 'generic-service',
  notification_period => '24x7',
  target              => "${::icinga::targetdir}/services/${::fqdn}.cfg",
  action_url          => '/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$',
}

Nagios_contact {
  ensure                        => present,
  use                           => 'generic-contact',
  host_notification_period      => '24x7',
  service_notification_period   => '24x7',
  service_notification_commands => 'notify-service-by-email',
  host_notification_commands    => 'notify-host-by-email',
  target                        => "${::icinga::targetdir}/contacts/contacts.cfg",
  can_submit_commands           => '1',
}

cat nodes.pp

node client {
  class { 'icinga': }
}

node server {
  class {
    'icinga':
      server        => 'true',
      manage_repo   => 'true',
      icinga_admins => [ 'admin,', 'dummy1,', 'dummy2' ],
      plugins       => [ 'checkpuppet', 'pnp4nagios' ];
  }

  icinga::user {
    'dummy1':
      ensure   => present,
      password => 'default',
      email    => 'dummy1@example.com',
      pager    => '320000001';

    'dummy2':
      ensure   => present,
      password => 'default'
      email    => 'dummy2@example.com',
      pager    => '320000002';
  }
}

Inside your existing modules

@@nagios_service { "check_tcp_123_${::fqdn}":
  check_command       => 'check_tcp!123',
  service_description => 'check_tcp',
}

PuppetDoc

Parsed PuppetDoc can be found here.

Unit testing

bundle exec rake

Nagios plugin packages

Packages for RHEL based operating systems can be found at Inuits' RPM repository A Debian mirror is currently not available yet. Building your own packages is very easy. You will find any necessary information on Inuits' nagios-plugins repository at Github.

Known issues

General

  • Needs proper testing

  • Using multiple Icinga servers with identical usernames you might run into the error below:

    err: Failed to apply catalog: Cannot alias Nagios_contact[icinga.example.org-someuser] to ["someuser"] at /etc/puppet/environments/refactor/modules/icinga/manifests/user.pp:48; resource ["Nagios_contact", "someuser"] already declared

RedHat

  • Be aware if you wish to manage your own package repositories you're in for a treat. You need packages from both the RPMForge and the EPEL repository. However - and here's the tricky part - some of those packages conflict with the ones in the other repository. The easiest way is to take Icinga and it's dependencies from RPMForge. Nagios-plugins related packages should not be taken from this repository otherwise a lot of EPEL packages or plugins will break horribly.

    The easy way out: class { icinga: manage_repo => true; }

    A more advanced approach would be to set up your own repo. Hipsters these days seem to be fond of Pulp for this purpose.

Debian

  • Some plugins may or may not work
  • The PNP4Nagios plugin requires the backports repository on Squeeze.
  • The PNP4Nagios plugin will not work on anything older than Squeeze.