[mrtg] Re: Using MRTG to monitor SUN machines

Drew Dowling drewhead at vnet.net
Fri Jul 21 21:10:15 MEST 2000


At 12:59 PM 7/21/00 +0200, Stefano Gastaldi wrote:
>
>
>
>
>I have installed MRTG on Red Hat Linux 6.2.
> By MRTG,  i  monitor the traffic on routers, without problems.
>
> But I need to use MRTG to monitor SUN server.
>For default MRTG trace the diagram of SUN's interface. But I need of having
>other information:
>space disc, occupation of cpu, errors on the connection. (on SUN server ).
>I have modified the configuration file generated from MRTG (sunserver.cfg)
>introducing specifics MIB,
>to obtain the information, but SUN server answers always so:
>

[snip]

>
>How can  i use the MIB in the configuration file to obtain information (cpu,
>space disc)?
>If  you can send me examples of configuration file, I'm very happy!
> thanks
>
>Stefano Gastaldi
>

Hi Stefano,

	I'm monitoring about 30 Sun servers (both Sparcs and x86s) on our network
along with tons of router interfaces and a hand full of other things.  I'll
tell you something I wish I had known when I began.  Throw the Sun SNMP
Enterprise agent away.  I have found that unless you are concerned with
interface stats it is virtually useless.  You don't actually have to delete
it off your system, just make sure you remove all mention of it in your
/etc/rc* tree.
	Your problem here really isn't mrtg failing to pull the info.  It's a
problem where the remote SNMP Agent on your Sun boxes simply isn't able to
give mrtg that inforamtion.  To that end I highly recomend the UCD-SNMP
tools.  This free collection includes an Agent and MIB(s) that will let you
monitor filesystem space, CPU stats, and interface stats as well.  You can
also look at process counts, system memory, return local program/script
output, and more.  I've personally found that although the developers claim
that they are not production caliber the code is pretty rock solid.  You
can find the source and more info at http://ucd-snmp.ucdavis.edu/

	Here is an example of 4 graphs on one of our webboxes:

############################################
# CPU load config for www3
Target[www3.cpu]:
1.3.6.1.4.1.2021.10.1.5.1&1.3.6.1.4.1.2021.10.1.5.3:public at www3.vnet.net:161
Options[www3.cpu]: gauge, absolute, nopercent
MaxBytes[www3.cpu]: 1000
Title[www3.cpu]: CPU load averages
Ylegend[www3.cpu]: Load Avg X 100
ShortLegend[www3.cpu]:  
Legend1[www3.cpu]: 1 min. CPU load average
Legend2[www3.cpu]: 15 min. CPU load average
LegendI[www3.cpu]:  1min
LegendO[www3.cpu]:  15min
PageTop[www3.cpu]:<H1>CPU Load Average Analysis for www3</H1>
        <TABLE>
        <TR><TD>System: </TD><TD>SunOS www3 5.6 Generic_105181-14
sun4m</TD></TR>
        <TR><TD>Variables: </TD><TD>CPU LoadAvg 1 min, and 15 min
avg.</TD></TR>
        </TABLE>

#---------------------------------------------------------------

############################################
# Avaiable memory config for www3
Target[www3.memory]:
1.3.6.1.4.1.2021.4.6.0&1.3.6.1.4.1.2021.4.4.0:public at www3.vnet.net:161
Options[www3.memory]: gauge, absolute, nopercent
MaxBytes[www3.memory]: 524396
Title[www3.memory]: System Avaiable memory
Ylegend[www3.memory]: Avaiable memory
ShortLegend[www3.memory]: &nbsp;
kilo[www3.memory]: 1024
kMG[www3.memory]: ,M,G,T,P
Legend1[www3.memory]: Real memory
Legend2[www3.memory]: Swap memory
LegendI[www3.memory]: &nbsp;Real
LegendO[www3.memory]: &nbsp;Swap
PageTop[www3.memory]:<H1>Avaiable memory on www3</H1>
        <TABLE>
        <TR><TD>System: </TD><TD>SunOS www3 5.6 Generic_105181-14
sun4m</TD></TR>
        <TR><TD>Totals: </TD><TD>Real = 524396 and Swap = 129120 kB</TD></TR>
        <TR><TD>Variables: </TD><TD>Avaiable memory: Real and Swap</TD></TR>
        </TABLE>

#---------------------------------------------------------------

############################################
# www3 /usr Useage
Target[www3.disk.2]:
1.3.6.1.4.1.2021.9.1.7.2&1.3.6.1.4.1.2021.9.1.6.2:public at www3.vnet.net:161
Options[www3.disk.2]: gauge, absolute
MaxBytes[www3.disk.2]: 880246
Title[www3.disk.2]: /usr Disk Space
Ylegend[www3.disk.2]: /usr Disk Space
kMG[www3.disk.2]: ,M,G,T,P
ShortLegend[www3.disk.2]: &nbsp;
Legend1[www3.disk.2]: Avaiable Disk
Legend2[www3.disk.2]: Total Disk
LegendI[www3.disk.2]: &nbsp;Avaiable
LegendO[www3.disk.2]: &nbsp;Total
PageTop[www3.disk.2]:<H1>/usr Disk Useage on www3</H1>
        <TABLE>
        <TR><TD>System: </TD><TD>SunOS www3 5.6 Generic_105181-14
sun4m</TD></TR>
        <TR><TD>/usr is of size: </TD><TD>880246 kB</TD></TR>
        <TR><TD>Variables: </TD><TD>Avaiable and Total Disk space</TD></TR>
        </TABLE>


#---------------------------------------------------------------

############################################
# www3 httpd Count
Target[www3.process.1]:
1.3.6.1.4.1.2021.2.1.5.1&1.3.6.1.4.1.2021.2.1.3.1:public at www3.vnet.net:161
Options[www3.process.1]: gauge, absolute, nopercent
MaxBytes[www3.process.1]: 100
Title[www3.process.1]: httpd Process
Ylegend[www3.process.1]: httpd Process
ShortLegend[www3.process.1]: &nbsp;
Legend1[www3.process.1]: httpd Process
Legend2[www3.process.1]: Min httpd Processes
LegendI[www3.process.1]: &nbsp;processes
LegendO[www3.process.1]: &nbsp;Min
PageTop[www3.process.1]:<H1>httpd Process Count on www3</H1>
 <TABLE>
 <TR><TD>System: </TD><TD>SunOS www3 5.6 Generic_105181-14 sun4m</TD></TR>
 <TR><TD>Variables: </TD><TD>httpd Process Count</TD></TR>
 </TABLE>


#---------------------------------------------------------------

You will have to do some simple configuration via the snmpd.conf file to
make disk and process configuration work, but it pretty straight forward.

Junk the Sun agent, replace it with the UCD one, and you will be a much
happier sysadmin.  :)

--
Drew Dowling

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list