Puppet Class: nagios::server::plugins::check_mssql

Defined in:
manifests/server/plugins/check_mssql.pp

Overview

Class: nagios::server::check_mssql

This is going to install the necessary nrpe plugin for running stored procedures as a nagios check. It will also set up some basic commands to run checks.

Authors

Ben Field <ben.field@concreteplatform.com>



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'manifests/server/plugins/check_mssql.pp', line 10

class nagios::server::plugins::check_mssql {
  require nagios::server::config
  include nagios::server::service

  ensure_packages('php5-sybase', {
    'ensure' => 'installed'
  }
  )

  file { 'check_mssql':
    ensure => present,
    path   => '/usr/lib/nagios/plugins/check_mssql',
    source => 'puppet:///modules/nagios/server/plugins/check_mssql',
    owner  => 'nagios',
    group  => 'nagios',
    mode   => '0755',
  }

  nagios_command { 'check_mssql':
    ensure       => 'present',
    command_name => 'check_mssql',
    command_line => '/usr/lib/nagios/plugins/check_mssql -H \'$ARG1$\' -U \'$ARG2$\' -P \'$ARG3$\' -q \'$ARG4$\' -d \'$ARG5$\' -r \'OK\'',
    target       => '/etc/nagios3/conf.d/puppet/command_nagios.cfg',
    notify       => Exec['rechmod'],
  }

  nagios_command { 'check_mssql_long_timeout':
    ensure       => 'present',
    command_name => 'check_mssql_long_timeout',
    command_line => '/usr/lib/nagios/plugins/check_mssql -H \'$ARG1$\' -U \'$ARG2$\' -P \'$ARG3$\' -q \'$ARG4$\' -d \'$ARG5$\' -r \'OK\' -w 10 -c 20',
    target       => '/etc/nagios3/conf.d/puppet/command_nagios.cfg',
    notify       => Exec['rechmod'],
  }
}