SNMP on Redhat 7.1 Linux for MRTG

SNMP on Redhat 7.1 Linux for MRTG

Post by Ed » Fri, 02 Nov 2001 14:35:38



I'm trying to run MRTG on a Linux box to monitor several counters as TCP
connections, FTP, WWW traffic, etc.... I'm having some problems getting SNMP
to work, I get a message that it is not responding when I try snmpget
anything.  How can I configure SNMP to respond to requests from MRTG?  Any
help would be greatly appreciated.

Thanks,

Edson.

 
 
 

SNMP on Redhat 7.1 Linux for MRTG

Post by Michael Heimin » Fri, 02 Nov 2001 20:12:40



Quote:> I'm trying to run MRTG on a Linux box to monitor several counters as
> TCP connections, FTP, WWW traffic, etc....

You won't get those stats via SNMP, just the in/out traffic per
interface.

Quote:> I'm having some problems
> getting SNMP to work, I get a message that it is not responding when
> I try snmpget
> anything.  How can I configure SNMP to respond to requests from
> MRTG?  Any help would be greatly appreciated.

Is snmpd running? Check your snmpd.conf for the community name and to
which IP it should listens (0.0.0.0 means listen to everyone who
knows the community name, this might be a security problem). Try
'snmpwalk' to start.

Michael Heiming

 
 
 

SNMP on Redhat 7.1 Linux for MRTG

Post by Andrei Ivan » Sun, 04 Nov 2001 06:07:10




>> I'm trying to run MRTG on a Linux box to monitor several counters as
>> TCP connections, FTP, WWW traffic, etc....

> You won't get those stats via SNMP, just the in/out traffic per
> interface.

Can't agree with you. Using UCD-SNMP daemon on Linux box, one can
easily obtain several parameters, like 5-min CPU utilization (as in
uptime), amount of total/used RAM/swap, etc. Some other counters
(anything that can be presented as an integer) may be obtained by
using additional helper programs. For example, on one of my computers
I'm checking number of bytes received over serial port:

  File: /etc/snmp/snmpd.conf

  rocommunity public
  exec tty-rx /bin/ash /etc/snmp/tty-rx.sh

  File: /etc/snmp/tty-rx.sh

  #!/bin/ash
  awk '/^1:/ {print substr($7,4)}' /proc/tty/driver/serial 2>/dev/null

Then I'm using the following OID to retrieve said counter:

  enterprises.ucdavis.extTable.extEntry.extOutput.1 =
  .1.3.6.1.4.1.2021.8.1.101.1

--
andrei

 
 
 

SNMP on Redhat 7.1 Linux for MRTG

Post by Michael Heimin » Sun, 04 Nov 2001 06:39:49



22:07:



>>> I'm trying to run MRTG on a Linux box to monitor several counters
>>> as TCP connections, FTP, WWW traffic, etc....

>> You won't get those stats via SNMP, just the in/out traffic per
>> interface.

> Can't agree with you. Using UCD-SNMP daemon on Linux box, one can
> easily obtain several parameters, like 5-min CPU utilization (as in
> uptime), amount of total/used RAM/swap, etc. Some other counters
> (anything that can be presented as an integer) may be obtained by
> using additional helper programs. For example, on one of my
> computers I'm checking number of bytes received over serial port:

You missread the OP and my post, he wanted stats for different "TCP
connections, FTP, WWW traffic, etc"

You won't get those stats via SNMP, just the in/out traffic per
interface!

I didn't talked about other parameters you may obtain, sure there are
many, performing an snmpwalk will show, or just looking at the MIBs.

Michael Heiming

 
 
 

SNMP on Redhat 7.1 Linux for MRTG

Post by Andrei Ivan » Sun, 04 Nov 2001 07:48:33




>> Can't agree with you. Using UCD-SNMP daemon on Linux box, one can
>> easily obtain several parameters, like 5-min CPU utilization (as in
>> uptime), amount of total/used RAM/swap, etc. Some other counters
>> (anything that can be presented as an integer) may be obtained by
>> using additional helper programs. For example, on one of my
>> computers I'm checking number of bytes received over serial port:

> You missread the OP and my post, he wanted stats for different "TCP
> connections, FTP, WWW traffic, etc"

> You won't get those stats via SNMP, just the in/out traffic per
> interface!

Using approach described in my previous posting, one can grab
whatever statistics he needs. External program can return number
of TCP connections (active, or in fin_wait state, for example),
number of records in ftp/www log file, number of bytes transferred,
number of processes running, whatever else he/she needs to know
about this particular system. If one is able to construct OID -
SNMP daemon will deliver data, and MRTG will store/visualize it.
There are no restrictions like "only in/out traffic per interface"
in MRTG, nor in UCD-SNMP.

--
andrei

 
 
 

SNMP on Redhat 7.1 Linux for MRTG

Post by Michael Heimin » Sun, 04 Nov 2001 08:20:22



23:48:



>>> Can't agree with you. Using UCD-SNMP daemon on Linux box, one can
>>> easily obtain several parameters, like 5-min CPU utilization (as
>>> in uptime), amount of total/used RAM/swap, etc. Some other
>>> counters (anything that can be presented as an integer) may be

use Tobi Oetikers RRDtool (aka MRTG3) it has no limits with integers.

Quote:>>> obtained by using additional helper programs. For example, on one
>>> of my computers I'm checking number of bytes received over serial
>>> port:

>> You missread the OP and my post, he wanted stats for different "TCP
>> connections, FTP, WWW traffic, etc"

>> You won't get those stats via SNMP, just the in/out traffic per
>> interface!

> Using approach described in my previous posting, one can grab
> whatever statistics he needs. External program can return number
> of TCP connections (active, or in fin_wait state, for example),

Of course externel helper can do lots and play data into MRTG, but
that has nothing to do with the question about SNMP, you can even
setup your own MIBs to get what you want, but I really don't think
that's what the OPs post was about, it didn't sound for me as he
would be aware of programming/extending MIBs and with the standart
SNMPd running, without all your enhancements you won't get those
stats for FTP, WWW, etc traffic. Plain and simple.

Michael Heiming

 
 
 

SNMP on Redhat 7.1 Linux for MRTG

Post by Michael Heimin » Sun, 04 Nov 2001 08:30:22



2001 00:20:

[SNIP some discussion about SNMP/MRTG]

Perhaps the OP should better look at 'ntop', running in web mode will
generate stats he may want to see and setup is a piece of cake...;-)

Michael Heiming

 
 
 

1. redhat 7.1 MRTG configuration

I installed ucp-snmp using redhat's rpm packages
I also installed mrtg using rpm.


I get the following result:


--base: Vendor Id:
--base: Populating confcache
sh: /usr/bin/lpstat: No such file or directory
sh: /usr/bin/lpstat: No such file or directory
sh: /usr/bin/lpstat: No such file or directory
sh: /usr/bin/lpstat: No such file or directory
sh: /usr/bin/lpstat: No such file or directory
sh: /usr/bin/lpstat: No such file or directory
SNMP Error:
no response received
SNMPv1_Session (remote host: "wastiaux4" [127.0.0.1].161)
                  community: "public"
                 request ID: 537389573
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)

SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 1 (OID: 1.3.6.1.2.1.31.1.1.1.1)
SNMPv1_Session (remote host: "wastiaux4" [127.0.0.1].161)
                  community: "public"
                 request ID: 537389574
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
sh: /usr/bin/lpstat: No such file or directory
sh: /usr/bin/lpstat: No such file or directory
sh: /usr/bin/lpstat: No such file or directory
sh: /usr/bin/lpstat: No such file or directory
sh: /usr/bin/lpstat: No such file or directory
sh: /usr/bin/lpstat: No such file or directory


Can someone tell me what's wrong?

both snmpd and snmptrapd daemons are running (
although they might not be correctly configured).

Can someone tell me what's wrong ?

thanks.
--

2. 7500e External Parallel 6X/2X/2X Rewritable Drive

3. MRTG, RedHat, and ucd-snmp

4. trying to block users behind masquerading server to visit web sites

5. Linux 2.2.1 : bogus high traffic with snmp/mrtg

6. probs DNS named configuration

7. mrtg/ucd-snmp and Linux

8. srcsys.tar.gz - missing directories || ISDN for OpenBSD 3.0

9. mrtg snmp linux ipchains how?

10. Buggy Redhat 7.1 - What is the Most stable version of Redhat Linux 6.1 or 6.2 ?

11. SNMP on 2.2.2-Release for Network Traffic with MRTG.

12. MRTG SNMP MIB Temperature

13. Net snmp + mrtg