From ea05b569712970fccd1795c5d08b837ccabbff3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B3mas=20Edwardsson?= Date: Thu, 25 Nov 2010 23:49:26 +0000 Subject: [PATCH] check_time packaged --- check_time/trunk/nagios-okplugin-time.spec | 44 ++++++++++++++++++++++ check_time/trunk/nrpe.d/check_time.cfg | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 check_time/trunk/nagios-okplugin-time.spec diff --git a/check_time/trunk/nagios-okplugin-time.spec b/check_time/trunk/nagios-okplugin-time.spec new file mode 100644 index 0000000..cbac753 --- /dev/null +++ b/check_time/trunk/nagios-okplugin-time.spec @@ -0,0 +1,44 @@ +%define debug_package %{nil} + +Summary: A Nagios plugin to compare time on remote host with localhost +Name: nagios-okplugin-time +Version: AUTOVERSION +Release: 1%{?dist} +License: GPLv2+ +Group: Applications/System +URL: http://opensource.is/trac/wiki/check_time +Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_time/releases/nagios-okplugin-check_time-%{version}.tar.gz +Requires: nagios-nrpe +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Packager: Pall Sigurdsson + + + +%description +A Nagios plugin to compare time on remote host with localhos + + +%prep +%setup -q +perl -pi -e "s|/usr/lib|%{_libdir}|g" nrpe.d/check_time.cfg + +%build + + +%install +rm -rf %{buildroot} +install -D -p -m 0755 check_time %{buildroot}%{_libdir}/nagios/plugins/check_time +install -D -p -m 0755 nrpe.d/check_time.cfg %{buildroot}/etc/nrpe.d/check_time.cfg + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc README LICENSE +%{_libdir}/nagios/plugins/* +/etc/nrpe.d/check_time.cfg + +%changelog +* Thu Nov 25 2010 Pall Sigurdsson 0.1-1 +- Initial packaging diff --git a/check_time/trunk/nrpe.d/check_time.cfg b/check_time/trunk/nrpe.d/check_time.cfg index f09c86f..b659388 100644 --- a/check_time/trunk/nrpe.d/check_time.cfg +++ b/check_time/trunk/nrpe.d/check_time.cfg @@ -1,4 +1,4 @@ # Connect to a remote host via nrpe and check time # warning and critical are in seconds -command[check_time]=/usr/lib/nagios/plugins/check_time -H $ARG1$ -w $ARG2$ -c $ARG3$ +command[check_time]=/usr/lib/nagios/plugins/check_time -H '$ARG1$' -w '$ARG2$' -c '$ARG3$'