Hi,
I hope someone can help me please.
I trying to get mrtg to monitor cpu and memory on a server, but its not working. In my mrtg.cfg file I have the following:
Target[server.cpu]:.1.3.6.1.4.1.2021.11.9.0&.1.3.6.1.4.1.2021.11.10.0:string@server Title[server.cpu]: Server CPU Load Directory[server.cpu]: ruby PageTop[server.cpu]: <H1>CPU Load - System, User and Nice Processes</H1> MaxBytes[server.cpu]: 100 ShortLegend[server.cpu]: % YLegend[server.cpu]: CPU Utilization Legend1[server.cpu]: Current CPU percentage load LegendI[server.cpu]: Used LegendO[server.cpu]: Options[server.cpu]: growright,nopercent Unscaled[server.cpu]: ymwd
The problem is that the graphs aren't updating, does anyone know why?
Thanks Dan
Dan Track wrote:
Hi,
I hope someone can help me please.
I trying to get mrtg to monitor cpu and memory on a server, but its not working. In my mrtg.cfg file I have the following:
Target[server.cpu]:.1.3.6.1.4.1.2021.11.9.0&.1.3.6.1.4.1.2021.11.10.0:string@server
Do you have net-snmp-utils installed?
If you do, you might want to try using those OIDs on the server, and seeing if any authentication errors/etc are reported:
snmpwalk -v1 -c string server.1.3.6.1.4.1.2021.11.9.0 snmpwalk -v1 -c string server .1.3.6.1.4.1.2021.11.10.0
would the command for the example above, assuming Version 1 SNMP.
Steve
On 1/30/06, Steven Ringwald asric@asric.com wrote:
Dan Track wrote:
Hi,
I hope someone can help me please.
I trying to get mrtg to monitor cpu and memory on a server, but its not working. In my mrtg.cfg file I have the following:
Target[server.cpu]:.1.3.6.1.4.1.2021.11.9.0&.1.3.6.1.4.1.2021.11.10.0:string@server
Do you have net-snmp-utils installed?
If you do, you might want to try using those OIDs on the server, and seeing if any authentication errors/etc are reported:
snmpwalk -v1 -c string server.1.3.6.1.4.1.2021.11.9.0 snmpwalk -v1 -c string server .1.3.6.1.4.1.2021.11.10.0
would the command for the example above, assuming Version 1 SNMP.
Hi
Thanks for the advice. I have the following snmp rpm's installed from hp: net-snmp-cmaX net-snmp-perl net-snmp-cmaX-libs net-snmp-cmaX-utils
I tried your command but I got the following:
snmpwalk: Unknown host
I tried writing the hostname and even the ip, but it keeps saying the above.
I'm not experienced with mrtg that much, so any help will be appreciated.
Thanks Dan
Dan Track wrote:
snmpwalk -v1 -c string server .1.3.6.1.4.1.2021.11.9.0 snmpwalk -v1 -c string server .1.3.6.1.4.1.2021.11.10.0 Hi
Thanks for the advice. I have the following snmp rpm's installed from hp: net-snmp-cmaX net-snmp-perl net-snmp-cmaX-libs net-snmp-cmaX-utils
I tried your command but I got the following:
snmpwalk: Unknown host
I tried writing the hostname and even the ip, but it keeps saying the above.
I'm not experienced with mrtg that much, so any help will be appreciated.
Ok. Question for you? Are you using the firewalling of any kind on the box, and if so, do you have the SNMP port open?
Steve
Ahhh wait, forget my last post. I just figured it out, I hadn't left a space between the id's and the server name.
Here's the output:
snmpwalk -v1 -c string server .1.3.6.1.4.1.2021.11.9.0 UCD-SNMP-MIB::ssCpuUser.0 = INTEGER: 1
snmpwalk -v1 -c string server .1.3.6.1.4.1.2021.11.10.0 UCD-SNMP-MIB::ssCpuSystem.0 = INTEGER: 10
What's the next step?
Thanks in advance Dan
Hi
Thanks for your help. Just for the record, and to help others, I fixed the problem.
In this case at least I encountered the following error messages:
env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg Unknown SNMP var ssCpuRawUser.0 at /usr/bin/mrtg line 1678 Unknown SNMP var ssCpuRawUser.0 at /usr/bin/mrtg line 1678 WARNING: Expected a number but got '102 days, 0:09:38' WARNING: Expected a number but got 'server' Unknown SNMP var ssCpuRawSystem.0 at /usr/bin/mrtg line 1678 Unknown SNMP var ssCpuRawSystem.0 at /usr/bin/mrtg line 1678 WARNING: Expected a number but got '102 days, 0:09:38' WARNING: Expected a number but got 'server' Unknown SNMP var ssCpuRawNice.0 at /usr/bin/mrtg line 1678 Unknown SNMP var ssCpuRawNice.0 at /usr/bin/mrtg line 1678 WARNING: Expected a number but got '102 days, 0:09:38' WARNING: Expected a number but got 'server' ERROR: Target[server.cpu][_IN_] ' $$target[11]{$mode} + $$target[12]{$mode} + $$target[13]{$mode} ' (warn): Use of uninitialized value in addition (+) at (eval 59) line 1. ERROR: Target[server.cpu][_OUT_] ' $$target[11]{$mode} + $$target[12]{$mode} + $$target[13]{$mode} ' (warn): Use of uninitialized value in addition (+) at (eval 60) line 1. WARNING: Skipping Update of server.cpu, inlast is not defined WARNING: Skipping Update of server.cpu, outlast is not defined
To fix this I added the lines:
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
Here's my config:
Target[serverload]:ssCpuRawUser.0&ssCpuRawSystem.0:string@server Directory[serverload]: server MaxBytes[serverload]: 100 Title[serverload]: CPU LOAD on server PageTop[serverload]: <H1>CPU (user and system) Load %</H1> Unscaled[serverload]: ymwd ShortLegend[serverload]: % YLegend[serverload]: CPU Utilization Legend1[serverload]: User CPU in % (Load) Legend2[serverload]: System CPU in % (Load) Legend3[serverload]: Legend4[serverload]: LegendI[serverload]: User LegendO[serverload]: System Options[serverload]: growright,nopercent
Hope this helps someone.
Dan