From: Chris Sharp Date: Fri, 26 Oct 2018 13:40:24 +0000 (-0400) Subject: Add sudoers file for check_osrf Nagios/Icinga X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f13d78df266095619dcd40d17187dbb63e2e252a;p=contrib%2Fpines%2Fgenasys.git Add sudoers file for check_osrf Nagios/Icinga The opensrf user needs permission to run the nagios check, so add that to sudoers.d. --- diff --git a/GenaSYS.sh b/GenaSYS.sh index e988621..675e3e4 100755 --- a/GenaSYS.sh +++ b/GenaSYS.sh @@ -2876,6 +2876,7 @@ echo 'cp "${WD}/monitoring/check_postgres.pl" "/usr/lib/nagios/plugins"' >>$TMPS echo 'cp "${WD}/monitoring/check_cpu.sh" "/usr/lib/nagios/plugins"' >>$TMPSETUPMONITOR echo 'cp "${WD}/monitoring/check_freemem" "/usr/lib/nagios/plugins"' >>$TMPSETUPMONITOR echo 'cp "${WD}/monitoring/check_osrf" "/usr/lib/nagios/plugins"' >>$TMPSETUPMONITOR +echo 'cp "${WD}/monitoring/check_osrf.sudoers" "/etc/sudoers.d"' >>$TMPSETUPMONITOR echo 'cp "${WD}/monitoring/nrpe_local.cfg" "/etc/nagios"' >>$TMPSETUPMONITOR chmod 755 $TMPSETUPMONITOR @@ -3108,6 +3109,7 @@ do cp $TEMPLATEDIR/monitor/check_postgres.pl ../setup_${SUBFOLDER}/monitoring cp $TEMPLATEDIR/monitor/check_cpu.sh ../setup_${SUBFOLDER}/monitoring cp $TEMPLATEDIR/monitor/check_osrf ../setup_${SUBFOLDER}/monitoring + cp $TEMPLATEDIR/monitor/check_osrf.sudoers ../setup_${SUBFOLDER}/monitoring cp -r $TEMPLATEDIR/apache2/websockets ../setup_${SUBFOLDER} touch ../setup_${SUBFOLDER}/.osrf_node sed -i "s^HOSTNAME^${SUBFOLDER}^g" ../setup_${SUBFOLDER}/debconf-settings diff --git a/templates/check_osrf.sudoers b/templates/check_osrf.sudoers deleted file mode 100644 index 4fcd354..0000000 --- a/templates/check_osrf.sudoers +++ /dev/null @@ -1 +0,0 @@ -nagios ALL=(root) NOPASSWD:/usr/lib/nagios/plugins/check_osrf diff --git a/templates/monitor/check_osrf.sudoers b/templates/monitor/check_osrf.sudoers new file mode 100644 index 0000000..4fcd354 --- /dev/null +++ b/templates/monitor/check_osrf.sudoers @@ -0,0 +1 @@ +nagios ALL=(root) NOPASSWD:/usr/lib/nagios/plugins/check_osrf