puppet-nagios icon indicating copy to clipboard operation
puppet-nagios copied to clipboard

Configuring client checks

Open davideagle opened this issue 10 years ago • 1 comments

I'm trying to figure out how to use the module to configure client checks, but I mont able to get the nrpe-check_ssh.cfg file created in the npre.d directory, could you point me in to the right direction?

class profiles::base { $nagios_nrpe_allowed_hosts = hiera('nagios::nrpe_allowed_hosts')

class {'::nagios::client': nrpe_allowed_hosts => $nagios_nrpe_allowed_hosts, }

class {'nagios::check::ssh': ensure => present, } }

davideagle avatar Nov 03 '14 13:11 davideagle

I added additional nrpe check like this:

Client: file { '/usr/lib64/nagios/plugins/check_mongodb.py': ensure => present, source => 'puppet:///modules/mush_nagios/check_mongodb.py', mode => '0755', owner => 'root', group => 'nrpe', }

nagios::service { "check_mongo_${hostname}": check_command => 'check_mongod_proc', service_description => 'Mongodb Process', }

file { "${nagios::params::nrpe_cfg_dir}/nrpe-check-mongod_proc.cfg": ensure => present, owner => 'root', group => 'nrpe', mode => '0640', content => "command[check_mongod_proc]=/usr/lib64/nagios/plugins/check_procs -C mongod -c 2\n", }

Nagios Master: nagios_command { 'check_puppet_proc': command_line => '$USER1$/check_nrpe -H $HOSTADDRESS$ -t 15 -c check_puppet_proc', }

NMerch avatar Nov 03 '14 20:11 NMerch