diff --git a/conf/etc/nagios/nrpe.d/check_nrpe.conf b/conf/etc/nagios/nrpe.d/check_nrpe.conf new file mode 100644 index 0000000..973a8bc --- /dev/null +++ b/conf/etc/nagios/nrpe.d/check_nrpe.conf @@ -0,0 +1,23 @@ +################################################################################ +# BSD 3-Clause License +# +# Copyright (c) 2019, Alban Vidal +# All rights reserved. +# +# Please see license file on root of this directory +################################################################################ + +# !! GIT FILE !! +# https://framagit.org/zorval/scripts/check-nrpe + +################################################################################ + +# without sudo + +command[check_available_conntrack] = /usr/local/bin/check_available_conntrack + +# with sudo + +command[check_reboot] = sudo /usr/sbin/needrestart -p -k +command[check_restart] = sudo /usr/sbin/needrestart -p -l + diff --git a/conf/etc/sudoers.d/50-check_nrpe b/conf/etc/sudoers.d/50-check_nrpe new file mode 100644 index 0000000..56844c6 --- /dev/null +++ b/conf/etc/sudoers.d/50-check_nrpe @@ -0,0 +1,19 @@ +################################################################################ +# BSD 3-Clause License +# +# Copyright (c) 2019, Alban Vidal +# All rights reserved. +# +# Please see license file on root of this directory +################################################################################ + +# !! GIT FILE !! +# https://framagit.org/zorval/scripts/check-nrpe + +################################################################################ + +# sudo rules for nagios (NRPE) + +nagios ALL=(root:adm) NOPASSWD: \ + /usr/sbin/needrestart, \ + /usr/local/sbin/check_*