[mrtg] Re: Newbie needs help with OS-X

paul beard paulbeard at mac.com
Fri Apr 18 05:52:21 MEST 2003


Joe Uselding wrote:
> Hello All,
> 
> I have been looking at MRTG for a few days now and I am very eager to begin
> using it.  I would like to monitor our Cisco 1720 router, as well as a
> number of Servers running Mac OS 10.1-10.2 Server.

so you want to run mrtg as a monitoring station on OS X as well as 
monitor some OSX machines. Not too hard.

> I have gone through and read the FAQ and checked out a number of different
> website links but I am still a little lost.  I was able to get MRTG
> installed under 10.2.4 client.  Now I am getting to the configuration part
> and setting up my web server.  Has anyone else used Mac OS X and can you
> possibly walk me through this?  Thanks in advance for all of your help!

Do you have an snmp daemon running on OS X? that's your first 
step. I wasn't aware that it was standard equipment on OS X: I 
have installed with the Fink tools (http://fink.sourceforge.net/) 
and now use darwinports (http://www.opendarwin.org/: they have 
extended snmp so you get more variables returned, more to monitor).

I have a few notes on this:

http://paulbeard.no-ip.org/movabletype/archives/000128.html
http://paulbeard.no-ip.org/movabletype/archives/000133.html

As it turns out, mrtg is in the darwinports collection, if you 
have that (if you don't, you may want to check it out).

But first things first: install mrtg and pick a target machine 
that is running snmpd (you'll want to secure it with a 
non-well-known community name and the usual access control stuff). 
Then just run mrtg's configuration maker against it: cfgmaker 
[some_host_name] >  some_host_name.cfg. If that works, you can 
then mrtg some_host_name.cfg and test it out. If it doesn't, you 
may want to run snmpwalk against some_host_name

[...ers/paul/src/darwinports/dports/net/mrtg]:: cfgmaker 
[community_name]@pink
--base: Get Device Info on [community_name]@pink:
--base: Vendor Id:
--base: Populating confcache
--snpo: confcache paulbeard.org at pink: Descr lo0 --> 1
--snpo: confcache paulbeard.org at pink: Descr gif0 --> 2
--snpo: confcache paulbeard.org at pink: Descr stf0 --> 3
--snpo: confcache paulbeard.org at pink: Descr en0 --> 4
--snpo: confcache paulbeard.org at pink: Ip 127.0.0.1 --> 1
--snpo: confcache paulbeard.org at pink: Ip 192.168.2.3 --> 4
--snpo: confcache paulbeard.org at pink: Type 24 --> 1
--snpo: confcache paulbeard.org at pink: Type 55 --> 2
--snpo: confcache paulbeard.org at pink: Type 57 --> 3
--snpo: confcache paulbeard.org at pink: Type 6 --> 4
--base: Get Interface Info
--base: Walking ifIndex
--base: Walking ifType
--base: Walking ifSpeed
--base: Walking ifAdminStatus
--base: Walking ifOperStatus
# Created by
# /opt/local/bin/cfgmaker [community_name]@pink


### 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


######################################################################
# System: pink
# Description: Darwin pink 6.5 Darwin Kernel Version 6.5: Mon Apr 
  7 17:05:38 PDT 2003; root:xnu/xnu-344.32.obj~1/RELEASE_PPC 
Power Macintosh
# Contact: paulbeard at mac.com
# Location: "my office"
######################################################################


### Interface 1 >> Descr: 'lo0' | Name: '' | Ip: '127.0.0.1' | 
Eth: '' ###
### The following interface is commented out because:
### * it is a Software Loopback interface
### * has a speed of 0 which makes no sense
#
# Target[pink_1]: 1:[community_name]@pink:
# SetEnv[pink_1]: MRTG_INT_IP="127.0.0.1" MRTG_INT_DESCR="lo0"
# MaxBytes[pink_1]: 0
# Title[pink_1]: Traffic Analysis for 1 -- pink
# PageTop[pink_1]: <H1>Traffic Analysis for 1 -- pink</H1>
#  <TABLE>
#    <TR><TD>System:</TD>     <TD>pink in "my office"</TD></TR>
#    <TR><TD>Maintainer:</TD> <TD>paulbeard at mac.com</TD></TR>
#    <TR><TD>Description:</TD><TD>lo0  </TD></TR>
#    <TR><TD>ifType:</TD>     <TD>softwareLoopback (24)</TD></TR>
#    <TR><TD>ifName:</TD>     <TD></TD></TR>
#    <TR><TD>Max Speed:</TD>  <TD>0.0 Bytes/s</TD></TR>
#    <TR><TD>Ip:</TD>         <TD>127.0.0.1 (localhost)</TD></TR>
#  </TABLE>


### Interface 2 >> Descr: 'gif0' | Name: '' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is administratively DOWN
### * it is operationally DOWN
### * has a speed of 0 which makes no sense
#
# Target[pink_2]: 2:[community_name]@pink:
# SetEnv[pink_2]: MRTG_INT_IP="" MRTG_INT_DESCR="gif0"
# MaxBytes[pink_2]: 0
# Title[pink_2]: Traffic Analysis for 2 -- pink
# PageTop[pink_2]: <H1>Traffic Analysis for 2 -- pink</H1>
#  <TABLE>
#    <TR><TD>System:</TD>     <TD>pink in "my office"</TD></TR>
#    <TR><TD>Maintainer:</TD> <TD>paulbeard at mac.com</TD></TR>
#    <TR><TD>Description:</TD><TD>gif0  </TD></TR>
#    <TR><TD>ifType:</TD>     <TD>100BaseVG (55)</TD></TR>
#    <TR><TD>ifName:</TD>     <TD></TD></TR>
#    <TR><TD>Max Speed:</TD>  <TD>0.0 Bytes/s</TD></TR>
#  </TABLE>


### Interface 3 >> Descr: 'stf0' | Name: '' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is administratively DOWN
### * it is operationally DOWN
### * has a speed of 0 which makes no sense
#
# Target[pink_3]: 3:[community_name]@pink:
# SetEnv[pink_3]: MRTG_INT_IP="" MRTG_INT_DESCR="stf0"
# MaxBytes[pink_3]: 0
# Title[pink_3]: Traffic Analysis for 3 -- pink
# PageTop[pink_3]: <H1>Traffic Analysis for 3 -- pink</H1>
#  <TABLE>
#    <TR><TD>System:</TD>     <TD>pink in "my office"</TD></TR>
#    <TR><TD>Maintainer:</TD> <TD>paulbeard at mac.com</TD></TR>
#    <TR><TD>Description:</TD><TD>stf0  </TD></TR>
#    <TR><TD>ifType:</TD>     <TD>HIPPI Interface (57)</TD></TR>
#    <TR><TD>ifName:</TD>     <TD></TD></TR>
#    <TR><TD>Max Speed:</TD>  <TD>0.0 Bytes/s</TD></TR>
#  </TABLE>


### Interface 4 >> Descr: 'en0' | Name: '' | Ip: '192.168.2.3' | 
Eth: '' ###

Target[pink_4]: 4:[community_name]@pink:
SetEnv[pink_4]: MRTG_INT_IP="192.168.2.3" MRTG_INT_DESCR="en0"
MaxBytes[pink_4]: 1250000
Title[pink_4]: Traffic Analysis for 4 -- pink
PageTop[pink_4]: <H1>Traffic Analysis for 4 -- pink</H1>
  <TABLE>
    <TR><TD>System:</TD>     <TD>pink in "my office"</TD></TR>
    <TR><TD>Maintainer:</TD> <TD>paulbeard at mac.com</TD></TR>
    <TR><TD>Description:</TD><TD>en0  </TD></TR>
    <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</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>192.168.2.3 
(pink.[community_name])</TD></TR>
  </TABLE>

And there you have it.

Next run indexmaker some_host_name.cfg > 
/path/to/webdocs/index.html and that's that. It's over but putting 
it on your (or root's crontab).

Here's an OS X machine as seen by MRTG:

http://paulbeard.no-ip.org/mrtg/pink/

The filesystem usage stuff is wonky, I realize: it needs to be 
multiplied by 4 but that seems not to work.

If you want to monitor more stuff (filesystem usage, running 
processes -- you can get the whole process table thru snmp, if you 
want it) run snmpwalk and pore over what comes back.

-- 
Paul Beard
<http://paulbeard.no-ip.org/movabletype/>
whois -h whois.networksolutions.com ha=pb202

A fool must now and then be right by chance.

--
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