MIB Protocol Statistics (RFC1213) [v2.1 - 2009-05-10]

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Post Reply
Author
Message
Diceman
Cacti User
Posts: 142
Joined: Tue Oct 25, 2005 10:01 am

#16 Post by Diceman » Wed Jul 19, 2006 3:16 pm

lvm wrote:
Diceman wrote:i have a problem. it seems as though the data is only updating when i run the scripts manually from the command. doesnt seem strange as i have another web hits script that does the same thing. any ideas on how to remedy the situation?

the logs post no errors and return results when logging is set to high.
This seems to be an environment thingy. Please check, if all used binaries have to full paths. Are you running cmd.php or cactid?
Reinhard
i actually got it workin a while back, dont remember what i did though. the help me post was almost a month old. 8)

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#17 Post by gandalf » Thu Jul 20, 2006 8:48 am

Diceman wrote:
lvm wrote:
Diceman wrote:i have a problem. it seems as though the data is only updating when i run the scripts manually from the command. doesnt seem strange as i have another web hits script that does the same thing. any ideas on how to remedy the situation?

the logs post no errors and return results when logging is set to high.
This seems to be an environment thingy. Please check, if all used binaries have to full paths. Are you running cmd.php or cactid?
Reinhard
i actually got it workin a while back, dont remember what i did though. the help me post was almost a month old. 8)
Well, vacations ...
Reinhard

Diceman
Cacti User
Posts: 142
Joined: Tue Oct 25, 2005 10:01 am

#18 Post by Diceman » Thu Jul 20, 2006 11:35 am

lvm wrote:
Diceman wrote:
lvm wrote:This seems to be an environment thingy. Please check, if all used binaries have to full paths. Are you running cmd.php or cactid?
Reinhard
i actually got it workin a while back, dont remember what i did though. the help me post was almost a month old. 8)
Well, vacations ...
Reinhard
what is a vacation? ;-)

stu_77
Posts: 28
Joined: Wed Aug 16, 2006 8:41 pm

#19 Post by stu_77 » Thu Aug 24, 2006 6:04 pm

I am trying to get this working against a Cisco Router but am not have much luck. I have run an snmpwalk on the OID's in the php script against this device and they do return values. When I run the graph I get no values?

I am running Cacti-0.8.6h with the cmd.php on RH9. This is the output from the debug on the datasource for the MIB - Combined protocol traffic.

/usr/bin/rrdtool create \
/var/www/html/cacti/rra/
--step 300 \
DS:tcpOutSegs:COUNTER:600:0:U \
DS:udpOutDatagrams:COUNTER:600:0:U \
DS:snmpInPkts:COUNTER:600:0:U \
DS:icmpOutMsgs:COUNTER:600:0:U \
DS:icmpInMsgs:COUNTER:600:0:U \
DS:udpInDatagrams:COUNTER:600:0:U \
DS:ipOutRequests:COUNTER:600:0:U \
DS:tcpInSegs:COUNTER:600:0:U \
DS:ipInReceives:COUNTER:600:0:U \
DS:snmpOutPkts:COUNTER:600:0:U \
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:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN: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 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \

Can you please help?

Thanks

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#20 Post by BSOD2600 » Fri Aug 25, 2006 10:36 am

Post an snmpwalk of the OID in the script and of the cacti log in debugging mode (for that portion where its polling your device with the script).

stu_77
Posts: 28
Joined: Wed Aug 16, 2006 8:41 pm

#21 Post by stu_77 » Fri Aug 25, 2006 11:24 am

These are taken from the ss_protocol_traffic.php script.


snmpwalk -v1 -c testing x.x.x.x .1.3.6.1.2.1.4.3.0
IP-MIB::ipInReceives.0 = Counter32: 55056689

snmpwalk -v1 -c testing x.x.x.x .1.3.6.1.2.1.4.10.0
IP-MIB::ipOutRequests.0 = Counter32: 372429

snmpwalk -v1 -c testing x.x.x.x .1.3.6.1.2.1.6.10.0
TCP-MIB::tcpInSegs.0 = Counter32: 3640

snmpwalk -v1 -c testing x.x.x.x .1.3.6.1.2.1.6.11.0
TCP-MIB::tcpOutSegs.0 = Counter32: 4061

snmpwalk -v1 -c testing x.x.x.x .1.3.6.1.2.1.7.1.0
UDP-MIB::udpInDatagrams.0 = Counter32: 351090

snmpwalk -v1 -c testing x.x.x.x .1.3.6.1.2.1.7.4.0
UDP-MIB::udpOutDatagrams.0 = Counter32: 317486

snmpwalk -v1 -c testing x.x.x.x .1.3.6.1.2.1.11.1.0
SNMPv2-MIB::snmpInPkts.0 = Counter32: 95028

snmpwalk -v1 -c testing x.x.x.x .1.3.6.1.2.1.11.2.0
SNMPv2-MIB::snmpOutPkts.0 = Counter32: 95033

snmpwalk -v1 -c testing x.x.x.x .1.3.6.1.2.1.5.1.0
IP-MIB::icmpInMsgs.0 = Counter32: 27473

snmpwalk -v1 -c testing x.x.x.x .1.3.6.1.2.1.5.14.0
IP-MIB::icmpOutMsgs.0 = Counter32: 51220


All the data is comming back correctly but the graphs are all empty. Below is the extract from the cacti.log for this graph.


08/25/2006 05:10:27 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool create /var/www/html/cacti/rra/test_host_router_snmpinpkts_813.rrd --step 300 DS:snmpInPkts:COUNTER:600:0:U DS:udpOutDatagrams:COUNTER:600:0:U DS:tcpOutSegs:COUNTER:600:0:U DS:udpInDatagrams:COUNTER:600:0:U DS:ipOutRequests:COUNTER:600:0:U DS:tcpInSegs:COUNTER:600:0:U DS:ipInReceives:COUNTER:600:0:U DS:snmpOutPkts:COUNTER:600:0:U DS:icmpInMsgs:COUNTER:600:0:U DS:icmpOutMsgs:COUNTER:600:0:U 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:MIN:0.5:1:600 RRA:MIN:0.5:6:700 RRA:MIN:0.5:24:775 RRA:MIN: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 RRA:LAST:0.5:1:600 RRA:LAST:0.5:6:700 RRA:LAST:0.5:24:775 RRA:LAST:0.5:288:797
08/25/2006 05:10:27 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/test_host_router_snmpinpkts_813.rrd --template N:U
08/25/2006 05:10:27 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool create /var/www/html/cacti/rra/test_host_router_snmpinpkts_813.rrd --step 300 DS:snmpInPkts:COUNTER:600:0:U DS:udpOutDatagrams:COUNTER:600:0:U DS:tcpOutSegs:COUNTER:600:0:U DS:udpInDatagrams:COUNTER:600:0:U DS:ipOutRequests:COUNTER:600:0:U DS:tcpInSegs:COUNTER:600:0:U DS:ipInReceives:COUNTER:600:0:U DS:snmpOutPkts:COUNTER:600:0:U DS:icmpInMsgs:COUNTER:600:0:U DS:icmpOutMsgs:COUNTER:600:0:U 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:MIN:0.5:1:600 RRA:MIN:0.5:6:700 RRA:MIN:0.5:24:775 RRA:MIN: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 RRA:LAST:0.5:1:600 RRA:LAST:0.5:6:700 RRA:LAST:0.5:24:775 RRA:LAST:0.5:288:797
08/25/2006 05:10:27 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/test_host_router_snmpinpkts_813.rrd --template N:U
08/25/2006 05:15:26 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/test_host_router_snmpinpkts_813.rrd --template 1156522501:U
08/25/2006 05:15:26 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/test_host_router_snmpinpkts_813.rrd --template 1156522501:U
08/25/2006 05:15:27 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/test_host_router_snmpinpkts_813.rrd --template 1156522501:U
08/25/2006 05:15:27 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/test_host_router_snmpinpkts_813.rrd --template 1156522501:U


This is the output from the graph in debug mode.


RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title=" - Combined Protocol traffic" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale \
--vertical-label="" \
--slope-mode \


OK


Thanks
Last edited by stu_77 on Fri Nov 23, 2007 8:04 am, edited 1 time in total.

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#22 Post by BSOD2600 » Fri Aug 25, 2006 1:27 pm

1) Are other graphs working properly?
2) You might have a permission problem because cacti appears to be attempting to create the rrd files over and over again.
3) Have you waited for at least 2 polling cycles for graphs to show?
4) Post a pic of the broken graph

stu_77
Posts: 28
Joined: Wed Aug 16, 2006 8:41 pm

#23 Post by stu_77 » Fri Aug 25, 2006 6:29 pm

Thanks for getting back to me.

I have tried to change the permissions on that php file but it has still not had any effect. I am also having the same issue on al these graphs although they are replying to snmpwalk requests.

I have left the script to run via the poller for about an hour as you can see from below but I continue to experience the same issue.
Last edited by stu_77 on Fri Nov 23, 2007 8:03 am, edited 1 time in total.

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#24 Post by BSOD2600 » Sat Aug 26, 2006 1:05 am

You have other permission problems with your linux install. I suggest you post in the linux forum where the experts can help you -- I'm not a linux person. Once you have your cacti working, then come back to getting this template working.

stu_77
Posts: 28
Joined: Wed Aug 16, 2006 8:41 pm

#25 Post by stu_77 » Sat Aug 26, 2006 10:32 am

OK thanks for that, I have now sorted the permissions issue in the crontab and throughout the directory infrastructure. I have also now got an out put from the rrdtool in the logs which are as below. I have also left it to run for a few cycles but still have not had anything in the graph.
Last edited by stu_77 on Fri Nov 23, 2007 8:00 am, edited 1 time in total.

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#26 Post by BSOD2600 » Sat Aug 26, 2006 5:27 pm

We're not interested in the rrdtool graph commands. We're interested in when cacti polls your router using the MIB script and returns data. Also when rrdtool attempts to update the rrd files with this data.

Do other graphs in your cacti installation work yet? If not, then this script won't either.

stu_77
Posts: 28
Joined: Wed Aug 16, 2006 8:41 pm

#27 Post by stu_77 » Mon Aug 28, 2006 9:05 am

My apologies I am still fairly new to cacti. I have found this when the poller runs.

08/28/2006 02:50:26 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/ipinunknownprotos_814.rrd --template 1156773001:U
ERROR: Not enough arguments

08/28/2006 02:50:22 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/ --template 1156773001:U
ERROR: Not enough arguments

08/28/2006 02:50:27 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/snmpinbadversions_815.rrd --template 1156773001:U
ERROR: Not enough arguments

08/28/2006 02:50:27 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/pactiveopens_816.rrd --template 1156773001:U
ERROR: Not enough arguments

Basically all the MIB Protocol graphs are reporting this error. I am not using SNMP v3 therefore the username and password fields are blank.
Last edited by stu_77 on Fri Nov 23, 2007 8:02 am, edited 1 time in total.

stu_77
Posts: 28
Joined: Wed Aug 16, 2006 8:41 pm

#28 Post by stu_77 » Mon Aug 28, 2006 10:53 am

I ran the scripts manually via the php script server and this is what returned.

PHP Script Server has Started

/var/www/html/cacti/scripts/ss_protocol_tcp.php ss_protocol_tcp x.x.x.x testing version 1 161 500
tcpActiveOpens:NaN tcpPassiveOpens:NaN tcpAttemptFails:NaN tcpEstabResets:NaN tcpCurrEstab:NaN tcpRetransSegs:NaN tcpInErrs:NaN tcpOutRsts:NaN

/var/www/html/cacti/scripts/ss_protocol_traffic.php ss_protocol_traffic x.x.x.x testing version 1 161 500
ipInReceives:NaN ipOutRequests:NaN tcpInSegs:NaN tcpOutSegs:NaN udpInDatagrams:NaN udpOutDatagrams:NaN snmpInPkts:NaN snmpOutPkts:NaN icmpInMsgs:NaN icmpOutMsgs:NaN

This does not make alot of sense to me because when I run an snmpwalk on the OID's in the script they return with values as shown in my earlier message.

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#29 Post by BSOD2600 » Mon Aug 28, 2006 11:56 am

1) Do your other graphs work fine?

2) It doesn't appear you're properly feeding the script the correct variables. You first need to start the script server. Then run something like: /var/www/html/cacti/scripts/ss_protocol_traffic.php ss_protocol_traffic 192.168.0.1 public 3 161 500 snmp3_username snmpv3_password.

Look in the php file for exactly what variables it needs passed in.

stu_77
Posts: 28
Joined: Wed Aug 16, 2006 8:41 pm

#30 Post by stu_77 » Mon Aug 28, 2006 3:59 pm

I did this as above but without the snmpv3 information do I have to use snmpv3?

Post Reply