pkgsrc/net/nagios-plugin-snmp_environment/patches/patch-aa
wiz 55d2756f5c net/nagios-plugin-snmp_environment: import nagios-plugin-snmp_environment-0.7nb1
Packaged for wip by Edgar Fuß.

Nagios plugin to check various hardware environmental sensors, like power
supply's, fans, cards, modules etc. Cisco, Nokia, BlueCoat, IronPort, Foundry,
Linux, Extreme, Juniper, HP ProCurve, NetScreen, Citrix and Transmode.

Supported Checks:
cisco	  Cisco Systems: Fan, power-supply, voltage, temperature
ciscoSW	  Cisco Systems: Card and module status check
ciscoNEW  Cisco Systems: Sensor check for devices that have the
	   CISCO-ENTITY-SENSOR-MIB
nokia	  Nokia IP: Fan, power-supply
bc	  Blue Coat Systems: Fan, power-supply, voltage, disk
iron	  IronPort: Fan, power-supply, temperature
foundry	  Foundry Network: power supply, temperature
linux	  lm-sensors: Fan, voltage, temperature, misc
extremeSW Extreme Networks: Slot, power-supply, fan, temperature
juniper	  Juniper Networks: Component status check
procurve  HP ProCurve: Fan, power-supply, temperature
netscreen NetScreen: Slot, fan, power-supply
citrix	  Citrix NetScaler: Fan, voltage, temperture, HA state, SSL engine
transmode Transmode Systems: Check alarm table that is not deactivated and
	   not acknowledged
2021-02-10 15:06:04 +00:00

39 lines
1.4 KiB
Text

$NetBSD: patch-aa,v 1.1 2021/02/10 15:06:04 wiz Exp $
Don't warn for non-present power supplies
--- check_snmp_environment.pl.orig 2016-11-08 11:39:49.000000000 +0100
+++ check_snmp_environment.pl 2016-11-08 11:42:56.000000000 +0100
@@ -273,7 +273,7 @@
my $extreme_ps_table = "1.3.6.1.4.1.1916.1.1.1.27.1";
my $extreme_ps_status = "1.3.6.1.4.1.1916.1.1.1.27.1.2";
my @extreme_ps_status_text = ("--Invalid--","notPresent","presentOK","presentNotOK");
-my @extreme_ps_nagios = (3,1,0,2);
+my @extreme_ps_nagios = (3,0,0,2);
my $extreme_fan_table = "1.3.6.1.4.1.1916.1.1.1.9.1";
my $extreme_fan_number = "1.3.6.1.4.1.1916.1.1.1.9.1.1";
my $extreme_fan_operational = "1.3.6.1.4.1.1916.1.1.1.9.1.2";
@@ -1753,14 +1753,16 @@
$tmp_status = $extreme_ps_nagios[$ps_status];
$final_status = &set_status($tmp_status,$final_status);
- if ($tmp_status == 0) {
- $num_ps_ok++;
- }
+ if ($ps_status != 1) {
+ if ($tmp_status == 0) {
+ $num_ps_ok++;
+ }
- else {
- if ($ps_output ne "") {$ps_output.=", ";}
- $ps_output.= "(Power-supply status: " . $ps_status_text . ")";
- }
+ else {
+ if ($ps_output ne "") {$ps_output.=", ";}
+ $ps_output.= "(Power-supply status: " . $ps_status_text . ")";
+ }
+ }
}
}
if ($ps_output ne "") {$ps_output.=", ";}