From fc15d5bf3660f6bbbfd82caa994376db40cfe980 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 14 Mar 2017 16:00:37 +0000 Subject: [PATCH] additional fix for new status.dat location in nagios --- roles/nagios/server/files/nrpe.cfg | 2 +- roles/nagios/server/templates/config.inc.php | 2 +- .../files/nagios/scripts/check_nagios_notifications.py | 2 +- roles/nagios_server/files/nrpe/nrpe.cfg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/nagios/server/files/nrpe.cfg b/roles/nagios/server/files/nrpe.cfg index ffd5cc5723..3a3c2edd00 100644 --- a/roles/nagios/server/files/nrpe.cfg +++ b/roles/nagios/server/files/nrpe.cfg @@ -220,7 +220,7 @@ command[check_puppetmaster]=/usr/lib64/nagios/plugins/check_procs -c 8:8 -a '/us command[check_supervisor]=/usr/lib64/nagios/plugins/check_procs -c 1:1 -a '/usr/bin/python /usr/bin/supervisord' -u root command[check_lock]=/usr/lib64/nagios/plugins/check_lock command[check_lock_file_age]=/usr/lib64/nagios/plugins/check_lock_file_age -w 1 -c 5 -f /var/lock/fedora-ca/lock -command[check_nagios]=/usr/lib64/nagios/plugins/check_nagios -e 5 -F /var/log/nagios/status.dat -C /usr/sbin/nagios +command[check_nagios]=/usr/lib64/nagios/plugins/check_nagios -e 5 -F /var/spool/nagios/status.dat -C /usr/sbin/nagios command[check_auditd]=/usr/lib64/nagios/plugins/check_procs -c 1:1 -C 'auditd' -u root command[check_cron]=/usr/lib64/nagios/plugins/check_procs -c 1:10 -C 'crond' -u root command[check_varnish_proc]=/usr/lib64/nagios/plugins/check_procs -c 1:2 -C 'varnishd' -u nobody diff --git a/roles/nagios/server/templates/config.inc.php b/roles/nagios/server/templates/config.inc.php index 9ad5123510..07f33d6aca 100644 --- a/roles/nagios/server/templates/config.inc.php +++ b/roles/nagios/server/templates/config.inc.php @@ -6,7 +6,7 @@ $cfg['cgi_base_url']='/{{nagios_srcdir}}/cgi-bin/'; // FILE LOCATION DEFAULTS $cfg['main_config_file']='/etc/nagios/nagios.cfg'; // default location of the main Nagios config file -$cfg['status_file']='/var/log/nagios/status.dat'; // default location of Nagios status file +$cfg['status_file']='/var/spool/nagios/status.dat'; // default location of Nagios status file $cfg['state_retention_file']='/var/log/nagios/retention.dat'; // default location of Nagios retention file // utilities diff --git a/roles/nagios_server/files/nagios/scripts/check_nagios_notifications.py b/roles/nagios_server/files/nagios/scripts/check_nagios_notifications.py index 7e66202018..574df43b16 100755 --- a/roles/nagios_server/files/nagios/scripts/check_nagios_notifications.py +++ b/roles/nagios_server/files/nagios/scripts/check_nagios_notifications.py @@ -17,7 +17,7 @@ debug = 0 EMAIL_FROM="nagios@fedoraproject.org" EMAIL_TO="sysadmin-noc-members@fedoraproject.org" #EMAIL_TO="athmane@fedoraproject.org" -nagios_status_file = '/var/log/nagios/status.dat' +nagios_status_file = '/var/spool/nagios/status.dat' class NagiosStatus: def __init__(self, filename): diff --git a/roles/nagios_server/files/nrpe/nrpe.cfg b/roles/nagios_server/files/nrpe/nrpe.cfg index 1d79e1129a..41087d92ec 100644 --- a/roles/nagios_server/files/nrpe/nrpe.cfg +++ b/roles/nagios_server/files/nrpe/nrpe.cfg @@ -315,7 +315,7 @@ command[check_puppetmaster]=/usr/lib64/nagios/plugins/check_procs -c 8:8 -a '/us command[check_supervisor]=/usr/lib64/nagios/plugins/check_procs -c 1:1 -a '/usr/bin/python /usr/bin/supervisord' -u root command[check_lock]=/usr/lib64/nagios/plugins/check_lock command[check_lock_file_age]=/usr/lib64/nagios/plugins/check_lock_file_age -w 1 -c 5 -f /var/lock/fedora-ca/lock -command[check_nagios]=/usr/lib64/nagios/plugins/check_nagios -e 5 -F /var/log/nagios/status.dat -C /usr/sbin/nagios +command[check_nagios]=/usr/lib64/nagios/plugins/check_nagios -e 5 -F /var/spool/nagios/status.dat -C /usr/sbin/nagios command[check_auditd]=/usr/lib64/nagios/plugins/check_procs -c 1:1 -C 'auditd' -u root command[check_cron]=/usr/lib64/nagios/plugins/check_procs -c 1:10 -C 'crond' -u root command[check_varnish_proc]=/usr/lib64/nagios/plugins/check_procs -c 1:2 -C 'varnishd' -u nobody