Ubuntu & MRTG Monitoring

Kyle Cotton kylecotton763 at live.com
Sun Jan 19 00:09:32 UTC 2014


This is a little over my head, try the community forums for help.

--- Original Message ---

From: "Sami Mäntysaari" <sm at sami-mantysaari.biz>
Sent: January 18, 2014 3:06 PM
To: ubuntu-users at lists.ubuntu.com
Subject: Ubuntu & MRTG Monitoring



Hello list,


I have an problem with this config:

cat /etc/mrtg/cpu.cfg:

WorkDir: /var/www/mrtg
LoadMIBs: /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[kontor.cpusum]:ssCpuRawUser.0&ssCpuRawUser.0:public at 127.0.0.1 +
ssCpuRawSystem.0&ssCpuRawSystem.0:public at 127.0.0.1 +
ssCpuRawNice.0&ssCpuRawNice.0:public at 127.0.0.1
RouterUptime[kontor.cpusum]: public at 127.0.0.1
MaxBytes[kontor.cpusum]: 100
Title[kontor.cpusum]: CPU LOAD
PageTop[kontor.cpusum]: <H1>Active CPU Load %</H1>
Unscaled[kontor.cpusum]: ymwd
ShortLegend[kontor.cpusum]: %
YLegend[kontor.cpusum]: CPU Utilization
Legend1[kontor.cpusum]: Active CPU in % (Load)
Legend2[kontor.cpusum]:
Legend3[kontor.cpusum]:
Legend4[kontor.cpusum]:
LegendI[kontor.cpusum]:  Active
LegendO[kontor.cpusum]:
Options[kontor.cpusum]: growright,nopercent


cat /etc/mrtg.cfg:

# Created by
# /usr/bin/cfgmaker public at localhost


### Global Config Options

#  for UNIX
# WorkDir: /home/http/mrtg

#  for Debian
WorkDir: /var/www/mrtg

#  or for NT
# WorkDir: c:\mrtgdata

### Global Defaults

#  to get bits instead of bytes and graphs growing to the right
Options[_]: growright,pngdate,bits

XSize[_]: 600
YSize[_]: 200

AddHead[_]: <style type="text/css"> <!– a { color: #263F66;
text-decoration: none; } a:hover { color: #785B41; text-decoration:
none; } body { color: black; font: 8pt Verdana, Geneva, Arial,
Helvetica, sans-serif; } h1 { font:  bold 16pt Verdana, Geneva, Arial,
Helvetica, sans-serif; color: #342A21; } h2 { color: #666666; font: bold
12pt Verdana, Geneva, Arial, Helvetica, sans-serif; } h3 { color: black;
font: bold 9pt Verdana, Geneva, Arial, Helvetica, sans-serif; } table {
border: 0; } td { background-color: #E7DDD3; border: 0px solid #FFFFFF;
color: Black; font: 8pt Verdana, Geneva, Arial, Helvetica,  sans-serif;
vertical-align: top; } th { background-color: #735A4A; color: White;
font: 11px  Verdana, arial, geneva,    helvetica, sans-serif; border: 0;
  font-weight: bold;  text-align: left;    } –> </style>
Background[_]: #F6F1EE

EnableIPv6: no

Include: /etc/mrtg/cpu.cfg
Include: /etc/mrtg/mem.cfg


cat /etc/mrtg/mem.cfg:

LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
Target[localhost.memory]: memAvailReal.0&memTotalReal.0:public at localhost
Title[localhost.memory]: Free Memory
PageTop[localhost.memory]: <H1>srv.sami-mantysaari.biz - Total Memory</H1>
MaxBytes[localhost.memory]: 100000000000
ShortLegend[localhost.memory]: B
YLegend[localhost.memory]: Bytes
LegendI[localhost.memory]: Free
LegendO[localhost.memory]: Total
Legend1[localhost.memory]: Free memory, not including swap, in bytes
Legend2[localhost.memory]: Total memory
Options[localhost.memory]: gauge,growright,nopercent
kMG[localhost.memory]: k,M,G,T,P,X


I'm trying to get memory and cpu stats, but unable due to error.

The error that I'm getting is the following:

Command output of 'env LANG=C /usr/bin/mrtg /etc/mrtg.cfg':

Unknown SNMP var ssCpuRawUser.0
 at /usr/bin/mrtg line 2339
Unknown SNMP var ssCpuRawUser.0
 at /usr/bin/mrtg line 2339
2014-01-19 01:02:09: WARNING: Expected a number but got '0:34:41'
2014-01-19 01:02:09: WARNING: Expected a number but got
'srv.sami-mantysaari.biz'
Unknown SNMP var ssCpuRawSystem.0
 at /usr/bin/mrtg line 2339
Unknown SNMP var ssCpuRawSystem.0
 at /usr/bin/mrtg line 2339
2014-01-19 01:02:09: WARNING: Expected a number but got '0:34:41'
2014-01-19 01:02:09: WARNING: Expected a number but got
'srv.sami-mantysaari.biz'
Unknown SNMP var ssCpuRawNice.0
 at /usr/bin/mrtg line 2339
Unknown SNMP var ssCpuRawNice.0
 at /usr/bin/mrtg line 2339
2014-01-19 01:02:09: WARNING: Expected a number but got '0:34:41'
2014-01-19 01:02:09: WARNING: Expected a number but got
'srv.sami-mantysaari.biz'
Unknown SNMP var memAvailReal.0
 at /usr/bin/mrtg line 2339
Unknown SNMP var memTotalReal.0
 at /usr/bin/mrtg line 2339
2014-01-19 01:02:09: WARNING: Expected a number but got '0:34:41'
2014-01-19 01:02:09: WARNING: Expected a number but got
'srv.sami-mantysaari.biz'
2014-01-19 01:02:09: ERROR: Target[kontor.cpusum][_IN_] '
$target->[0]{$mode}  +  $target->[1]{$mode}  +  $target->[2]{$mode} '
(warn): Use of uninitialized value in addition (+) at (eval 15) line 1.
2014-01-19 01:02:09: ERROR: Target[kontor.cpusum][_OUT_] '
$target->[0]{$mode}  +  $target->[1]{$mode}  +  $target->[2]{$mode} '
(warn): Use of uninitialized value in addition (+) at (eval 16) line 1.
2014-01-19 01:02:09: ERROR: Target[localhost.memory][_IN_] '
$target->[3]{$mode} ' did not eval into defined data
2014-01-19 01:02:09: ERROR: Target[localhost.memory][_OUT_] '
$target->[3]{$mode} ' did not eval into defined data


What is the problem? I have no clue where the problem is.



--
ubuntu-users mailing list
ubuntu-users at lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users




More information about the ubuntu-users mailing list