Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_sentry3
0.1
2012-09-25
- Nagios 3.x
GPL
53571
File | Description |
---|---|
check_sentry3 | PNP4Nagios Template |
gauge_single_rrd_one_chart_per_rra.php | gauge_single_rrd_one_chart_per_rra.php |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
1) Environmental temperature (Auto-detects all sensors)
2) Environmental humidity (Auto-detects all sensors)
3) Input power (Auto-detects all input feeds)
This program is a Nagios check the monitors servertech PDU / CDU devices using the Sentry3.mib MIB
It checks the following:
1) Environmental temperature (Auto-detects all sensors)
2) Environmental humidity (Auto-detects all sensors)
3) Input power (Auto-detects all input feeds)
Prerequisite Perl modules:
Net::SNMP
Nagios::Plugin
Though Net::SNMP may be installable using package systems such as yum or apt. Both plugins may have to be done by hand like this:
# perl -MCPAN -e 'install Nagios::Plugin'
# perl -MCPAN -e 'install Net::SNMP'
It checks the following:
1) Environmental temperature (Auto-detects all sensors)
2) Environmental humidity (Auto-detects all sensors)
3) Input power (Auto-detects all input feeds)
Prerequisite Perl modules:
Net::SNMP
Nagios::Plugin
Though Net::SNMP may be installable using package systems such as yum or apt. Both plugins may have to be done by hand like this:
# perl -MCPAN -e 'install Nagios::Plugin'
# perl -MCPAN -e 'install Net::SNMP'
Reviews (1)
bymikecook, August 6, 2013
0 of 1 people found this review helpful
@@ -12,9 +12,10 @@
# Prerequisite Perl modules:
#
# Net::SNMP
-# Nagios::Plugin
+# Nagios::Plugin (version 0.36 or later)
#
# Though Net::SNMP may be installable using package systems such as
yum or apt,
+# if you don't have Nagios::Plugin packaged at version 0.36 or later,
# Nagios::Plugin may have to be done by hand like this:
#
# $ perl -MCPAN -e 'install Nagios::Plugin'
@@ -193,7 +194,19 @@ sub nagios_report {
$count +=1;
# Define the values we are going to test against
- $nagios_value[$count] = sprintf("%.2f",$poll_results{$key});
+ # Do this after "$count +=1" so we can correctly index results to
exact sensors.
+ # If only humidity sensor "1" and "3" are plugged in don't show
result for "2".
+ # e.g "SERVERTECH_HUMIDITY WARNING - Humidity1 @ 39.00%,
Humidity3 @ 41.00%
+ # | Humidity1=39.00%;30;85 Humidity3=41.00%;30;85".
+ # This also prevents perf data shifting to a new key if you add
a sensor.
+ if ($poll_results{$key} >= 0){
+ $nagios_value[$count] = sprintf("%.2f",$poll_results{$key});
+ } else {
+ # Don't add negative numbers to @nagios_value that cause
Nagios::Plugin::Range
+ # (via check_threshold) test to fail.
+ # Also don't add empty sensor data to the perf hashes.
+ next;
+ }
# Process the value
if ($cmd_flags{do_temp}){
@@ -255,6 +268,9 @@ sub nagios_report {
}
}
+ # remove undefs now that $message has sensor postions set by
$nagios_value[$count]
+ @nagios_value = grep defined, @nagios_value;
+
# Remove trailing comma from $message
$message =~ s/\,+\s+$//g;
@@ -554,9 +570,10 @@ print STDERR << "EOF";
Prerequisite Perl modules:
Net::SNMP
- Nagios::Plugin
+ Nagios::Plugin (version 0.36 or later)
Though Net::SNMP may be installable using package systems such
as yum or apt,
+ if you don't have Nagios::Plugin packaged at version 0.36 or later,
Nagios::Plugin may have to be done by hand like this:
# perl -MCPAN -e 'install Nagios::Plugin'
# Prerequisite Perl modules:
#
# Net::SNMP
-# Nagios::Plugin
+# Nagios::Plugin (version 0.36 or later)
#
# Though Net::SNMP may be installable using package systems such as
yum or apt,
+# if you don't have Nagios::Plugin packaged at version 0.36 or later,
# Nagios::Plugin may have to be done by hand like this:
#
# $ perl -MCPAN -e 'install Nagios::Plugin'
@@ -193,7 +194,19 @@ sub nagios_report {
$count +=1;
# Define the values we are going to test against
- $nagios_value[$count] = sprintf("%.2f",$poll_results{$key});
+ # Do this after "$count +=1" so we can correctly index results to
exact sensors.
+ # If only humidity sensor "1" and "3" are plugged in don't show
result for "2".
+ # e.g "SERVERTECH_HUMIDITY WARNING - Humidity1 @ 39.00%,
Humidity3 @ 41.00%
+ # | Humidity1=39.00%;30;85 Humidity3=41.00%;30;85".
+ # This also prevents perf data shifting to a new key if you add
a sensor.
+ if ($poll_results{$key} >= 0){
+ $nagios_value[$count] = sprintf("%.2f",$poll_results{$key});
+ } else {
+ # Don't add negative numbers to @nagios_value that cause
Nagios::Plugin::Range
+ # (via check_threshold) test to fail.
+ # Also don't add empty sensor data to the perf hashes.
+ next;
+ }
# Process the value
if ($cmd_flags{do_temp}){
@@ -255,6 +268,9 @@ sub nagios_report {
}
}
+ # remove undefs now that $message has sensor postions set by
$nagios_value[$count]
+ @nagios_value = grep defined, @nagios_value;
+
# Remove trailing comma from $message
$message =~ s/\,+\s+$//g;
@@ -554,9 +570,10 @@ print STDERR << "EOF";
Prerequisite Perl modules:
Net::SNMP
- Nagios::Plugin
+ Nagios::Plugin (version 0.36 or later)
Though Net::SNMP may be installable using package systems such
as yum or apt,
+ if you don't have Nagios::Plugin packaged at version 0.36 or later,
Nagios::Plugin may have to be done by hand like this:
# perl -MCPAN -e 'install Nagios::Plugin'