LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
Search this Thread
Old 11-30-2006, 04:17 PM   #1
kicko
LQ Newbie
 
Registered: Nov 2005
Distribution: Slackware 10, Mandriva 2006
Posts: 10

Rep: Reputation: 0
MRTG problem


I've setup net-SNMPD and MRTG, but MRTG returns errors.

I'm installing it on new server - Mandriva 2007. I have old server - Mandriva 2006 and it is working on it.

MRTG config file:
Code:
# File: /etc/mrtg/server-info.cfg
#
# Configuration file for non bandwidth server statistics
#


#
# Define global options
#

LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/TCP-MIB.txt,/usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt,/usr/sh
are/snmp/mibs/HOST-RESOURCES-TYPES.txt

workdir: /var/www/html/mrtg/

 
#
# CPU Monitoring
# (Scaled so that the sum of all three values doesn't exceed 100)
#

Target[server.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:test@localhost + ssCpuRawSystem.0&ssCpuRawSystem.0:test@localhost + ssCpuRawNice.0&
ssCpuRawNice.0:test@localhost
Title[server.cpu]: Server CPU Load
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

#
# Load Average
#

Target[server.loadavg]: laLoadInt.2&laLoadInt.3:test@localhost
MaxBytes[server.loadavg]: 5000
Title[server.loadavg]: Load Average * 100
PageTop[server.loadavg]:<h1>Load Average * 100</h1>
YLegend[server.loadavg]: Load Average
ShortLegend[server.loadavg]: &nbsp;
Legend1[server.loadavg]: Load average 5 min
Legend2[server.loadavg]: Load average 15 min
LegendI[server.loadavg]: &nbsp;5min load avg
LegendO[server.loadavg]: &nbsp;15min load avg
Options[server.loadavg]: nopercent,growright,noinfo,gauge
[root@m6 mrtg]# cat ser
server-stats.cfg  server-stats.ok   
[root@m6 mrtg]# cat server-stats.cfg 
#
# File: /etc/mrtg/server-info.cfg
#
# Configuration file for non bandwidth server statistics
#


#
# Define global options
#

LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/TCP-MIB.txt,/usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt,/usr/st

workdir: /var/www/html/mrtg/

 
#
# CPU Monitoring
# (Scaled so that the sum of all three values doesn't exceed 100)
#

Target[server.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:test@localhost + ssCpuRawSystem.0&ssCpuRawSystem.0:test@localhost + ssCpuRawNice.0t
Title[server.cpu]: Server CPU Load
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

#
# Load Average
#

Target[server.loadavg]: laLoadInt.2&laLoadInt.3:test@localhost
MaxBytes[server.loadavg]: 5000
Title[server.loadavg]: Load Average * 100
PageTop[server.loadavg]:<h1>Load Average * 100</h1>
YLegend[server.loadavg]: Load Average
ShortLegend[server.loadavg]: &nbsp;
Legend1[server.loadavg]: Load average 5 min
Legend2[server.loadavg]: Load average 15 min
LegendI[server.loadavg]: &nbsp;5min load avg
LegendO[server.loadavg]: &nbsp;15min load avg
Options[server.loadavg]: nopercent,growright,noinfo,gauge


#
# Memory Monitoring (Total Versus Available Memory)
#

Target[server.memory]: memAvailReal.0&memTotalReal.0:test@localhost
Title[server.memory]: Free Memory
PageTop[server.memory]: <H1>Free Memory</H1>
MaxBytes[server.memory]: 100000000000
ShortLegend[server.memory]: B
YLegend[server.memory]: Bytes
LegendI[server.memory]: Free
LegendO[server.memory]: Total
Legend1[server.memory]: Free memory, not including swap, in bytes
Legend2[server.memory]: Total memory
Options[server.memory]: gauge,growright,nopercent
kMG[server.memory]: k,M,G,T,P,X

#
# Memory Monitoring (Percentage usage)
#

#Target[server.mempercent]: ( memTotalReal.0&memTotalReal.0:test@localhost ) * 100 / ( memTotalReal.0&memTotalReal.0:test@localhost)
#Title[server.mempercent]: Percentage Free Memory
#PageTop[server.mempercent]: <h1>Percentage Free Memory</h1>
#options[server.mempercent]: growright,gauge,transparent,nopercent
#Unscaled[server.mempercent]: ymwd
#MaxBytes[server.mempercent]: 100
#YLegend[server.mempercent]: Memory %
#ShortLegend[server.mempercent]: Percent
#LegendI[server.mempercent]: Used
#LegendO[server.mempercent]: Used
#Legend1[server.mempercent]: Percentage Free Memory
#Legend2[server.mempercent]: Percentage Free Memory

#
# New TCP Connection Monitoring (per minute)
#

Target[server.newconns]: tcpPassiveOpens.0&tcpActiveOpens.0:test@localhost
Title[server.newconns]: Newly Created TCP Connections
PageTop[server.newconns]: <H1>New TCP Connections</H1>
MaxBytes[server.newconns]: 10000000000
ShortLegend[server.newconns]: c/s
YLegend[server.newconns]: Conns / Min
LegendI[server.newconns]: In
LegendO[server.newconns]: Out
Legend1[server.newconns]: New inbound connections
Legend2[server.newconns]: New outbound connections
Options[server.newconns]: growright,nopercent,perminute
 
#
# Established TCP Connections
#

Target[server.estabcons]: tcpCurrEstab.0&tcpCurrEstab.0:test@localhost
Title[server.estabcons]: Currently Established TCP Connections
PageTop[server.estabcons]: <H1>Established TCP Connections</H1>
MaxBytes[server.estabcons]: 10000000000
ShortLegend[server.estabcons]:
YLegend[server.estabcons]: Connections
LegendI[server.estabcons]: In
LegendO[server.estabcons]:
Legend1[server.estabcons]: Established connections
Legend2[server.estabcons]:
Options[server.estabcons]: growright,nopercent,gauge

 
#
# Bandwidt TCP
#

Target[backb]: 2:test@localhost
Title[backb]: Bandwidth
PageTop[backb]: <H1>TCP Bandwidth</H1>
MaxBytes[backb]: 12500000
YLegend[backb]: Bytes / Sec
LegendI[backb]: In
LegendO[backb]: Out
Legend1[backb]: Bandwidth in
Legend2[backb]: Bandwidth out
Options[backb]: growright   
 

#
# Disk Usage Monitoring
#

 
Target[server.disk]: dskPercent.1&dskPercent.1:test@localhost
Title[server.disk]: Disk Partition Usage
PageTop[server.disk]: <H1>Disk Partition Usage /</H1>
MaxBytes[server.disk]: 100
ShortLegend[server.disk]: %
YLegend[server.disk]: Utilization
LegendI[server.disk]: /
LegendO[server.disk]: /var
Options[server.disk]: gauge,growright,nopercent
Unscaled[server.disk]: ymwd

#
# SWAP Usage
#

Target[server.SWAP_USAGE]:.1.3.6.1.4.1.2021.4.3.0&.1.3.6.1.4.1.2021.4.4.0:test@localhost
RouterUptime[server.SWAP_USAGE]: test@localhost
Title[server.SWAP_USAGE]: Swap Space 
MaxBytes[server.SWAP_USAGE]: 10000000000
Options[server.SWAP_USAGE]: growright, gauge, nopercent
ShortLegend[server.SWAP_USAGE]:KB
YLegend[server.SWAP_USAGE]: Available Swap
Legend1[server.SWAP_USAGE]: Used Swap
LegendI[server.SWAP_USAGE]: Available Swap
LegendO[server.SWAP_USAGE]: Used Swap
PageTop[server.SWAP_USAGE]: <H1>Swap Usage</H1>

MRTG errors:
Code:
Unknown SNMP var ssCpuRawUser.0
 at /usr/bin/mrtg line 2035
Unknown SNMP var ssCpuRawUser.0
 at /usr/bin/mrtg line 2035
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got '8:04:14'
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got 'Not defined (edit /etc/snmp/snmpd.conf or use snmpconf)'
Unknown SNMP var ssCpuRawSystem.0
 at /usr/bin/mrtg line 2035
Unknown SNMP var ssCpuRawSystem.0
 at /usr/bin/mrtg line 2035
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got '8:04:14'
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got 'Not defined (edit /etc/snmp/snmpd.conf or use snmpconf)'
Unknown SNMP var ssCpuRawNice.0
 at /usr/bin/mrtg line 2035
Unknown SNMP var ssCpuRawNice.0
 at /usr/bin/mrtg line 2035
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got '8:04:14'
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got 'Not defined (edit /etc/snmp/snmpd.conf or use snmpconf)'
Unknown SNMP var laLoadInt.2
 at /usr/bin/mrtg line 2035
Unknown SNMP var laLoadInt.3
 at /usr/bin/mrtg line 2035
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got '8:04:14'
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got 'Not defined (edit /etc/snmp/snmpd.conf or use snmpconf)'
Unknown SNMP var memAvailReal.0
 at /usr/bin/mrtg line 2035
Unknown SNMP var memTotalReal.0
 at /usr/bin/mrtg line 2035
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got '8:04:14'
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got 'Not defined (edit /etc/snmp/snmpd.conf or use snmpconf)'
Unknown SNMP var dskPercent.1
 at /usr/bin/mrtg line 2035
Unknown SNMP var dskPercent.1
 at /usr/bin/mrtg line 2035
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got '8:04:14'
Thursday, 30 November 2006 at 23:10: WARNING: Expected a number but got 'Not defined (edit /etc/snmp/snmpd.conf or use snmpconf)'
Thursday, 30 November 2006 at 23:10: ERROR: Target[server.cpu][_IN_] ' $target->[0]{$mode}  +  $target->[1]{$mode}  +  $target->[2].
Thursday, 30 November 2006 at 23:10: ERROR: Target[server.cpu][_OUT_] ' $target->[0]{$mode}  +  $target->[1]{$mode}  +  $target->[2.
Thursday, 30 November 2006 at 23:10: ERROR: Target[server.loadavg][_IN_] ' $target->[3]{$mode} ' did not eval into defined data
Thursday, 30 November 2006 at 23:10: ERROR: Target[server.loadavg][_OUT_] ' $target->[3]{$mode} ' did not eval into defined data
Thursday, 30 November 2006 at 23:10: ERROR: Target[server.memory][_IN_] ' $target->[4]{$mode} ' did not eval into defined data
Thursday, 30 November 2006 at 23:10: ERROR: Target[server.memory][_OUT_] ' $target->[4]{$mode} ' did not eval into defined data
Thursday, 30 November 2006 at 23:10: ERROR: Target[server.disk][_IN_] ' $target->[8]{$mode} ' did not eval into defined data
Thursday, 30 November 2006 at 23:10: ERROR: Target[server.disk][_OUT_] ' $target->[8]{$mode} ' did not eval into defined data
Statistics for network are OK (Established TCP Connections, TCP Bandwidth etc.), but statistics for CPU, load average doesn't work.

I tried to use snmpwalk and it looks OK:
Code:
[root@m6 ~]# snmpwalk -v1 -c test localhost ssCpuRawUser 
UCD-SNMP-MIB::ssCpuRawUser.0 435141

What am I doing wrong?
Can someone help me with this?
 
Old 12-15-2006, 01:51 PM   #2
bitva
Member
 
Registered: Dec 2002
Location: Los Angeles
Distribution: Debian
Posts: 72

Rep: Reputation: 15
I think I remember a problem where the uptime is always returned with SNMP requests. I think, not certain, a fix was to either force MIB I or MIBII or something like that. Check the MRTG site and the configuration options for something having to deal with the system uptime and certain clients that have a problem with it.
 
Old 12-16-2006, 08:52 AM   #3
kicko
LQ Newbie
 
Registered: Nov 2005
Distribution: Slackware 10, Mandriva 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you. You show me the way . I've added this parameter to config:

EnableSnmpV3: yes

It's working now ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with mrtg and snmp ARCIS_house Linux - Newbie 1 04-29-2006 11:04 AM
MRTG Problem shipon_97 Linux - Security 1 01-30-2006 09:13 AM
MRTG Problem shipon_97 Linux - Security 6 01-28-2006 09:54 AM
problem in mrtg alvi2 Linux - Networking 1 07-18-2005 03:51 PM
mrtg problem vytenis Linux - Software 1 03-19-2004 09:20 PM


All times are GMT -5. The time now is 01:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration