snmp interface traffic only inbound

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
modules
Posts: 9
Joined: Sat Mar 11, 2006 9:12 am

snmp interface traffic only inbound

Post by modules »

Hi, I am monitoring a remote host via snmpd and cacti.

The only thing displayed is the inbound traffic. For outbound i always
got zero. Tried with ucd 80 Lan and Interface - Traffic (bits/sec, Total Bandwidth) Graph Template.

Can somebody help?
modules
Posts: 9
Joined: Sat Mar 11, 2006 9:12 am

Post by modules »

Did a snmpwalk on this host:

Code: Select all

...
ifOutOctets.1 = Counter32: 0
ifOutOctets.2 = Counter32: 20488
ifOutOctets.3 = Counter32: 0
...
Maybe i do not get data because ifOutOctest.1 == zero?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please change Settings -> Logging Level to DEBUG and look at log/cacti.log for OIDs gathered for that host. You should see two of them reporting the values gathered from the device. If there's anything unusual with this, please pos tthat snippet of the logfile
Reinhard
modules
Posts: 9
Joined: Sat Mar 11, 2006 9:12 am

Post by modules »

think this is the relevant part:

Code: Select all

03/12/2006 04:52:47 PM - CMDPHP: Poller[0] Host[3] DS[37] SNMP: v2: 192.168.0.5, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.1, output: 0
03/12/2006 04:52:47 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (37,'traffic_out','2006-03-12 16:52:46','0')"
03/12/2006 04:52:47 PM - CMDPHP: Poller[0] Host[3] DS[37] SNMP: v2: 192.168.0.5, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.1, output: 798974279
03/12/2006 04:52:47 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (37,'traffic_in','2006-03-12 16:52:46','798974279')"
snmp is replying 0 on output. Maybe i have misconfigured snmpd on the remote host...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

modules wrote:think this is the relevant part:

Code: Select all

03/12/2006 04:52:47 PM - CMDPHP: Poller[0] Host[3] DS[37] SNMP: v2: 192.168.0.5, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.1, output: 0
03/12/2006 04:52:47 PM - CMDPHP: Poller[0] Host[3] DS[37] SNMP: v2: 192.168.0.5, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.1, output: 798974279
You're polling index 1 of your interface table. Above, you've stated, that if 2 is the more interesting one. Perhaps you've chosen the wrong interface index from the interface table for that host (you should see all three of them, please select index 2)
Reinhard
modules
Posts: 9
Joined: Sat Mar 11, 2006 9:12 am

Post by modules »

Seems like my snmpd configuration is not ok.

With the same request on localhost (before was remote) i got
the right data:

Code: Select all

ifInOctets.1 = Counter32: 801126457
ifInOctets.2 = Counter32: 29890
ifInOctets.3 = Counter32: 0
ifOutOctets.1 = Counter32: 11330050437
ifOutOctets.2 = Counter32: 31639
ifOutOctets.3 = Counter32: 0
hrSWRunParameters.23625 = STRING: "Oc"
will read more docs now.)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post a screenshot of the Interface Table when you Create Graphs for this Host. Perhaps I may help
Reinhard
modules
Posts: 9
Joined: Sat Mar 11, 2006 9:12 am

Post by modules »

You mean something like this here?
Attachments
Bild 2.png
Bild 2.png (44.21 KiB) Viewed 2725 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Yes, that's a good one. It seems to be an SNMP V2 Host, eh? And you created a Traffic Graph for eth0, which is index 1, right? And the Graphs do not show? Please post a screenshot of the graph you have created for this device.
And please do an snmpwalk -v 2c for the interface mib and for IF-MIBII (the 64 bit counters), e.g. OIDs .1.3.6.1.2.1.31.1.1.1.6 for Bytes In and .1.3.6.1.2.1.31.1.1.1.10 for Bytes Out. Did you create the 64 Bit Counter Graphs or the 32 bit (standard) ones?
And please post again the snipped from log showing the snmpwalk for the OIDs of this host...
Reinhard
modules
Posts: 9
Joined: Sat Mar 11, 2006 9:12 am

Post by modules »

Yes, it is an snmp v2 host (i choosed this) and i created a traffic graph for eth0 with index1. The graph shows, but only inbound traffic. I tried 32 and 64 Bit Counter Graphs. Now its 32 again.

Here is the snmpwalk (remote && local):

Code: Select all

remote machine:
$ snmpwalk -Os -c testa -v 2c 192.168.0.5 .1.3.6.1.2.1.31.1.1.1.6
ifHCInOctets = No Such Object available on this agent at this OID
$ snmpwalk -Os -c testa -v 2c 192.168.0.5 .1.3.6.1.2.1.31.1.1.1.10
ifHCOutOctets = No Such Object available on this agent at this OID

locale machine:
$ snmpwalk -Os -c testa -v 2c 192.168.0.5 .1.3.6.1.2.1.31.1.1.1.6
ifHCInOctets = No Such Object available on this agent at this OID
$ snmpwalk -Os -c testa -v 2c 127.0.0.1 .1.3.6.1.2.1.31.1.1.1.6
ifHCInOctets = No Such Object available on this agent at this OID
Seems like this OIDs do not exist. Maybe it isn't a snmp v2 host?

And here the debug log:

Code: Select all

...
03/13/2006 01:08:58 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (95,'traffic_out','2006-03-13 01:08:53','0')"
03/13/2006 01:08:58 AM - CMDPHP: Poller[0] Host[13] DS[95] SNMP: v2: 192.168.0.5, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.1, output: 0
03/13/2006 01:08:58 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (95,'traffic_in','2006-03-13 01:08:53','803315599')"
03/13/2006 01:08:58 AM - CMDPHP: Poller[0] Host[13] DS[95] SNMP: v2: 192.168.0.5, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.1, output: 803315599
...
 03/13/2006 01:08:58 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (94,'traffic_in','2006-03-13 01:08:53','U')"
03/13/2006 01:08:58 AM - CMDPHP: Poller[0] Host[13] DS[94] SNMP: v2: 192.168.0.5, dsname: traffic_in, oid: .1.3.6.1.2.1.31.1.1.1.6.1, output: U
03/13/2006 01:08:58 AM - CMDPHP: Poller[0] Host[13] DS[94] WARNING: Result from SNMP not valid. Partial Result: No Such Object avail
03/13/2006 01:08:57 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (94,'traffic_out','2006-03-13 01:08:53','U')"
03/13/2006 01:08:57 AM - CMDPHP: Poller[0] Host[13] DS[94] SNMP: v2: 192.168.0.5, dsname: traffic_out, oid: .1.3.6.1.2.1.31.1.1.1.10.1, output: U
03/13/2006 01:08:57 AM - CMDPHP: Poller[0] Host[13] DS[94] WARNING: Result from SNMP not valid. Partial Result: No Such Object avail
03/13/2006 01:08:57 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (93,'traffic_in','2006-03-13 01:08:53','803315339')"
03/13/2006 01:08:57 AM - CMDPHP: Poller[0] Host[13] DS[93] SNMP: v2: 192.168.0.5, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.1, output: 803315339
03/13/2006 01:08:57 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (93,'traffic_out','2006-03-13 01:08:53','0')"
03/13/2006 01:08:57 AM - CMDPHP: Poller[0] Host[13] DS[93] SNMP: v2: 192.168.0.5, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.1, output: 0
...
03/13/2006 01:08:57 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (86,'traffic_out','2006-03-13 01:08:53','0')"
03/13/2006 01:08:57 AM - CMDPHP: Poller[0] Host[7] DS[86] SNMP: v2: 192.168.0.5, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.1, output: 0
03/13/2006 01:08:57 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (86,'traffic_in','2006-03-13 01:08:53','803314913')"
03/13/2006 01:08:57 AM - CMDPHP: Poller[0] Host[7] DS[86] SNMP: v2: 192.168.0.5, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.1, output: 803314913
03/13/2006 01:08:55 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (38,'traffic_in','2006-03-13 01:08:53','803314575')"
03/13/2006 01:08:55 AM - CMDPHP: Poller[0] Host[3] DS[38] SNMP: v2: 192.168.0.5, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.1, output: 803314575
03/13/2006 01:08:55 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (38,'traffic_out','2006-03-13 01:08:53','0')"
03/13/2006 01:08:55 AM - CMDPHP: Poller[0] Host[3] DS[38] SNMP: v2: 192.168.0.5, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.1, output: 0
03/13/2006 01:08:55 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (37,'traffic_in','2006-03-13 01:08:53','803314403')"
03/13/2006 01:08:55 AM - CMDPHP: Poller[0] Host[3] DS[37] SNMP: v2: 192.168.0.5, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.1, output: 803314403
03/13/2006 01:08:55 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (37,'traffic_out','2006-03-13 01:08:53','0')"
03/13/2006 01:08:55 AM - CMDPHP: Poller[0] Host[3] DS[37] SNMP: v2: 192.168.0.5, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.1, output: 0 
Attachments
graph
graph
Bild 1.png (70.45 KiB) Viewed 2706 times
rrddebug output
rrddebug output
Bild 2.png (16.58 KiB) Viewed 2706 times
modules
Posts: 9
Joined: Sat Mar 11, 2006 9:12 am

Post by modules »

A few more questions.

Why you ask me to look for .1.3.6.1.2.1.31.1.1.1.6 and .1.3.6.1.2.1.31.1.1.1.10 (ifHCInOctets and ifHCOutOctets, right?)?
Isnt the data in ifOutOctets?

When to choose 64 Bit Counter Graphs? If the system is a 64 bit machine?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The 64 bits graphs refer to those HC-OIDs. They are available only when using snmp V2c. But you may use 32bit counters. There's no NEED to change to 64 bit
And your snmpwalk clearly show that this host is not responding for snmp V2c requests. So please set configuration back to snmp v1. You will have to throw away all graphs and data sources generated for 64 bit counters. You may stick to all graph templates and data sources generated for 32 bit counters. They should start gathering and graphing about 10minutes later. Perhaps you will have to Clear Poller Cache which in fact rebuilds the poller cache (see: System Utilities)
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest