From 55cb01870b11f0afa03c94b73354fb0f39c1f273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Thu, 23 Aug 2012 08:16:50 -0700 Subject: [PATCH] snmp__apc: have a static title for the graph. Instead of adding model and serial number to the graph itself, use a static title for it and instead provide the model and serial number as part of graph_info. This change makes it much easier to forward the warning/critical statuses back to Icinga (or Nagios), where you have to match the graph title. --- plugins/snmp/snmp__apc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/snmp/snmp__apc b/plugins/snmp/snmp__apc index 0e9cca13..36185d67 100755 --- a/plugins/snmp/snmp__apc +++ b/plugins/snmp/snmp__apc @@ -81,9 +81,10 @@ if ($ARGV[0] and $ARGV[0] eq "config") { my $modelNo = $session->get_single($oidModelNo); my $serialNo = $session->get_single($oidSerialNo); - print "graph_title PDU $modelNo ($serialNo)\n"; - print "graph_vlabel Current drained (A)\n"; + print "graph_title PDU Current Drain\n"; + print "graph_vlabel Ampere\n"; print "graph_category Sensors\n"; + print "graph_info This graph is for $modelNo PDU serial $serialNo\n" for( my $phaseIndex = 1; $phaseIndex <= $numPhases; $phaseIndex++ ) { my $nearOverloadThreshold = $session->get_single($oidNearOverloadThreshold . $phaseIndex);