[mrtg] MRTG Not updating after upgrade

Noob Centos Admin centos.admin at gmail.com
Sun Jul 12 17:53:45 CEST 2009


On Sun, Jul 12, 2009 at 10:48 PM, Rafael Possamai<rafaelpossa at gmail.com> wrote:
> I assumed your SNMP+MRTG was set up correctly... But now that you changed it
> and it worked (or at least tried to gather data from it) I think that maybe
> something was going on with SNMP.

Thanks for the script, I added it to MRTG and as you figured,
something must have gone wrong in the latest update. MRTG started
creating the log files and graphs. Although the data is wrong, I
looked at the loads and it's all zeros, at least now I know what I
should be trying to fix.

Now working on fixing SNMP, and it appears that despite it working,
somehow it was not actually loading up the required MIBs, or at least
that's my understanding.

So far I've managed to get SNMP to report cpu load.

>snmpwalk  -v 1 -c public localhost laTable
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.10
UCD-SNMP-MIB::laLoad.2 = STRING: 0.18
UCD-SNMP-MIB::laLoad.3 = STRING: 0.17
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: 10
UCD-SNMP-MIB::laLoadInt.2 = INTEGER: 17
UCD-SNMP-MIB::laLoadInt.3 = INTEGER: 17
UCD-SNMP-MIB::laLoadFloat.1 = Opaque: Float: 0.100000
UCD-SNMP-MIB::laLoadFloat.2 = Opaque: Float: 0.180000
UCD-SNMP-MIB::laLoadFloat.3 = Opaque: Float: 0.170000
UCD-SNMP-MIB::laErrorFlag.1 = INTEGER: 0
UCD-SNMP-MIB::laErrorFlag.2 = INTEGER: 0
UCD-SNMP-MIB::laErrorFlag.3 = INTEGER: 0
UCD-SNMP-MIB::laErrMessage.1 = STRING:
UCD-SNMP-MIB::laErrMessage.2 = STRING:
UCD-SNMP-MIB::laErrMessage.3 = STRING:

But then this leads me back to MRTG... how do I get MRTG to do the
default pages again? Right now, the only way I could get anything
generated was to follow the example from snmp wiki and manually add
lines like this

LoadMIBs: /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[load]:laLoadInt.1&laLoadInt.2&laLoadInt.3:public at localhost
RouterUptime[load]: public at localhost
MaxBytes[load]: 100
Title[load]: CPU LOAD
PageTop[load]: <H1>CPU Load %</H1>
Unscaled[load]: ymwd
ShortLegend[load]: %
YLegend[load]: CPU Utilization
Legend1[load]: 1 Minute (Load)
Legend2[load]: 5 Minute (Load)
Legend3[load]: 15 Minute (Load)
LegendI[load]:  User
LegendO[load]:  System
Options[load]: growright,nopercent

This gives me the load.html but the graphs are not what I expect, I'm
still trying to find if there's an  equivalent to RouterUptime for cpu

Thanks again for pointing me in the right direction!

More information about the mrtg mailing list