mrtg and snmp help needed
Hi, list.
I am planning to set up a statistics generator for a number of hosts. My idea
was to try mrtg.
I read a few articles on the net and installed on my test machine the packets
mrtg and snmpd.
The test machine is a knoopix 3.6 installed on the hard drive and upgraded to
debian-sid.
The hosts I intend to monitor are debian-sid too.
I tried the following sample configuration of mrtg in order to test things on
the localhost:
/etc/mrtg.conf is liek this:
######################################################################
# Multi Router Traffic Grapher -- Sample Configuration File
######################################################################
# This file is for use with mrtg-2.5.4c
# Global configuration
WorkDir: /var/www/mrtg
WriteExpires: Yes
Title[^]: Traffic Analysis for
# 128K leased line
# ----------------
Title[leased]: a 128K leased line
PageTop[leased]: <H1>Our 128K link to the outside world</H1>
Target[leased]: 1:public@10.50.0.17:161
MaxBytes[leased]: 16000
and the /etc/snmp/snmp.conf is this:
com2sec readonly 10.50.0.0/25 public
However nothing happeds.
I included in the mrtg.conf a script that checks the test machine cpu and
memory and I am sure mrtg works properly, for I get graphs, etc for the
second configuration.
I am sure snmpd listens on all interfaces, for netstat -a says so.
But when I fire up
# mrtg
I get the output:
root@it2:/home/chavdar# mrtg
SNMP Error:
no response received
SNMPv1_Session (remote host: "10.50.0.17" [10.50.0.17].161)
community: "public"
request ID: 1061100499
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/share/perl5/SNMP_util.pm line 490
SNMPGET Problem for ifInOctets.1 ifOutOctets.1 sysUptime sysName on
public@10.50.0.17:161:::::v4only
at /usr/bin/mrtg line 1854
WARNING: skipping because at least the query for ifInOctets.1 on 10.50.0.17
did not succeed
WARNING: no data for ifInOctets&ifOutOctets:public@10.50.0.17. Skipping
further queries for Host 10.50.0.17 in this round.
ERROR: Target[leased][_IN_] ' $target->[0]{$mode} ' did not eval into defined
data
ERROR: Target[leased][_OUT_] ' $target->[0]{$mode} ' did not eval into defined
data
And indeed when I tcpdump I don't see the response on the snmp requests:
root@it2:/home/chavdar# tcpdump -i lo
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 96 bytes
11:39:03.256499 IP 10.50.0.17.32819 > 10.50.0.17.snmp: GetRequest(39)
interfaces.ifTable.ifEntry.ifInOctets.2 [|snmp]
11:39:05.254971 IP 10.50.0.17.32819 > 10.50.0.17.snmp: GetRequest(39)
interfaces.ifTable.ifEntry.ifInOctets.2 [|snmp]
11:39:07.255045 IP 10.50.0.17.32819 > 10.50.0.17.snmp: GetRequest(39)
interfaces.ifTable.ifEntry.ifInOctets.2 [|snmp]
11:39:09.255103 IP 10.50.0.17.32819 > 10.50.0.17.snmp: GetRequest(39)
interfaces.ifTable.ifEntry.ifInOctets.2 [|snmp]
I have no clue here. Can someone give me a hint, because in the articles I
read in the official sites of mrtg, snmpd and elsewhere it is implied that
everything works but not wirh me.
Thanks for your help!
Regards
Chavdar Videff
Reply to: