[mrtg] Monitoring Load

Matt Baer matt at baerconsult.com
Sun Sep 27 19:21:10 CEST 2009


Direct copy and paste output of that command: 

UCD-SNMP-MIB::laIndex.1 = INTEGER: 1 
UCD-SNMP-MIB::laIndex.2 = INTEGER: 2 
UCD-SNMP-MIB::laIndex.3 = INTEGER: 3 
UCD-SNMP-MIB::laNames.1 = STRING: Load-1 
UCD-SNMP-MIB::laNames.2 = STRING: Load-5 
UCD-SNMP-MIB::laNames.3 = STRING: Load-15 
UCD-SNMP-MIB::laLoad.1 = STRING: 0.57 
UCD-SNMP-MIB::laLoad.2 = STRING: 0.42 
UCD-SNMP-MIB::laLoad.3 = STRING: 0.36 
UCD-SNMP-MIB::laConfig.1 = STRING: 12.00 
UCD-SNMP-MIB::laConfig.2 = STRING: 12.00 
UCD-SNMP-MIB::laConfig.3 = STRING: 12.00 
UCD-SNMP-MIB::laLoadInt.1 = INTEGER: 56 
UCD-SNMP-MIB::laLoadInt.2 = INTEGER: 41 
UCD-SNMP-MIB::laLoadInt.3 = INTEGER: 35 
UCD-SNMP-MIB::laLoadFloat.1 = Opaque: Float: 0.570000 
UCD-SNMP-MIB::laLoadFloat.2 = Opaque: Float: 0.420000 
UCD-SNMP-MIB::laLoadFloat.3 = Opaque: Float: 0.360000 
UCD-SNMP-MIB::laErrorFlag.1 = INTEGER: noError(0) 
UCD-SNMP-MIB::laErrorFlag.2 = INTEGER: noError(0) 
UCD-SNMP-MIB::laErrorFlag.3 = INTEGER: noError(0) 
UCD-SNMP-MIB::laErrMessage.1 = STRING: 
UCD-SNMP-MIB::laErrMessage.2 = STRING: 
UCD-SNMP-MIB::laErrMessage.3 = STRING: 

----- Original Message ----- 
From: "Freddie Cash" <fjwcash at gmail.com> 
To: "Matt Baer" <matt at baerconsult.com> 
Sent: Friday, September 25, 2009 11:53:27 PM GMT -06:00 US/Canada Central 
Subject: Re: [mrtg] Monitoring Load 

Hrm, if you do "snmpwalk -v2 -c public server.wherever.com la" what do you get back? 

Replace "public" with your SNMP community string. 

It sounds like either net-snmp on the remote server doesn't support the la MIB or MRTG on the monitoring server doesn't support the la MIB. 




On Fri, Sep 25, 2009 at 4:46 PM, Matt Baer < matt at baerconsult.com > wrote: 




No go 

Unknown SNMP var laLoad.1 
at /usr/bin/mrtg line 2207 
Unknown SNMP var laLoad.3 
at /usr/bin/mrtg line 2207 
2009-09-25 18:45:01: WARNING: Expected a number but got '36 days, 1:11:51' 
2009-09-25 18:45:01: WARNING: Expected a number but got ' domain name ' <~~~~Weird 
2009-09-25 18:45:13: ERROR: Target[mailserv.load][_IN_] ' $target->[40]{$mode} ' did not eval into defined data 
2009-09-25 18:45:13: ERROR: Target[mailserv.load][_OUT_] ' $target->[40]{$mode} ' did not eval into defined data 



----- Original Message ----- 
From: "Freddie Cash" < fjwcash at gmail.com > 
To: "Matt Baer" < matt at baerconsult.com > 



Sent: Friday, September 25, 2009 5:50:29 PM GMT -06:00 US/Canada Central 
Subject: Re: [mrtg] Monitoring Load 


On Fri, Sep 25, 2009 at 3:48 PM, Freddie Cash < fjwcash at gmail.com > wrote: 


Your syntax is incorrect. You need 2 OIDs per Target line (an "in" value and an "out" value) 


If you don't want to graph two IODs, use the same value for both in the Target[] 
Target[server.wherever_load]: laLoad.3&laLoad.3:public at server.wherever 


Then you can disable the "out" value on the graph, so it only shows one line: 

Options[server.wherever_load]: noo 

















Here's a snippet from one of our targets: 



# 1 and 15 minute load averages 
Target[server.whereever_load]: laLoad.1&laLoad.3:public at server.wherever 
SetEnv[server.wherever_load]: MRTG_INT_DESCR="System: Load Avgs" 
Title[server.aberdeen.wherever_load]: System: Load Avgs 
MaxBytes[server.wherever_load]: 100 
ShortLegend[server.wherever_load]: 
YLegend[server.wherever_load]: Load Avgs 
Legend1[server.wherever_load]: 1-min: 
Legend2[server.wherever_load]: 15-min: 
Legend3[server.wherever_load]: Peak 1-min: 
Legend4[server.wherever_load]: Peak 15-min: 
LegendI[server.wherever_load]: 1-min: 
LegendO[server.wherever_load]: 15-min: 
Options[server.wherever_load]: nopercent gauge 








On Fri, Sep 25, 2009 at 3:13 PM, Matt Baer < matt at baerconsult.com > wrote: 




I did just laLoad.3 and got the following: 

2009-09-25 17:10:13: ERROR: Target[mailserv.load][_IN_] 'laLoad. $target->[40]{$mode} ' (eval): Bareword "laLoad" not allowed while "strict subs" in use at (eval 80) line 1. 

2009-09-25 17:10:13: ERROR: Target[mailserv.load][_OUT_] 'laLoad. $target->[40]{$mode} ' (eval): Bareword "laLoad" not allowed while "strict subs" in use at (eval 81) line 1. 

In my logs. This is what the relevant portion of my .cfg file looks like: 

################################################################################ 
# Hopefully Load for Mail Server 
################################################################################ 

Target[mailserv.load]: laLoad.3:public at 10.0.0.10 
Title[mailserv.load]: Load - Mail Server 
PageTop[mailserv.load]: <H1>Load - Mail Server</H1> 
MaxBytes[mailserv.load]: 15 
ShortLegend[mailserv.load]: 
YLegend[mailserv.load]: Load 
LegendI[mailserv.load]: In 
LegendO[mailserv.load]: 
Legend1[mailserv.load]: Load 
Legend2[mailserv.load]: 
Options[mailserv.load]: nopercent,gauge 


I did a search of the entire .cfg file and did not find the string "strict subs" at all in it. What gives? 



----- Original Message ----- 
From: "Freddie Cash" < fjwcash at gmail.com > 
To: "Matt Baer" < matt at baerconsult.com > 



Cc: "mrtg" < mrtg at lists.oetiker.ch > 
Sent: Friday, September 25, 2009 4:45:14 PM GMT -06:00 US/Canada Central 
Subject: Re: [mrtg] Monitoring Load 


On Fri, Sep 25, 2009 at 2:41 PM, Matt Baer < matt at baerconsult.com > wrote: 




I'm not really sure how to use cfgmaker templates. I'm kinda learning these things as I need them. Is there a way to just plug in an OID or something? 




Just install and enabled net-snmp on the target server. And tell MRTG to graph: 
laLoad.1 for 1-min 
laLoad.3 for 5-min 
laLoad.3 for 15-min averages. 














----- Original Message ----- 
From: "Steve Shipway" < s.shipway at auckland.ac.nz > 
To: "Matt Baer" < matt at baerconsult.com >, "mrtg" < mrtg at lists.oetiker.ch > 
Sent: Friday, September 25, 2009 3:50:49 AM GMT -06:00 US/Canada Central 
Subject: RE: [mrtg] Monitoring Load 


If you are using SNMP, then the cfgmaker generic host template available at http://www.steveshipway.org/cfgmaker will do the trick nicely. 

Make sure you use the 5-min load average, not the 1-min or 15-min, if you are polling at 5-min frequency (but use the 1-min if you are polling at 1-min frequency, of course) 

If you cannot use SNMP, then you might like to use the Nagios NRPE agent with the check_load plugin, then use the mrtg-nrpe plugin for MRTG to allow MRTG to query the values fomr the Nagios agent. mrtg-nrpe is in the 'extras' directory of the standard Routers2 package from http://www.steveshipway.org/software - this is the way we do it here. 

Steve 


From: mrtg-bounces at lists.oetiker.ch [ mrtg-bounces at lists.oetiker.ch ] On Behalf Of Matt Baer [ matt at baerconsult.com ] 
Sent: Friday, 25 September 2009 6:15 p.m. 
To: mrtg 
Subject: [mrtg] Monitoring Load 




I'm trying to monitor the load of some Linux servers. I've tried a number of different scripts and can't find anything with the glorious Google method. Does anyone have a working method to monitor load on some Linux machines? 

_______________________________________________ 
mrtg mailing list 
mrtg at lists.oetiker.ch 
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg 




-- 
Freddie Cash 
fjwcash at gmail.com 



-- 

Freddie Cash 
fjwcash at gmail.com 



-- 
Freddie Cash 
fjwcash at gmail.com 

_______________________________________________ 
mrtg mailing list 
mrtg at lists.oetiker.ch 
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg 




-- 
Freddie Cash 
fjwcash at gmail.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20090927/312e98dd/attachment-0001.htm 


More information about the mrtg mailing list