LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-22-2012, 09:42 AM   #1
pendrive
Member
 
Registered: Mar 2011
Posts: 51

Rep: Reputation: 2
Problem in making cacti-0.8.8a to draw snmp graphs


Hi dears

I have a remote ubuntu vps server that I'm gonna have some network traffics graphs on some specific ports with cacti-0.8.8a . I did some linux side snmp config and it works well. here is the snmpwalk output on my local laptop:

Code:
$ snmpwalk -v1 -c secret Server_Ip .1.3.6.1.4.1.2021.61
iso.3.6.1.4.1.2021.61.1.0 = INTEGER: -1217653456
iso.3.6.1.4.1.2021.61.2.1.2.11.116.114.97.102.102.105.99.95.111.117.116 = STRING: "/opt/iptables_traffic_eval.sh"
iso.3.6.1.4.1.2021.61.2.1.3.11.116.114.97.102.102.105.99.95.111.117.116 = STRING: "out"
iso.3.6.1.4.1.2021.61.2.1.4.11.116.114.97.102.102.105.99.95.111.117.116 = ""
iso.3.6.1.4.1.2021.61.2.1.5.11.116.114.97.102.102.105.99.95.111.117.116 = INTEGER: 5
iso.3.6.1.4.1.2021.61.2.1.6.11.116.114.97.102.102.105.99.95.111.117.116 = INTEGER: 1
iso.3.6.1.4.1.2021.61.2.1.7.11.116.114.97.102.102.105.99.95.111.117.116 = INTEGER: 1
iso.3.6.1.4.1.2021.61.2.1.20.11.116.114.97.102.102.105.99.95.111.117.116 = INTEGER: 4
iso.3.6.1.4.1.2021.61.2.1.21.11.116.114.97.102.102.105.99.95.111.117.116 = INTEGER: 1
iso.3.6.1.4.1.2021.61.3.1.1.11.116.114.97.102.102.105.99.95.111.117.116 = STRING: "1555690"
iso.3.6.1.4.1.2021.61.3.1.2.11.116.114.97.102.102.105.99.95.111.117.116 = STRING: "1555690"
iso.3.6.1.4.1.2021.61.3.1.3.11.116.114.97.102.102.105.99.95.111.117.116 = INTEGER: 1
iso.3.6.1.4.1.2021.61.3.1.4.11.116.114.97.102.102.105.99.95.111.117.116 = INTEGER: 0
iso.3.6.1.4.1.2021.61.4.1.2.11.116.114.97.102.102.105.99.95.111.117.116.1 = STRING: "1555690"

but here are the whole work

I installed net-snmp on it and putted this entry inside it

Code:
extend .1.3.6.1.4.1.2021.61 traffic_out /opt/iptables_traffic_eval.sh out
the iptables_traffic_eval.sh file contains this part of codes:

Code:
#!/bin/bash
[ $1 ] || exit 42;

iptables -vxnL traffic_$1 | grep -v Chain | grep -v bytes | awk {'print $2'}
which is suppose to show the passed bytes of traffic_out chain and I assembled it before to count 80 port output bytes.

as I mentioned before snmpwalk works well and here is the snmpget output

Code:
$ snmpget -v1 -c secret Server_Ip iso.3.6.1.4.1.2021.61.4.1.2.11.116.114.97.102.102.105.99.95.111.117.116.1
iso.3.6.1.4.1.2021.61.4.1.2.11.116.114.97.102.102.105.99.95.111.117.116.1 = STRING: "1555690"
as you can see, it shows the output well too.

in the cacti part, I added a device with these details:

Hostname -> Server_Ip
Host Template -> Generic Snmp-enabled Host
Downed Device Detection -> I tested all of them
snmp version -> selected 1 and entered right community and port number and left the others default

then saved the device and it gave me (this is the output of snmp get next as downed device detection)

Code:
SNMP Information
System:Linux srv63.somehostname.com 2.6.32-21-generic-pae #32-Ubuntu SMP Fri Apr
16 09:39:35 UTC 2010 i686
Uptime: 532838 (0 days, 1 hours, 28 minutes)
Hostname: srv63.somehostname.com
Location: Germany (configure /etc/snmp/snmpd.local.conf)
Contact: Root root@localhost (configure /etc/snmp/snmpd.local.conf)
in the device list it shows the status down for "snmp get next" but I'm pretty sure that host and snmp is up, but for some of them like ping, it shoes up

after the device I tried to create graph and snmp generic oid as template. then I left the data source type as GAUGE and entered iso.3.6.1.4.1.2021.61.4.1.2.11.116.114.97.102.102.105.99.95.111.117.116.1 as oid

for the "snmp get next" no graph appears so I entered

Code:
/usr/bin/rrdtool create \
/var/www/cacti/rra/oopse_snmp_oid_25.rrd \
--step 300  \
DS:snmp_oid:GAUGE:600:0:10000000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797
manually (got this in data source debug mode)

now the graph is empty for ever and the device status is down

for some of other types of Downed Device Detection, graph pictures appears, but those are empty ether.

I don't know what to do
 
  


Reply

Tags
cacti, monitoring, snmp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cacti like graphs for individual LAN PC's nishith Linux - Networking 1 09-07-2011 12:38 AM
how to draw graphs in fltk raulapati Linux - Software 1 12-10-2010 02:08 AM
Cacti MRTG gives the problem, do not shows the graphs of a new network device. akram Linux - Newbie 1 01-10-2010 02:01 PM
cacti + not displaying graphs aeby Linux - Server 1 08-28-2007 06:47 AM
how to draw graphs usink glade pranith Programming 1 10-25-2004 12:05 PM


All times are GMT -5. The time now is 03:48 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration