diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-09-08 19:24:25 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-09-08 19:33:11 +0100 |
commit | b3db587cde9987aa4dcba794c64eb9446d58384e (patch) | |
tree | 4b4270cd277f31560f6d1ef91d6d39bf4d23a0c1 | |
parent | Allow .zip downloads (diff) | |
download | config-b3db587cde9987aa4dcba794c64eb9446d58384e.tar.bz2 config-b3db587cde9987aa4dcba794c64eb9446d58384e.tar.xz config-b3db587cde9987aa4dcba794c64eb9446d58384e.zip |
Configure nagiosgraph command
-rw-r--r-- | nagios/nagios.cfg | 4 | ||||
-rw-r--r-- | nagios/objects/cluster.cfg | 15 | ||||
-rw-r--r-- | nagios/objects/commands.cfg | 10 |
3 files changed, 18 insertions, 11 deletions
diff --git a/nagios/nagios.cfg b/nagios/nagios.cfg index 3ac9628..cc4ae1c 100644 --- a/nagios/nagios.cfg +++ b/nagios/nagios.cfg @@ -809,7 +809,7 @@ enable_event_handlers=1 # performance data. # Values: 1 = process performance data, 0 = do not process performance data -process_performance_data=0 +process_performance_data=1 @@ -822,7 +822,7 @@ process_performance_data=0 # more information on performance data. #host_perfdata_command=process-host-perfdata -#service_perfdata_command=process-service-perfdata +service_perfdata_command=process-service-perfdata diff --git a/nagios/objects/cluster.cfg b/nagios/objects/cluster.cfg index b3ffae0..f6c9ba9 100644 --- a/nagios/objects/cluster.cfg +++ b/nagios/objects/cluster.cfg @@ -140,12 +140,14 @@ define service { hostgroup_name linux-servers service_description Saved kernel config check_command check_file_exists!/etc/portage/savedconfig/sys-kernel/gentoo-kernel + process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description New kernel config check_command check_file_no_linger!/etc/portage/savedconfig/sys-kernel/._cfg*_gentoo-kernel + process_perf_data 0 } define service { use remote-service @@ -176,24 +178,28 @@ define service { hostgroup_name linux-servers service_description DHCPD check_command check_service!dhcpd4 + process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Corosync check_command check_service!corosync + process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Pacemaker check_command check_service!pacemaker + process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Kernel version check_command check_kernel + process_perf_data 0 } # @@ -271,6 +277,7 @@ define service { hostgroup_name linux-servers service_description HA Proxy check_command check_haproxy + process_perf_data 0 max_check_attempts 1 check_interval 1 retry_interval 1 @@ -280,6 +287,7 @@ define service { hostgroup_name linux-servers service_description DRBD check_command check_drbd + process_perf_data 0 max_check_attempts 1 check_interval 1 retry_interval 1 @@ -289,6 +297,7 @@ define service { hostgroup_name linux-servers service_description Raid check_command check_raid + process_perf_data 0 } define service { use remote-service @@ -313,6 +322,7 @@ define service { hostgroup_name linux-servers service_description Spam Assassin check_command check_service!spamassassin + process_perf_data 0 } define service { use remote-service @@ -325,24 +335,28 @@ define service { hostgroup_name linux-servers service_description Clam check_command check_service!clamd + process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description NSCD check_command check_service!nscd + process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description DistCCD check_command check_service!distccd + process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Cron check_command check_service!cronie + process_perf_data 0 } # @@ -405,6 +419,7 @@ define service { host_name virtualip service_description CRM check_command check_crm + process_perf_data 0 } # diff --git a/nagios/objects/commands.cfg b/nagios/objects/commands.cfg index 5e1fa15..0c31f61 100644 --- a/nagios/objects/commands.cfg +++ b/nagios/objects/commands.cfg @@ -182,16 +182,8 @@ define command { # ################################################################################ -define command { - - command_name process-host-perfdata - command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /var/nagios/host-perfdata.out -} - - define command { - command_name process-service-perfdata - command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /var/nagios/service-perfdata.out + command_line /usr/lib64/nagiosgraph/bin/insert.pl "$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$" } |