LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problem in making cacti-0.8.8a to draw snmp graphs (https://www.linuxquestions.org/questions/linux-networking-3/problem-in-making-cacti-0-8-8a-to-draw-snmp-graphs-4175423438/)

pendrive 08-22-2012 09:42 AM

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


All times are GMT -5. The time now is 08:52 PM.