[Pkg-nagios-changes] [pkg-nagios] r1185 - in nagios-snmp-plugins/trunk/debian: . patches
Jan Wagner
waja-guest at alioth.debian.org
Fri Jul 6 20:34:17 UTC 2007
Author: waja-guest
Date: 2007-07-06 20:34:17 +0000 (Fri, 06 Jul 2007)
New Revision: 1185
Added:
nagios-snmp-plugins/trunk/debian/patches/
nagios-snmp-plugins/trunk/debian/patches/00list
nagios-snmp-plugins/trunk/debian/patches/01_check_snmp_env.dpatch
Modified:
nagios-snmp-plugins/trunk/debian/control
nagios-snmp-plugins/trunk/debian/rules
Log:
add dpatch infrastructure
Modified: nagios-snmp-plugins/trunk/debian/control
===================================================================
--- nagios-snmp-plugins/trunk/debian/control 2007-06-21 16:06:47 UTC (rev 1184)
+++ nagios-snmp-plugins/trunk/debian/control 2007-07-06 20:34:17 UTC (rev 1185)
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel at lists.alioth.debian.org>
Uploaders: Jan Wagner <waja at cyconet.org>
-Build-Depends: debhelper (>= 5)
+Build-Depends: debhelper (>= 5), dpatch
Standards-Version: 3.7.2
Package: nagios-snmp-plugins
Added: nagios-snmp-plugins/trunk/debian/patches/00list
===================================================================
--- nagios-snmp-plugins/trunk/debian/patches/00list (rev 0)
+++ nagios-snmp-plugins/trunk/debian/patches/00list 2007-07-06 20:34:17 UTC (rev 1185)
@@ -0,0 +1 @@
+01_check_snmp_env.dpatch
Added: nagios-snmp-plugins/trunk/debian/patches/01_check_snmp_env.dpatch
===================================================================
--- nagios-snmp-plugins/trunk/debian/patches/01_check_snmp_env.dpatch (rev 0)
+++ nagios-snmp-plugins/trunk/debian/patches/01_check_snmp_env.dpatch 2007-07-06 20:34:17 UTC (rev 1185)
@@ -0,0 +1,133 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 01_check_snmp_env.dpatch by Jan Wagner <waja at cyconet.org>
+##
+## DP: Fix some issues via cvs version
+
+ at DPATCH@
+
+--- old/check_snmp_env.pl 2007-07-04 09:46:55.000000000 +0200
++++ new/check_snmp_env.pl 2007-07-06 22:17:06.000000000 +0200
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w
+ ############################## check_snmp_env #################
+-# Version : 1.2
+-# Date : April 19 2007
++# Version : 1.3
++# Date : May 24 2007
+ # Author : Patrick Proy ( patrick at proy.org)
+ # Help : http://www.manubulon.com/nagios/
+ # Licence : GPL - http://www.fsf.org/licenses/gpl.txt
+@@ -145,9 +145,24 @@
+
+ my @foundry_status = (3,0,2); # oper status : 1:other, 2: Normal, 3: Failure
+
++# Linux Net-SNMP with LM-SENSORS
++my $linux_temp = "1.3.6.1.4.1.2021.13.16.2.1"; # temperature table
++my $linux_temp_descr = "1.3.6.1.4.1.2021.13.16.2.1.2"; # temperature entry description
++my $linux_temp_value = "1.3.6.1.4.1.2021.13.16.2.1.3"; # temperature entry value (mC)
++my $linux_fan = "1.3.6.1.4.1.2021.13.16.3.1"; # fan table
++my $linux_fan_descr = "1.3.6.1.4.1.2021.13.16.3.1.2"; # fan entry description
++my $linux_fan_value = "1.3.6.1.4.1.2021.13.16.3.1.3"; # fan entry value (RPM)
++my $linux_volt = "1.3.6.1.4.1.2021.13.16.4.1"; # voltage table
++my $linux_volt_descr = "1.3.6.1.4.1.2021.13.16.4.1.2"; # voltage entry description
++my $linux_volt_value = "1.3.6.1.4.1.2021.13.16.4.1.3"; # voltage entry value (mV)
++my $linux_misc = "1.3.6.1.4.1.2021.13.16.4.1"; # misc table
++my $linux_misc_descr = "1.3.6.1.4.1.2021.13.16.4.1.2"; # misc entry description
++my $linux_misc_value = "1.3.6.1.4.1.2021.13.16.4.1.3"; # misc entry value
++
++
+ # Globals
+
+-my $Version='1.2';
++my $Version='1.3';
+
+ my $o_host = undef; # hostname
+ my $o_community = undef; # community
+@@ -160,7 +175,7 @@
+ my $o_version2= undef; # use snmp v2c
+ # check type
+ my $o_check_type= "cisco"; # default Cisco
+-my @valid_types =("cisco","nokia","bc","iron","foundry");
++my @valid_types =("cisco","nokia","bc","iron","foundry","linux");
+ my $o_temp= undef; # max temp
+ my $o_fan= undef; # min fan speed
+
+@@ -177,7 +192,7 @@
+ sub p_version { print "check_snmp_env version : $Version\n"; }
+
+ sub print_usage {
+- print "Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -T (cisco|nokia|bc|iron|foundry) [-F <rpm>] [-c <celcius>] [-f] [-t <timeout>] [-V]\n";
++ print "Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -T (cisco|nokia|bc|iron|foundry|linux) [-F <rpm>] [-c <celcius>] [-f] [-t <timeout>] [-V]\n";
+ }
+
+ sub isnnum { # Return true if arg is not a number
+@@ -221,17 +236,18 @@
+ -P, --port=PORT
+ SNMP port (Default 161)
+ -T, --type=cisco|nokia|bc|iron|foundry
+- Environemental check :
+- cisco : voltage,temp,fan,power supply status
+- will try to check everything present
+- nokia : fan and power supply
+- bc : fans, power supply, voltage, disks
+- iron : fans, power supply, temp
+- foundry : power supply, temp
++ Environemental check :
++ cisco : All Cisco equipements : voltage,temp,fan,power supply
++ (will try to check everything in the env mib)
++ nokia : Nokia IP platforms : fan and power supply
++ bc : BlueCoat platforms : fans, power supply, voltage, disks
++ iron : IronPort platforms : fans, power supply, temp
++ foundry : Foundry Network platforms : power supply, temp
++ linux : Net-SNMP with LM-SENSORS : temp, fan, volt, misc
+ -F, --fan=<rpm>
+- Minimum fan rpm value
++ Minimum fan rpm value (only needed for 'iron' & 'linux')
+ -c, --celcius=<celcius>
+- Maximum temp in degree celcius
++ Maximum temp in degree celcius (only needed for 'iron' & 'linux')
+ -f, --perfparse
+ Perfparse compatible output
+ -t, --timeout=INTEGER
+@@ -428,8 +444,10 @@
+ if (!defined ($cur_status)) { ### Error TODO
+ $volt_global=1;
+ }
+- $perf_output.=" '".$$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]}."'=" ;
+- $perf_output.=$$resultat{$ciscoVoltageTableValue."." . $voltindex[$i]};
++ if (defined($$resultat{$ciscoVoltageTableValue."." . $voltindex[$i]})) {
++ $perf_output.=" '".$$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]}."'=" ;
++ $perf_output.=$$resultat{$ciscoVoltageTableValue."." . $voltindex[$i]};
++ }
+ if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") {
+ $volt_global= 1;
+ $volt_status{$$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]}}=$cur_status;
+@@ -448,8 +466,10 @@
+ if (!defined ($cur_status)) { ### Error TODO
+ $temp_global=1;
+ }
+- $perf_output.=" '".$$resultat{$ciscoTempTableDesc .".".$tempindex[$i]}."'=" ;
+- $perf_output.=$$resultat{$ciscoTempTableValue."." . $tempindex[$i]};
++ if (defined($$resultat{$ciscoTempTableValue."." . $tempindex[$i]})) {
++ $perf_output.=" '".$$resultat{$ciscoTempTableDesc .".".$tempindex[$i]}."'=" ;
++ $perf_output.=$$resultat{$ciscoTempTableValue."." . $tempindex[$i]};
++ }
+ if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") {
+ $temp_global= 1;
+ $temp_status{$$resultat{$ciscoTempTableDesc .".".$tempindex[$i]}}=$cur_status;
+@@ -1003,4 +1023,14 @@
+
+ }
+
+-exit (3);
++########### Cisco env checks ##############
++if ($o_check_type eq "linux") {
++
++ verb("Checking linux env");
++
++ print "Not implemented yet : UNKNOWN\n";
++ exit $ERRORS{"UNKNOWN"};
++}
++
++print "Unknown check type : UNKNOWN\n";
++exit $ERRORS{"UNKNOWN"};
Modified: nagios-snmp-plugins/trunk/debian/rules
===================================================================
--- nagios-snmp-plugins/trunk/debian/rules 2007-06-21 16:06:47 UTC (rev 1184)
+++ nagios-snmp-plugins/trunk/debian/rules 2007-07-06 20:34:17 UTC (rev 1185)
@@ -3,6 +3,8 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+include /usr/share/dpatch/dpatch.make
+
COMMANDDEFPATH:=/etc/nagios-plugins/config/
NP_DIR:=debian/nagios-snmp-plugins
NP_TEMPLATES:=$(NP_DIR)/usr/share/nagios-snmp-plugins/pluginconfig
@@ -11,9 +13,9 @@
plugin_cfgs:=snmp_cpfw snmp_env snmp_int snmp_load snmp_mem snmp_process \
snmp_storage snmp_vrrp snmp_win
-build:
+build: patch-stamp
-clean:
+clean: unpatch
dh_testdir
dh_testroot
More information about the Pkg-nagios-changes
mailing list