LAN Monitoring - HOW TO ?

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

Moderators: Developers, Moderators

Post Reply
Fogg
Posts: 2
Joined: Thu Jan 26, 2006 8:31 am

LAN Monitoring - HOW TO ?

Post by Fogg »

Hi folks,

I am quite new to cacti and believe it is a very usefull tool!! So far I have managed to install it, and get the standard graphs for a local linux system (Memory usage, Disk usage, ...). Now I am struggling to get a LAN Load somehow. I figured I need SNMP for this. So far so good, SNMPD is running and answers to snmpwalk requests. I opened the firewall to connects to port 161 from localhost only.

But still, cacti complains about not getting any data. If I login into Cacti and try to add a new Graph I see the following message:
Data Query [SNMP - Interface Statistics] Reload Associated Query
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
Clicking the link I get:
+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/interface.xml'
Here some snmpwalk output....
[root@k063 root]# snmpwalk -v 1 -c public localhost
SNMPv2-MIB::sysDescr.0 = STRING: Linux k063.ims-firmen.de 2.4.25 #3 SMP Sa Mär 6 18:59:42 CET 2004 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (1331) 0:00:13.31
SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: k063.ims-firmen.de
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.4 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.5 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.6 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module to describe generic objects for network interface sub-layers
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.7 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.8 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.9 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (0) 0:00:00.00
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: dummy0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifType.3 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifSpeed.1 = Gauge32: 10000000
IF-MIB::ifSpeed.2 = Gauge32: 100000000
IF-MIB::ifSpeed.3 = Gauge32: 10000000
IF-MIB::ifPhysAddress.1 = STRING:
IF-MIB::ifPhysAddress.2 = STRING: 0:e0:81:27:c6:56
IF-MIB::ifPhysAddress.3 = STRING:
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.2 = INTEGER: up(1)
IF-MIB::ifOperStatus.3 = INTEGER: down(2)
IF-MIB::ifInOctets.1 = Counter32: 867705223
IF-MIB::ifInOctets.2 = Counter32: 2462770532
IF-MIB::ifInOctets.3 = Counter32: 0
IF-MIB::ifInUcastPkts.1 = Counter32: 60561451
IF-MIB::ifInUcastPkts.2 = Counter32: 1009206348
IF-MIB::ifInUcastPkts.3 = Counter32: 0
IF-MIB::ifInDiscards.1 = Counter32: 0
IF-MIB::ifInDiscards.2 = Counter32: 0
IF-MIB::ifInDiscards.3 = Counter32: 0
IF-MIB::ifInErrors.1 = Counter32: 0
IF-MIB::ifInErrors.2 = Counter32: 0
IF-MIB::ifInErrors.3 = Counter32: 0
IF-MIB::ifOutOctets.1 = Counter32: 867707000
IF-MIB::ifOutOctets.2 = Counter32: 1766514956
IF-MIB::ifOutOctets.3 = Counter32: 0
IF-MIB::ifOutUcastPkts.1 = Counter32: 60561475
IF-MIB::ifOutUcastPkts.2 = Counter32: 721904157
IF-MIB::ifOutUcastPkts.3 = Counter32: 0
IF-MIB::ifOutDiscards.1 = Counter32: 0
IF-MIB::ifOutDiscards.2 = Counter32: 0
IF-MIB::ifOutDiscards.3 = Counter32: 0
IF-MIB::ifOutErrors.1 = Counter32: 0
IF-MIB::ifOutErrors.2 = Counter32: 0
IF-MIB::ifOutErrors.3 = Counter32: 0
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntIfIndex.213.174.51.118 = INTEGER: 2
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (875398827) 101 days, 7:39:48.27
End of MIB

What else could be helpfull ?? I definitly appreciate some help here.....

Thanks,

Fogg
Fogg
Posts: 2
Joined: Thu Jan 26, 2006 8:31 am

Post by Fogg »

Ha !! GOTCHA!!

Good trick is not to use the 'Linux host' Template, rather user Generic SNMP Host. That seems to help. At least I have a graph now for my eth0.

All I wanted for now....
Weedy
Posts: 23
Joined: Thu Jan 26, 2006 7:07 pm

Post by Weedy »

i have the same problem but your fix doesnt work for me, im using

Code: Select all

[ebuild   R   ] net-analyzer/cacti-0.8.6h_p20060108  USE="apache2 snmp vhosts -apache" 1,080 kB
on Gentoo Base System version 1.12.0_pre15.
wirelessit
Posts: 6
Joined: Thu Feb 09, 2006 6:57 pm

Post by wirelessit »

Hi folks,
I'm going thru exactly what Fogg's explained in its first post.... just installed and configure cacti on my debian box... snmpd is running and everything... but I've been beating my brains up for 3 days now just trying to create an interface traffic graph for my eth0, PLEASE HELP ME! I'm getting frustrated, but I refuse to give up! I've devoulty googled around for a complete, clear how-to or tutorial, but no luck so far... I think cacti ought to develop a better documentation...

So, I started from scratch, added a new device (localhost), filled in Description, Hostname, and chose Host Template (Generic SNMP-enabled Host). Also filled in SNMP Community (public), and chose SNMP version (2), and finally hit the Save button.

Now, when I click on "*Create graphs for this Host" ...I'm supposed to just choose "Interface Traffic (bits/sec)" as the Graph Template, and then choose the interface I want to graph under "Data Query [SNMP - Interface Statistics]", and voila! ...However, this is all I'm seeing under "Data Query [SNMP - Interface Statistics]":

No Such Object 4.20.1.2
available on this
agent at this OID No more variables
left in this MIB View
(It is past the end of
the MIB tree)

- Messages above repeat a few times down here for each column-

So, WHAT AM I MISSING??? HOW DO I FIX THIS? What's next step? Please give me some pointers at least!.

I then went on and "created the graph, but it shows completely blank....

How do I pass on the info about my eth0 to cacti, so it can generate a traffic graph?

Please do reply, I'm sure there are many people out there who are pretty enthusiastic about running cacti, but getting frustrated going thru what I'm going now...

Best regards,
Fred

P.S. BTW, so you know what I'm running:
web:~# dpkg -l|grep cacti
ii cacti 0.8.6c-7sarge2 Frontend to rrdtool for monitoring systems a
web:~#
eto
Posts: 1
Joined: Thu Feb 09, 2006 10:12 pm

Post by eto »

I likewise installed cacti and snmp fresh through debian today.

The default device (localhost) properly shows graphs for load averages, logged in users, processes, and memory usage.

After installing SNMP on the machine and putting in the community the SNMP information appears on the device editing page. When doing a "verbose query" for "SNMP - Interface statistics" I get:

Code: Select all

+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'

gee:/etc/snmp# dpkg -l | grep cacti
ii cacti 0.8.6h-2 Frontend to rrdtool for monitoring systems and services


I'm assuming that since SNMP is not returning anything, it's leading to no graphs being generated. Any clues would be much appreciated.
puma5k
Posts: 8
Joined: Mon Jan 23, 2006 12:26 pm

Post by puma5k »

Hi

I am also having the same problem with cacti and snmp, i can't get snmpd to work right, that is a sample snmpd.conf out there that i can use to setup monitoring on eth0, when i setup cacti to graph on the localhost using snmp it gets errors on the "Data Query [SNMP - Interface Statistics]"

Has anyone out there got a way of checking snmpd.conf as the Net-snmp site is not very helpful.
it looks like alot of the problems we are having is to do with NET-SNMP on linux

P.S Fogg could you upload your snmpd.conf file to have a look at it, Thanks
wirelessit
Posts: 6
Joined: Thu Feb 09, 2006 6:57 pm

Post by wirelessit »

Hello,
I finally got cacti to "talk" snmp to all my machines...

After you install and start snmpd (an SNMP agent) on each machine you'd like to monitor. You must configure your snmpd.conf file (I put mine in /etc/snmp/snmpd.conf) on each machine (try runnning snmpconfg -g basic_setup). Although Just configuring a very very basic one like in http://www.cacti.net/downloads/docs/htm ... ml#AEN1900 should work!
just make sure you use the appropriate (matching) rocommunity ID

BTW, make sure your firewall(s) allow snmp traffic and ssh connection from the cacti machine to any machine you want to monitor... I kept getting a Connection REFUSED message in my log for one of my machines, which was driving me nuts! ...till I realized I had denied ssh access thru hosts.allow. So, adding my cacti machine's IP to the allow list solved the issue!

Hope my comments help anyone of you in any way...
Regards,
Fred

P.S. I'm now trying to graph squid statistics with cacti. Does anyone know of a good URL with help on this?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Of course, I do. See [XML] SquidStats version 0.1 (cacti 0.8.5 only!!!). Don't worry about 0.8.5. It works for current cacti versions. You may have to read through the whole topic and pay attention to the fact, that squids snmp agent does not listen to port 161 (we decided to configure the local snmpd to proxy the requests to squid. If you are interested in this single snmpd.conf line, I may provide this)
Reinhard
wirelessit
Posts: 6
Joined: Thu Feb 09, 2006 6:57 pm

Post by wirelessit »

Great! I will go thry that thread! ...will post some feedback later, commenting on my progress... Thanks a lot for replying!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests