packages: nagios-plugin-check_tftp/check_tftp.cfg (NEW), nagios-plugin-chec...
glen
glen at pld-linux.org
Tue Jul 27 22:18:31 CEST 2010
Author: glen Date: Tue Jul 27 20:18:31 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- new
---- Files affected:
packages/nagios-plugin-check_tftp:
check_tftp.cfg (NONE -> 1.1) (NEW), nagios-plugin-check_tftp.spec (NONE -> 1.1) (NEW), optparser.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/nagios-plugin-check_tftp/check_tftp.cfg
diff -u /dev/null packages/nagios-plugin-check_tftp/check_tftp.cfg:1.1
--- /dev/null Tue Jul 27 22:18:31 2010
+++ packages/nagios-plugin-check_tftp/check_tftp.cfg Tue Jul 27 22:18:26 2010
@@ -0,0 +1,20 @@
+# Usage:
+# check_tftp!-f pxelinux.0
+define command {
+ command_name check_tftp
+ command_line /usr/lib/nagios/plugins/check_tftp -H $HOSTADDRESS$ $ARG1$
+}
+
+define service {
+ use generic-service
+ name tftp
+ service_description tftp
+ register 0
+
+ normal_check_interval 5
+ retry_check_interval 1
+
+ notification_interval 10
+
+ check_command check_tftp
+}
================================================================
Index: packages/nagios-plugin-check_tftp/nagios-plugin-check_tftp.spec
diff -u /dev/null packages/nagios-plugin-check_tftp/nagios-plugin-check_tftp.spec:1.1
--- /dev/null Tue Jul 27 22:18:31 2010
+++ packages/nagios-plugin-check_tftp/nagios-plugin-check_tftp.spec Tue Jul 27 22:18:26 2010
@@ -0,0 +1,56 @@
+# $Revision$, $Date$
+%define plugin check_tftp
+Summary: Nagios plugin to check TFTP server
+Name: nagios-plugin-%{plugin}
+Version: 1.0
+Release: 1
+License: GPL v2
+Group: Networking
+Source0: http://oss.isg.inf.ethz.ch/nagiosplug/download/TFTP-%{version}.tgz
+# Source0-md5: 1a6afb28509681fb1178ef38b171852f
+Source1: %{plugin}.cfg
+Patch0: optparser.patch
+#Source1: %{plugin}.cfg
+URL: http://oss.isg.inf.ethz.ch/nagiosplug/
+Requires: nagios-common
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _noautoreq perl(utils)
+
+%define _sysconfdir /etc/nagios/plugins
+%define plugindir %{_prefix}/lib/nagios/plugins
+
+%description
+Nagios plugin to check if a file can be fetched from TFTP server.
+
+%prep
+%setup -q -n TFTP-%{version}
+%patch0 -p1
+
+# fix shebang
+%{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{plugin}.py
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
+install -p %{plugin}.py $RPM_BUILD_ROOT%{plugindir}/%{plugin}
+cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README VERSION
+%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
+%attr(755,root,root) %{plugindir}/%{plugin}
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2010/07/27 20:18:26 glen
+- new
================================================================
Index: packages/nagios-plugin-check_tftp/optparser.patch
diff -u /dev/null packages/nagios-plugin-check_tftp/optparser.patch:1.1
--- /dev/null Tue Jul 27 22:18:31 2010
+++ packages/nagios-plugin-check_tftp/optparser.patch Tue Jul 27 22:18:26 2010
@@ -0,0 +1,11 @@
+--- ./check_tftp.py~ 2010-07-27 23:11:00.000000000 +0300
++++ ./check_tftp.py 2010-07-27 23:11:08.415541629 +0300
+@@ -92,7 +92,7 @@
+ parser.add_option( "-t",
+ "--timeout",
+ dest="timeout",
+- default=15,
++ default="15",
+ help="Filename to fetch.")
+
+ parser.add_option( "-v",
================================================================
More information about the pld-cvs-commit
mailing list