Added default checks and thresholds for NRPE

These probably need further tuning.
This commit is contained in:
Ossi Salmi 2012-12-03 01:49:02 +02:00
parent 29c6eb5b4d
commit c370df8db2

View file

@ -87,9 +87,7 @@ class nagios::target::nrpe inherits nagios::target {
"nagios-plugins-procs",
"nagios-plugins-users", ]:
ensure => installed,
before => [ File["/etc/nrpe.d"],
Augeas["nrpe-allow"],
Service["nrpe"], ],
before => [ File["/etc/nrpe.d"], Service["nrpe"] ],
}
}
"ubuntu","debian": {
@ -98,9 +96,7 @@ class nagios::target::nrpe inherits nagios::target {
package { [ "nagios-nrpe-server",
"nagios-plugins-basic", ]:
ensure => installed,
before => [ File["/etc/nrpe.d"],
Augeas["nrpe-allow"],
Service["nrpe"], ],
before => [ File["/etc/nrpe.d"], Service["nrpe"] ],
}
}
}
@ -122,9 +118,13 @@ class nagios::target::nrpe inherits nagios::target {
enable => true,
}
augeas { "nrpe-allow":
context => "/files/etc/nagios/nrpe.cfg",
changes => "set allowed_hosts '${nagios_allow}'",
file { "${nrpedir}/allowed_hosts.cfg":
ensure => present,
mode => "0644",
owner => "root",
group => "root",
content => "allowed_hosts=${nagios_allow}\n",
require => File["/etc/nrpe.d"],
notify => Service["nrpe"],
}
@ -133,7 +133,7 @@ class nagios::target::nrpe inherits nagios::target {
mode => "0644",
owner => "root",
group => "root",
content => "command[check_disk] = ${nagios::common::libdir}/check_disk -c 10% -w 20% -p /\n",
content => "command[check_disk]=${nagios::common::libdir}/check_disk -w 20% -c 10% -p /\n",
require => File["/etc/nrpe.d"],
notify => Service["nrpe"],
}
@ -142,19 +142,42 @@ class nagios::target::nrpe inherits nagios::target {
description => "Disk",
}
file { "${nrpedir}/check_load.cfg":
ensure => present,
mode => "0644",
owner => "root",
group => "root",
content => "command[check_load]=${nagios::common::libdir}/check_load -r -w 3,2,1 -c 6,4,2\n",
require => File["/etc/nrpe.d"],
notify => Service["nrpe"],
}
@@nagios::service { "${fqdn}_load":
command => "check_nrpe!check_load",
description => "Load",
}
@@nagios::service { "${fqdn}_users":
command => "check_nrpe!check_users",
description => "Users",
file { "${nrpedir}/check_swap.cfg":
ensure => present,
mode => "0644",
owner => "root",
group => "root",
content => "command[check_swap]=${nagios::common::libdir}/check_swap -w 75% -c 50%\n",
require => File["/etc/nrpe.d"],
notify => Service["nrpe"],
}
@@nagios::service { "${fqdn}_swap":
command => "check_nrpe!check_swap",
description => "Swap",
}
@@nagios::service { "${fqdn}_procs":
command => "check_nrpe!check_total_procs",
description => "Processes",
}
# @@nagios::service { "${fqdn}_users":
# command => "check_nrpe!check_users",
# description => "Users",
# }
#
# @@nagios::service { "${fqdn}_procs":
# command => "check_nrpe!check_total_procs",
# description => "Processes",
# }
}