packages: nagios-plugin-check_temperature/check_temperature.cfg (NEW), nagi...
glen
glen at pld-linux.org
Wed Sep 9 13:46:20 CEST 2009
Author: glen Date: Wed Sep 9 11:46:20 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- new
---- Files affected:
packages/nagios-plugin-check_temperature:
check_temperature.cfg (NONE -> 1.1) (NEW), paths.patch (NONE -> 1.1) (NEW), nagios-plugin-check_temperature.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/nagios-plugin-check_temperature/check_temperature.cfg
diff -u /dev/null packages/nagios-plugin-check_temperature/check_temperature.cfg:1.1
--- /dev/null Wed Sep 9 13:46:20 2009
+++ packages/nagios-plugin-check_temperature/check_temperature.cfg Wed Sep 9 13:46:15 2009
@@ -0,0 +1,25 @@
+# DigiTemp temperature check command
+# Options:
+# -s n DigiTemp Sensor #, default 0
+# -t temperature Target temperature in Centigrade, default 20
+# -w deviation Temperature deviation from target to warn (required)
+# -c deviation Temperature deviation from target when critical (required)
+define command {
+ command_name check_temperature
+ command_line $USER1/check_temperature $ARG1$
+}
+
+# DigiTemp Temperature check Service definition
+define service {
+ use generic-service
+ service_description Temperature
+ register 0
+
+ normal_check_interval 30
+ retry_check_interval 5
+ max_check_attempts 3
+
+ notification_interval 60
+
+ check_command check_temperature!-w 23 -c 32
+}
================================================================
Index: packages/nagios-plugin-check_temperature/paths.patch
diff -u /dev/null packages/nagios-plugin-check_temperature/paths.patch:1.1
--- /dev/null Wed Sep 9 13:46:20 2009
+++ packages/nagios-plugin-check_temperature/paths.patch Wed Sep 9 13:46:15 2009
@@ -0,0 +1,22 @@
+--- nagios-plugin-check_temperature/check_temperature~ 2009-02-07 21:52:06.000000000 +0200
++++ nagios-plugin-check_temperature/check_temperature 2009-09-09 13:15:21.881460640 +0300
+@@ -24,8 +24,8 @@
+ #
+ # Howto Install in Nagios (tested with v1.3)
+ #
+-# 0. Make sure that Digitemp works and temperatures are written to the file:
+-# /var/lib/temperature/current
++# 0. Make sure that Digitemp (or compatible) works and temperatures are written to the file:
++# /var/run/temperature.state
+ # as described at http://www.hoppie.nl/tempsens/ .
+ #
+ # 1. Copy this Perl script to /usr/local/nagios/libexec/ or wherever you have
+@@ -81,7 +81,7 @@
+ %exit_codes);
+
+ # Place to look for the temperature state file (may be customised here).
+-$temperature_state = '/var/lib/temperature/current';
++$temperature_state = '/var/run/temperature.state';
+
+ # Predefined exit codes for Nagios.
+ %exit_codes = ('UNKNOWN' ,-1,
================================================================
Index: packages/nagios-plugin-check_temperature/nagios-plugin-check_temperature.spec
diff -u /dev/null packages/nagios-plugin-check_temperature/nagios-plugin-check_temperature.spec:1.1
--- /dev/null Wed Sep 9 13:46:20 2009
+++ packages/nagios-plugin-check_temperature/nagios-plugin-check_temperature.spec Wed Sep 9 13:46:15 2009
@@ -0,0 +1,52 @@
+# $Revision$, $Date$
+%define plugin check_temperature
+Summary: Nagios plugin to check temperatures
+Name: nagios-plugin-%{plugin}
+Version: 1.1
+Release: 0.1
+License: BSD
+Group: Networking
+Source0: http://www.hoppie.nl/tempsens/check_temperature
+# Source0-md5: 52af8cf292537680f9a624e41d557edf
+Patch0: paths.patch
+Source1: %{plugin}.cfg
+URL: http://www.hoppie.nl/tempsens/
+Requires: nagios-core
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _sysconfdir /etc/nagios/plugins
+%define plugindir %{_prefix}/lib/nagios/plugins
+
+%description
+Nagios plugin to check temperatures using Digitemp (or compatible
+device).
+
+%prep
+%setup -qcT
+cp -p %{SOURCE0} %{plugin}
+%patch0 -p1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
+install -p %{plugin} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
+sed -e 's, at plugindir@,%{plugindir},' %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%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 2009/09/09 11:46:15 glen
+- new
+
================================================================
More information about the pld-cvs-commit
mailing list