Hi guys,
I have a UML virtual server running Etch, with an identical setup to two
other Etch servers running on real hardware. I set up snmp and mrtg on
all of them, with identical configs (except for where the interface
numbers are different, obviously). It works great on all except the cpu
graph on the virtual machine.
Here is what happens. I can run snmpget and it works fine:
# snmpget -v2c -c public 127.0.0.1 ssCpuRawUser.0 ssCpuRawUser.0 \
ssCpuRawSystem.0 ssCpuRawSystem.0 ssCpuRawNice.0 ssCpuRawNice.0
UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 186123
UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 186123
UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 10534
UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 10534
UCD-SNMP-MIB::ssCpuRawNice.0 = Counter32: 573
UCD-SNMP-MIB::ssCpuRawNice.0 = Counter32: 573
But when I run mrtg on the config file:
# LANG=C /usr/bin/mrtg /etc/mrtg/cpu.cfg
Unknown SNMP var ssCpuRawUser.0
at /usr/bin/mrtg line 2043
Unknown SNMP var ssCpuRawUser.0
at /usr/bin/mrtg line 2043
2007-09-12 18:32:13: WARNING: Expected a number but got '0:21:54'
2007-09-12 18:32:13: WARNING: Expected a number but got 'rimwards'
Unknown SNMP var ssCpuRawSystem.0
at /usr/bin/mrtg line 2043
Unknown SNMP var ssCpuRawSystem.0
at /usr/bin/mrtg line 2043
2007-09-12 18:32:13: WARNING: Expected a number but got '0:21:54'
2007-09-12 18:32:13: WARNING: Expected a number but got 'rimwards'
Unknown SNMP var ssCpuRawNice.0
at /usr/bin/mrtg line 2043
Unknown SNMP var ssCpuRawNice.0
at /usr/bin/mrtg line 2043
2007-09-12 18:32:13: WARNING: Expected a number but got '0:21:54'
2007-09-12 18:32:13: WARNING: Expected a number but got 'rimwards'
2007-09-12 18:32:13: ERROR: Target[localhost.cpu][_IN_] '
$target->[0]{$mode} + $target->[1]{$mode} + $target->[2]{$mode} '
(warn): Use of uninitialized value in addition (+) at (eval 17) line 1.
2007-09-12 18:32:13: ERROR: Target[localhost.cpu][_OUT_] '
$target->[0]{$mode} + $target->[1]{$mode} + $target->[2]{$mode} '
(warn): Use of uninitialized value in addition (+) at (eval 18) line 1.
'rimwards' is the hostname. So it looks like mrtg is not pulling the
data correctly (from the right variables maybe?), but I'm not sure
why.The cpu.cfg file is identical to the other servers, where it works
as expected (this will probably line-wrap):
WorkDir: /home/www/web14/web/mrtg
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:[EMAIL PROTECTED]
ssCpuRawSystem.0&ssCpuRawSystem.0:[EMAIL PROTECTED]
ssCpuRawNice.0&ssCpuRawNice.0:[EMAIL PROTECTED]
RouterUptime[localhost.cpu]: [EMAIL PROTECTED]
MaxBytes[localhost.cpu]: 100
Title[localhost.cpu]: CPU Load
PageTop[localhost.cpu]: <H1>Active CPU Load %</H1>
Unscaled[localhost.cpu]: ymwd
ShortLegend[localhost.cpu]: %
YLegend[localhost.cpu]: CPU Utilization
Legend1[localhost.cpu]: Active CPU in % (Load)
Legend2[localhost.cpu]:
Legend3[localhost.cpu]:
Legend4[localhost.cpu]:
LegendI[localhost.cpu]: Active
LegendO[localhost.cpu]:
Options[localhost.cpu]: growright,nopercent
The only difference between this server and the others is the lack of
real hardware, but then a direct snmpget works, so that shouldn't
matter, right?
The software versions on both servers are:
Debian Etch i386 - fully up to date
mrtg-2.14.7-2
snmp-5.2.3-7
snmpd-5.2.3-7
Kernel versions are:
stock Debian 2.6.18-5-k7 on the real servers
2.6.20.3-bytemark-uml-2 on the VM
Has anyone seen this?
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]