Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MRTG Error [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
the_sphynx
Apprentice
Apprentice


Joined: 19 May 2004
Posts: 156
Location: Thornton, CO

PostPosted: Tue May 24, 2005 9:40 pm    Post subject: MRTG Error [SOLVED] Reply with quote

I am hoping that someone here can help me out. I am trying to graph the CPU usage for a server that we have here and I am using the proper OID but I may have some syntax issues. I am using MRTG to graph this stuff but it errors out.
Here is my host.cfg:
Code:

# Created by
# /usr/bin/cfgmaker --global 'HtmlDir: /var/www/graphing/html' --global 'ImageDir: /var/www/graphing/images' --global 'LogDir: /var/www/graphing/logs' --ifref=ip --output=/etc/mrtg/host.cfg public@170.88.217.9


### Global Config Options

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

#  or for NT
# WorkDir: c:\mrtgdata

### Global Defaults

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

EnableIPv6: no
HtmlDir: /var/www/graphing/html
ImageDir: /var/www/graphing/images
LogDir: /var/www/graphing/logs
#LoadMibs: /usr/share/snmp/mibs/*

######################################################################
# System: BLAH
# Description: Hardware: x86 Family 15 Model 2 Stepping 7 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Multiprocessor Free)
# Contact: BLAH IT Dept.
# Location: BLAH
######################################################################


### Interface 1 >> Descr: 'MS-TCP-Loopback-interface' | Name: '' | Ip: '127.0.0.1' | Eth: '' ###
### The following interface is commented out because:
### * it is a Software Loopback interface
#
# Target[170.88.217.9_127.0.0.1]: /127.0.0.1:public@170.88.217.9:
# SetEnv[170.88.217.9_127.0.0.1]: MRTG_INT_IP="127.0.0.1" MRTG_INT_DESCR="MS-TCP-Loopback-interface"
# MaxBytes[170.88.217.9_127.0.0.1]: 1250000
# Title[170.88.217.9_127.0.0.1]: Traffic Analysis for 127.0.0.1 -- BLAH
# PageTop[170.88.217.9_127.0.0.1]: <H1>Traffic Analysis for 127.0.0.1 -- BLAH</H1>
#  <TABLE>
#    <TR><TD>System:</TD>     <TD>BLAH in BLAH</TD></TR>
#    <TR><TD>Maintainer:</TD> <TD>BLAH</TD></TR>
#    <TR><TD>Description:</TD><TD>MS-TCP-Loopback-interface  </TD></TR>
#    <TR><TD>ifType:</TD>     <TD>softwareLoopback (24)</TD></TR>
#    <TR><TD>ifName:</TD>     <TD></TD></TR>
#    <TR><TD>Max Speed:</TD>  <TD>1250.0 kBytes/s</TD></TR>
#    <TR><TD>Ip:</TD>         <TD>127.0.0.1 (localhost)</TD></TR>
#  </TABLE>


### Interface 16777219 >> Descr: 'Broadcom-Advanced-Server-Program-Driver-for-Windows-2000' | Name: '' | Ip: '170.88.217.9' | Eth: '00-0b-db-e2-ab-54' ###

Target[170.88.217.9_170.88.217.9]: /170.88.217.9:public@170.88.217.9:
SetEnv[170.88.217.9_170.88.217.9]: MRTG_INT_IP="170.88.217.9" MRTG_INT_DESCR="Broadcom-Advanced-Server-Program-Driver-for-Windows-2000"
MaxBytes[170.88.217.9_170.88.217.9]: 125000000
Title[170.88.217.9_170.88.217.9]: Traffic Analysis for 170.88.217.9 -- BLAH
PageTop[170.88.217.9_170.88.217.9]: <H1>Traffic Analysis for 170.88.217.9 -- BLAH</H1>
 <TABLE>
   <TR><TD>System:</TD>     <TD>BLAH in BLAH</TD></TR>
   <TR><TD>Maintainer:</TD> <TD>BLAH</TD></TR>
   <TR><TD>Description:</TD><TD>Broadcom-Advanced-Server-Program-Driver-for-Windows-2000  </TD></TR>
   <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
   <TR><TD>ifName:</TD>     <TD></TD></TR>
   <TR><TD>Max Speed:</TD>  <TD>125.0 MBytes/s</TD></TR>
   <TR><TD>Ip:</TD>         <TD>170.88.217.9 (BLAH)</TD></TR>
 </TABLE>


### Interface 67108868 >> Descr: 'WAN-(PPP/SLIP)-Interface' | Name: '' | Ip: '192.168.234.235' | Eth: '00-53-45-00-00-00' ###

#Target[170.88.217.9_192.168.234.235]: /192.168.234.235:public@170.88.217.9:
#SetEnv[170.88.217.9_192.168.234.235]: MRTG_INT_IP="192.168.234.235" MRTG_INT_DESCR="WAN-(PPP/SLIP)-Interface"
#MaxBytes[170.88.217.9_192.168.234.235]: 2400
#Title[170.88.217.9_192.168.234.235]: Traffic Analysis for 192.168.234.235 -- BLAH
#PageTop[170.88.217.9_192.168.234.235]: <H1>Traffic Analysis for 192.168.234.235 -- BLAH</H1>
# <TABLE>
#   <TR><TD>System:</TD>     <TD>BLAH in BLAH</TD></TR>
#   <TR><TD>Maintainer:</TD> <TD>BLAH</TD></TR>
#   <TR><TD>Description:</TD><TD>WAN-(PPP/SLIP)-Interface  </TD></TR>
#   <TR><TD>ifType:</TD>     <TD>ppp (23)</TD></TR>
#   <TR><TD>ifName:</TD>     <TD></TD></TR>
#   <TR><TD>Max Speed:</TD>  <TD>2400.0 Bytes/s</TD></TR>
#   <TR><TD>Ip:</TD>         <TD>192.168.234.235 ()</TD></TR>
# </TABLE>

LoadMibs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
Target[170.88.217.9.cpu]: 1.3.6.1.2.1.25.3.3.1.2:public@170.88.217.9
#:public@170.88.217.9 - hrProccessorLoad.36&hrProccessorLoad.36:public@170.88.217.9)
#* hrProccessorLoad.36&hrProccessorLoad.36:public@170.88.217.9
MaxBytes[170.88.217.9.cpu]: 100
RouterUptime[170.88.217.9.cpu]: public@170.88.217.9
Options[170.88.217.9.cpu]: growright,nopercent
Unscaled[170.88.217.9.cpu]: ymwd
YLegend[170.88.217.9.cpu]: CPU Utilization
ShortLegend[170.88.217.9.cpu]: %
Legend1[170.88.217.9.cpu]: Active CPU in % (Load)
Legend2[170.88.217.9.cpu]:
Legend3[170.88.217.9.cpu]:
Legend4[170.88.217.9.cpu]:
LegendI[170.88.217.9.cpu]: Active
LegendO[170.88.217.9.cpu]:
Colours[170.88.217.9.cpu]: GREEN#00eb0c,BLUE#0000ff,GRAY#AAAAAA,VIOLET#ff00ff
Title[170.88.217.9.cpu]: CPU Load for BLAH
PageTop[170.88.217.9.cpu]: <H1>Active CPU Load %  for BLAH</H1>

Here is my output of mrtg:
Code:

SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 1 (OID: 1.3.6.1.2.1.2.2.1.10.2)
SNMPv1_Session (remote host: "170.88.217.9" [170.88.217.9].161)
                  community: "public"
                 request ID: 2011015874
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/bin/../lib/mrtg2/SNMP_util.pm line 490
SNMPGET Problem for ifInOctets.2 ifOutOctets.2 sysUptime sysName on public@170.88.217.9::::::v4only
 at /usr/bin/mrtg line 1849
ERROR: Target[170.88.217.9.cpu][_IN_] '1.3.6.1.2.1.25.3.3.1. $target->[1]{$mode} ' (warn): Use of uninitialized value in concatenation (.) or string at (eval 8) line 1.
ERROR: Target[170.88.217.9.cpu][_OUT_] '1.3.6.1.2.1.25.3.3.1. $target->[1]{$mode} ' (warn): Use of uninitialized value in concatenation (.) or string at (eval 9) line 1.

Any help would be greatly appreciated.
_________________
Folding@Home User 285941


Last edited by the_sphynx on Tue May 24, 2005 10:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
the_sphynx
Apprentice
Apprentice


Joined: 19 May 2004
Posts: 156
Location: Thornton, CO

PostPosted: Tue May 24, 2005 10:29 pm    Post subject: Reply with quote

I actually fixed it myself:) It was because you have to state the OID & Instance twice. So the new relevant part of the config is as follows:
Code:

LoadMibs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
Target[170.88.217.9.cpu]: (1.3.6.1.2.1.25.3.3.1.2.36&1.3.6.1.2.1.25.3.3.1.2.36:public@170.88.217.9 + 1.3.6.1.2.1.25.3.3.1.2.37&1.3.6.1.2.1.25.3.3.1.2.37:public@170.88.217.9 + 1.3.6.1.2.1.25.3.3.1.2.38&1.3.6.1.2.1.25.3.3.1.2.38:public@170.88.217.9 + 1.3.6.1.2.1.25.3.3.1.2.39&1.3.6.1.2.1.25.3.3.1.2.39:public@170.88.217.9) / 4

All of the above actually needs to go on one line though (SNMP is showing four procs so I am doing the division).
_________________
Folding@Home User 285941
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum