Re: MRTG/snmpd configuration


Subject: Re: MRTG/snmpd configuration
From: W.D.McKinney (deem@wdm.com)
Date: Wed Dec 10 2003 - 19:32:02 AKST


On Wed, 2003-12-10 at 19:30, Dan Wolf wrote:
> Justin,
> When you execute cfgmaker it tries to access the snmp counters for the
> device you specify. When you configure SNMP on a device you generally have
> an option to define the Community names. Community names allow for grouping
> of SNMP devices for ease of management. You might wish to use SNMP for all
> of the SNMP capable devices in a company so you might set the community name
> to 'ACME-AK' for all your devices. So in order to correctly query an SNMP
> counter on a device the requesting program must specify the community
> string, Additionally the Community name is associated with SNMP security ie;
> (ACME-AK ro) or (ACME-AK rw). By default an SNMP enabled device has the
> Community name 'Public' unless otherwise specified. With all that said it
> appears you are attempting to get MRTG to generate a config file for you
> local machine. So the error appears to point at your SNMP setup(no response
> received). I wish I could give you more/better info but I use MRTG to
> monitor traffic through Cisco routers and switches and I have no experience
> setting up SNMP on a Linux box......... yet :-). If you don't get an answer
> from someone on the list you might try posting your question on the MRTG
> list as it is very active and generally helpful.
> Dan
>

Good job explaining things Dan, thanks for your post. For a local config
use this:

######################################################################
# #
# this is the eth0 traffic graphing section from /proc/net/dev #
# change "grep eth0" to something else to measure a different device #
# #
######################################################################
Target[eth0]: `perl -e '@a=split(/[:\s]+/,qx(grep eth0
/proc/net/dev));$f="%.0f";$fmt="$f\n$f\n1\neth0 traffic\n";$s=sprintf
$fmt,$a[2],$a[10];print $s; print STDERR $s;'`;
Options[eth0]: noinfo, growright, transparent, dorelpercent
MaxBytes[eth0]: 12500000
# MaxBytes2[eth0]: 12500000
# AbsMax[eth0]: 12500000
kilo[eth0]: 1024
YLegend[eth0]: Bytes per second
ShortLegend[eth0]: B/s
Legend1[eth0]: Incoming Traffic in Bytes per second
Legend2[eth0]: Outgoing Traffic in Bytes per second
Legend3[eth0]: Maximal 10 Minute Incoming Traffic
Legend4[eth0]: Maximal 10 Minute Outgoing Traffic
LegendI[eth0]:  In:
LegendO[eth0]:  Out:
Timezone[eth0]: GMT
Title[eth0]: Server eth0 traffic
PageFoot[eth0]: Contact us <a href="http://www.akwireless.net">here</a>
<p>
PageTop[eth0]: <H1>Server eth0 traffic</H1>
######################################################################

Dee

> ----- Original Message -----
> From: "Justin Dieters" <enderak@gci.net>
> To: <aklug@aklug.org>
> Sent: Wednesday, December 10, 2003 4:36 PM
> Subject: MRTG/snmpd configuration
>
>
> >
> > MRTG seems like it will work well for what I need. I followed the
> installation instructions, and I've successfully gotten to the configuration
> part, but now I'm stuck, and the install documentation seems to assume you
> know what you're doing already, and I'm hoping someone can help out.
> >
> > I to ./cfgmaker [...] localhost, and I get this returned (along with a
> little more detail)
> > -----
> > --base: Get Device Info on public@localhost:
> > SNMP Error:
> > no response received
> > SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
> > community: "public"
> > -----
> >
> > I started the snmpd using "/etc/init.d/snmpd start".
> >
> > I'm guessing that either i don't have something configured with snmpd that
> needs to be, or I am just giving MRTG's cfgmaker the wrong information.
> (I.e. what does community: "public" mean? I never set this anywhere...)
> >
> > Thanks,
> > Justin
> >

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Wed Dec 10 2003 - 19:32:08 AKST