diff options
author | wiz <wiz@pkgsrc.org> | 2021-02-10 15:06:04 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2021-02-10 15:06:04 +0000 |
commit | d888e6475f6b7e4fba13031df2b2841c58b9eb0b (patch) | |
tree | f7b7afb667c4f6d74a45be6a346438e0f2e6e3b2 /net | |
parent | db57160a515431416d48f13c8d66d18aac65ca40 (diff) | |
download | pkgsrc-d888e6475f6b7e4fba13031df2b2841c58b9eb0b.tar.gz |
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
Diffstat (limited to 'net')
-rw-r--r-- | net/nagios-plugin-snmp_environment/DESCR | 21 | ||||
-rw-r--r-- | net/nagios-plugin-snmp_environment/Makefile | 39 | ||||
-rw-r--r-- | net/nagios-plugin-snmp_environment/PLIST | 2 | ||||
-rw-r--r-- | net/nagios-plugin-snmp_environment/distinfo | 7 | ||||
-rw-r--r-- | net/nagios-plugin-snmp_environment/patches/patch-aa | 39 |
5 files changed, 108 insertions, 0 deletions
diff --git a/net/nagios-plugin-snmp_environment/DESCR b/net/nagios-plugin-snmp_environment/DESCR new file mode 100644 index 00000000000..de8c0f1e595 --- /dev/null +++ b/net/nagios-plugin-snmp_environment/DESCR @@ -0,0 +1,21 @@ +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 diff --git a/net/nagios-plugin-snmp_environment/Makefile b/net/nagios-plugin-snmp_environment/Makefile new file mode 100644 index 00000000000..e2a93f797ac --- /dev/null +++ b/net/nagios-plugin-snmp_environment/Makefile @@ -0,0 +1,39 @@ +# $NetBSD: Makefile,v 1.1 2021/02/10 15:06:04 wiz Exp $ + +DISTNAME= check_snmp_environment.pl +VERSION= 0.7 +PKGREVISION= 1 +PKGNAME= nagios-plugin-snmp_environment-${VERSION} +CATEGORIES= net sysutils +MASTER_SITES= -https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=483&cf_id=24 +EXTRACT_SUFX= # empty +DIST_SUBDIR= check_snmp_environment-${VERSION} + +COMMENT= Check various hardware environmental sensors +HOMEPAGE= https://exchange.nagios.org/directory/Plugins/Hardware/Network-Gear/Cisco/Check-various-hardware-environmental-sensors/details +LICENSE= gnu-gpl-v3 + +USE_LANGUAGES= # empty +USE_TOOLS+= perl:run + +DEPENDS+= net-snmp-[0-9]*:../../net/net-snmp + +WRKSRC= ${WRKDIR} + +do-extract: + ${CP} ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME} ${WRKSRC} + +PLUGINDIR= libexec/nagios +PLIST_SUBST+= PLUGINDIR=${PLUGINDIR} + +INSTALLATION_DIRS+= ${PLUGINDIR} + +REPLACE_PERL+= check_snmp_environment.pl + +NO_BUILD= YES + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/check_snmp_environment.pl ${DESTDIR}${PREFIX}/${PLUGINDIR}/check_snmp_environment + +.include "../../mk/bsd.prefs.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/net/nagios-plugin-snmp_environment/PLIST b/net/nagios-plugin-snmp_environment/PLIST new file mode 100644 index 00000000000..4e72eed663e --- /dev/null +++ b/net/nagios-plugin-snmp_environment/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1 2021/02/10 15:06:04 wiz Exp $ +${PLUGINDIR}/check_snmp_environment diff --git a/net/nagios-plugin-snmp_environment/distinfo b/net/nagios-plugin-snmp_environment/distinfo new file mode 100644 index 00000000000..3ead42739d2 --- /dev/null +++ b/net/nagios-plugin-snmp_environment/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2021/02/10 15:06:04 wiz Exp $ + +SHA1 (check_snmp_environment-0.7/check_snmp_environment.pl) = b73ce7ea9b4170aa3aba74571ca1745d1c385936 +RMD160 (check_snmp_environment-0.7/check_snmp_environment.pl) = 256eedb5c6241cdfe1d579a24665815a58f5081d +SHA512 (check_snmp_environment-0.7/check_snmp_environment.pl) = dbb128a5820c15d27076094d39c04ca52ec527beb44289a8261833d7cbe7ee2079f70cbff9210e3043f3e0df05c7b142c9fc0be2b46eee468bfc327953b0079a +Size (check_snmp_environment-0.7/check_snmp_environment.pl) = 97676 bytes +SHA1 (patch-aa) = 880a70b25a6b3c6e9b39c108d8261d4f4de7d1c5 diff --git a/net/nagios-plugin-snmp_environment/patches/patch-aa b/net/nagios-plugin-snmp_environment/patches/patch-aa new file mode 100644 index 00000000000..3a3eed3cf88 --- /dev/null +++ b/net/nagios-plugin-snmp_environment/patches/patch-aa @@ -0,0 +1,39 @@ +$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.=", ";} |