From d470ea8c1cda89bd1ddfea1dff5d91ca992a271c2f5f11b524197e97b68a4ab0 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Wed, 3 Oct 2018 14:12:46 +0000 Subject: [PATCH] - add /etc/nrpe.d/*.cfg snipplets for + nrpe-check_load => check_load + nrpe-check_mailq => check_mailq + nrpe-check_ntp_time => check_ntp_time OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=51 --- monitoring-plugins.changes | 8 ++++++++ monitoring-plugins.spec | 17 ++++++++++++++++- nrpe-check_load | 1 + nrpe-check_mailq | 1 + nrpe-check_ntp_time | 1 + 5 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 nrpe-check_load create mode 100644 nrpe-check_mailq create mode 100644 nrpe-check_ntp_time diff --git a/monitoring-plugins.changes b/monitoring-plugins.changes index 2d6adad..d4e82ae 100644 --- a/monitoring-plugins.changes +++ b/monitoring-plugins.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Oct 3 14:11:51 UTC 2018 - lars@linux-schulserver.de + +- add /etc/nrpe.d/*.cfg snipplets for + + nrpe-check_load => check_load + + nrpe-check_mailq => check_mailq + + nrpe-check_ntp_time => check_ntp_time + ------------------------------------------------------------------- Fri Aug 10 00:48:01 CEST 2018 - ro@suse.de diff --git a/monitoring-plugins.spec b/monitoring-plugins.spec index 41751b7..897062e 100644 --- a/monitoring-plugins.spec +++ b/monitoring-plugins.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -49,6 +49,9 @@ Source32: usr.lib.nagios.plugins.check_procs Source33: usr.lib.nagios.plugins.check_swap Source34: usr.lib.nagios.plugins.check_users Source35: usr.lib.nagios.plugins.check_procs.sle15 +Source50: nrpe-check_mailq +Source51: nrpe-check_load +Source52: nrpe-check_ntp_time # PATCH-FIX-UPSTREAM Quote the options comming in from users (path names might contain whitespaces) Patch1: %{name}-2.1.1-check_logfile.patch # PATCH-FIX-OPENSUSE do not use chown in Makefile (not possible when building as normal user) @@ -1184,6 +1187,12 @@ install -m 644 %{SOURCE32} %{buildroot}%{_sysconfdir}/apparmor.d/ install -m 644 %{SOURCE33} %{buildroot}%{_sysconfdir}/apparmor.d/ install -m 644 %{SOURCE34} %{buildroot}%{_sysconfdir}/apparmor.d/ +# install nrpe snipplets +mkdir -p %{buildroot}%{nrpe_sysconfdir} +install -m 644 %{SOURCE50} %{buildroot}%{nrpe_sysconfdir}/check_mailq.cfg +install -m 644 %{SOURCE51} %{buildroot}%{nrpe_sysconfdir}/check_load.cfg +install -m 644 %{SOURCE52} %{buildroot}%{nrpe_sysconfdir}/check_ntp_time.cfg + # inform the users about the deprecated monitoring-plugins-extras package cat >> README.SUSE-deprecated << EOF The monitoring-plugins-extras package is deprecated. @@ -1419,7 +1428,9 @@ fi %files load %defattr(0755,root,root) %dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} %{nagios_plugindir}/check_load +%config(noreplace) %{nrpe_sysconfdir}/check_load.cfg %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_load %files log @@ -1429,7 +1440,9 @@ fi %files mailq %defattr(0755,root,root) %dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} %{nagios_plugindir}/check_mailq +%config(noreplace) %{nrpe_sysconfdir}/check_mailq.cfg %files mrtg %defattr(0755,root,root) @@ -1465,9 +1478,11 @@ fi %files ntp_time %defattr(0755,root,root) %dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} %{nagios_plugindir}/check_ntp %{nagios_plugindir}/check_ntp_time %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_ntp_time +%config(noreplace) %{nrpe_sysconfdir}/check_ntp_time.cfg %files nwstat %defattr(0755,root,root) diff --git a/nrpe-check_load b/nrpe-check_load new file mode 100644 index 0000000..5bfb2a1 --- /dev/null +++ b/nrpe-check_load @@ -0,0 +1 @@ +command[check_load]=/usr/lib/nagios/plugins/check_load -w 10,6,5 -c 15,10,8 diff --git a/nrpe-check_mailq b/nrpe-check_mailq new file mode 100644 index 0000000..773400f --- /dev/null +++ b/nrpe-check_mailq @@ -0,0 +1 @@ +command[check_mailq]=/usr/lib/nagios/plugins/check_mailq -c 50 -w 30 -M postfix diff --git a/nrpe-check_ntp_time b/nrpe-check_ntp_time new file mode 100644 index 0000000..9a5a053 --- /dev/null +++ b/nrpe-check_ntp_time @@ -0,0 +1 @@ +command[check_ntp_time]=/usr/lib/nagios/plugins/check_ntp_time -H pool.ntp.org -w 1 -c 2