I am attempting to run mrtg on my Red Hat Linux 6.2 machine and was
wondering if anybody has a sample config of snmpd.conf that I could refer to
while setting this up.
I don't know if snmpd when run right out of the box is supposed to work or
not. All I am trying to do is graph bandwidth utilization for an IP that is
bound to eth0 on the system.
I'm getting various errors and such, some of which are referenced many times
in this newsgroup for example "noSuchName" "No response received", but I
have found no absolute answers - possibly because the problem is too
obscure?
I have snmpd running and when I run ./mrtg with my mrtg.cfg it doesn't dump
any errors. When I go to my WorkDir I find my "mrtg.cfg" and another file
called "mrtg.ok" that is 0 bytes. I don't really understand how or where it
creates the HTML pages and what they are called.
I am absolutely confused. Eventually I would love to have snmp and mrtg
running across my entire network (I work for an ISP), but I cannot find any
resources at all out there that explains things from start to finish. All
the man pages and tutorials and README's and howto's all seem to assume that
I already understand how snmp works.
Anyway, if anybody out there can point be in the right direction I would be
grateful. Thanks in advance.
--M
> I am attempting to run mrtg on my Red Hat Linux 6.2 machine and was
>wondering if anybody has a sample config of snmpd.conf that I could refer to
>while setting this up.
Yep. RH 6.x is delivered with the SNMP security set so that local users
can't see very much. I guess this is a good thing. Hacked from one of
my previous posting. Some of the following might be a bit out of
context as it was to answer some other question.
====
If you're getting just the System part of the tree when you run:
snmpwalk localhost public iso
you're getting hit by the V2 security in the:
/etc/snmp/snmpd.conf
(blah-blah-blah)
On what I guess is a RH 6.x box try for snmpd.conf the following. Be
sure to change the community names (passwords) and LAN IP address. I
vaguely recall that someone followed this up with a correction, but I
can't find it right now.
###############################################################################
# snmpd.conf:
# Sample for RedHat 6.1
# by Jeff Liebermann 02/03/2001
###############################################################################
# System contact information
syscontact je...@comix.santa-cruz.ca.us
syslocation WISP High
###############################################################################
#
# The rules:
# localhost has read and write access.
# local class C network has read and write access.
# Everyone else gets just the system group.
#
# sec.name source community (password)
com2sec Mybox localhost clever-password
com2sec LocalLan 192.168.111.0/24 public
com2sec Outside default top-secret
#
# group.name sec.model sec.name
group RWGroup V1 Mybox
group ROGroup V1 LocalLan
group Others V1 Outside
#
# incl/excl subtree mask
view all included .1 80
view system included system fe
#
# context sec.model sec.level prefix read write notif
access ROGroup "" V1 noauth exact all none none
access RWGroup "" V1 noauth exact all all all
access Others "" V1 noauth exact system none none
###############################################################################
>I don't know if snmpd when run right out of the box is supposed to work or
>not.
Ummm... Define "work". If you mean that any random hacker like me can
attack your system using the default passwords and wide open permissions,
on initial installation, the answer is no. The default installation
should be secure, not open.
>All I am trying to do is graph bandwidth utilization for an IP that is
>bound to eth0 on the system.
You'll need to play with snmpd.conf to give yourself permission to look
at your own machine.
>I have snmpd running and when I run ./mrtg with my mrtg.cfg it doesn't dump
>any errors. When I go to my WorkDir I find my "mrtg.cfg" and another file
>called "mrtg.ok" that is 0 bytes. I don't really understand how or where it
>creates the HTML pages and what they are called.
Please don't use MRTG to troubleshoot SNMP configuration problems. It
does have diagnostics but will not tell you much about things outside of
MRTG. Use: snmpwalk and snmpget
>I am absolutely confused. Eventually I would love to have snmp and mrtg
>running across my entire network (I work for an ISP),
One must suffer before enlightenment. Normally, that means reading the
manual. However, in this case, it's not in the manual or any of the SNMP
docs that I've excavated. I also could not find it on the Net-SNMP web
pile at:
http://net-snmp.sourceforge.net
>but I cannot find any
>resources at all out there that explains things from start to finish.
That's why it's called *SIMPLE* network management protocol. It's so
simple, it doesn't require an explanation.
>All
>the man pages and tutorials and README's and howto's all seem to assume that
>I already understand how snmp works.
It part of my job security plan. By with-holding information on SNMP, I
get high paying contracts to perform miraculous installations and invoke
mysterious incantations from the command line. I shudder at the thought
of the GUM (great unwashed masses) actually understanding and using SNMP.
>Anyway, if anybody out there can point be in the right direction I would be
>grateful. Thanks in advance.
Actually, if you read the snmpd.conf file and accompanying man page, it's
fairly simple. Trial and error is probably necessary. Be sure to send
the snmpd deamon a "kill -1 PID" to bludgeon it into re-reading its
config files. There are also some books, that I can't afford and don't
have time to read anyway, on SNMP that covers V2 and V3 security.
--
Jeff Liebermann 150 Felker St #D Santa Cruz CA 95060
(831)421-6491 pgr (831)426-1240 fax (831)336-2558 home
http://www.LearnByDestroying.com WB6SSY
je...@comix.santa-cruz.ca.us je...@cruzio.com
./cfgmaker --global 'WorkDir: /home/httpd/html/mrtg' --global 'Options[_]:
bits, growright' --output /home/httpd/html/mrtg.cfg pub...@192.168.0.50
And this is *some* of what I get:
--base: Get Device Info on pub...@192.168.0.50:
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.2.1.1.1.0)
SNMPv1_Session (remote host: "192.168.0.50" [192.168.0.50].161)
community: "public"
request ID: 870632885
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
SNMP Error:
no response received
SNMPv1_Session (remote host: "192.168.0.50" [192.168.0.50].161)
community: "public"
request ID: 870632885
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
SNMPGET Problem for sysDescr sysContact sysName sysLocation sysObjectID on
pub...@192.168.0.50:
at ./cfgmaker line 448
--base: Vendor Id:
--base: Populating confcache
SNMP Error:
no response received
SNMPWALK Problem for 1.3.6.1.2.1.4.20.1.2 on pub...@192.168.0.50:
at /usr/local/mrtg-2/bin/../lib/mrtg2/MRTG_lib.pm line 1236
--snpo: confcache pub...@192.168.0.50: Ip -->
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.2.1.2.2.1.6)
SNMPv1_Session (remote host: "192.168.0.50" [192.168.0.50].161)
community: "public"
request ID: 870632890
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
-----------------------
I am the first to admit that I have no idea how to set this up, i've just
been following some examples.
Any help is appreciated. Thanks.
--M
"Roger Summars" <rnsu...@NOSPAMpldi.net> wrote in message
news:3AE1F3EC...@NOSPAMpldi.net...
>That's why it's called *SIMPLE* network management protocol. It's so
>simple, it doesn't require an explanation.
I sure hope your were being sarcastic in that comment, because SNMP is
anything but simple.
Anyway, thanks for the sample config, i think things are finally starting to
gel. Thanks again :)
-M