diff options
author | Micah Anderson <micah@leap.se> | 2015-06-11 12:10:09 -0400 |
---|---|---|
committer | Micah Anderson <micah@leap.se> | 2015-06-11 12:10:09 -0400 |
commit | b429b30bda4dafc78cb02f6ece5d82f08e35de1f (patch) | |
tree | 37efc30a4fcb642dec583c3accea76f7a7de9c39 /puppet/modules/site_nagios | |
parent | 67b2bea2dfcfb06191bf5ed562309f264c6aed8c (diff) | |
parent | d9146415db0e6b7dd0c945039c0a4ed4fd054a7d (diff) |
Merge tag '0.7.0'
Releasing 0.7.0
Diffstat (limited to 'puppet/modules/site_nagios')
3 files changed, 20 insertions, 6 deletions
diff --git a/puppet/modules/site_nagios/files/configs/Debian/nagios.cfg b/puppet/modules/site_nagios/files/configs/Debian/nagios.cfg index e46ebf62..0d729b8c 100644 --- a/puppet/modules/site_nagios/files/configs/Debian/nagios.cfg +++ b/puppet/modules/site_nagios/files/configs/Debian/nagios.cfg @@ -1273,4 +1273,15 @@ debug_file=/var/lib/nagios3/nagios.debug max_debug_file_size=1000000 +process_performance_data=1 +service_perfdata_file=/var/lib/nagios3/service-perfdata +service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$ +service_perfdata_file_mode=a +service_perfdata_file_processing_interval=15 +service_perfdata_file_processing_command=process-service-perfdata-file-pnp4nagios-bulk-npcd +host_perfdata_file=/var/lib/nagios3/host-perfdata +host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$ +host_perfdata_file_mode=a +host_perfdata_file_processing_interval=15 +host_perfdata_file_processing_command=process-host-perfdata-file-pnp4nagios-bulk-npcd diff --git a/puppet/modules/site_nagios/files/plugins/check_last_regex_in_log b/puppet/modules/site_nagios/files/plugins/check_last_regex_in_log index cf7c03e5..47569388 100755 --- a/puppet/modules/site_nagios/files/plugins/check_last_regex_in_log +++ b/puppet/modules/site_nagios/files/plugins/check_last_regex_in_log @@ -50,7 +50,7 @@ done [ $warn -eq 0 -o $crit -eq 0 -o -z "$regex" -o -z "$log" ] && ( usage; exit $STATE_UNKNOWN) [ -f "$log" ] || (echo "$log doesn't exist"; exit $STATE_UNKNOWN) -lastmsg=$(tac $log | grep -i $regex | head -1 | cut -d' ' -f 1-3) +lastmsg=$(tac $log | grep -i $regex | head -1 | sed 's/ / /g' | cut -d' ' -f 1-3) if [ -z "$lastmsg" ] then diff --git a/puppet/modules/site_nagios/manifests/server.pp b/puppet/modules/site_nagios/manifests/server.pp index 092ca503..cb6c8d95 100644 --- a/puppet/modules/site_nagios/manifests/server.pp +++ b/puppet/modules/site_nagios/manifests/server.pp @@ -1,3 +1,4 @@ +# configures nagios on monitoring node class site_nagios::server inherits nagios::base { # First, purge old nagios config (see #1467) @@ -13,7 +14,8 @@ class site_nagios::server inherits nagios::base { include nagios::defaults::commands include nagios::defaults::templates include nagios::defaults::timeperiods - include nagios::defaults::plugins + include nagios::pnp4nagios + include nagios::pnp4nagios::popup class { 'nagios': # don't manage apache class from nagios, cause we already include @@ -41,10 +43,11 @@ class site_nagios::server inherits nagios::base { # deploy serverside plugins file { '/usr/lib/nagios/plugins/check_openvpn_server.pl': - source => 'puppet:///modules/nagios/plugins/check_openvpn_server.pl', - mode => '0755', - owner => 'nagios', - group => 'nagios', + source => 'puppet:///modules/nagios/plugins/check_openvpn_server.pl', + mode => '0755', + owner => 'nagios', + group => 'nagios', + require => Package['nagios-plugins']; } create_resources ( site_nagios::add_host_services, $nagios_hosts ) |