Cisco catOS host template

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

Moderators: Developers, Moderators

CP-ChrisOlver
Posts: 7
Joined: Tue Jun 05, 2007 8:56 am
Location: Wales
Contact:

Post by CP-ChrisOlver »

Hello,

We are getting the same problem here as well.. The file isn't being created at all :( Any ideas?

-Chris
blackmouse
Posts: 3
Joined: Mon Nov 24, 2008 1:17 pm
Location: Idaho, USA

query_interface_traffic_catos.php update

Post by blackmouse »

I am working on getting catos devices to monitor the interface traffic.

I found that the php is not calling cacti_snmp_walk correctly for Cacti 8.7 so I changed query_interface_traffic_catos.php to send SNMP_POLLER when calling cacti_snmp_walk (changes on lines 71, 97, 100 added SNMP_POLLER).

Code: Select all

cacti_snmp_walk($hostname, "$snmp_community", $oids["index"],
                                              $snmp_version, $snmp_user, $snmp_pw, $snmp_port,
                                              $snmp_timeout, $snmp_retries,  SNMP_POLLER))
Attachments
query_interface_traffic_catos.zip
Updated query_interface_traffic_catos.php
(1.93 KiB) Downloaded 517 times
blackmouse
Posts: 3
Joined: Mon Nov 24, 2008 1:17 pm
Location: Idaho, USA

Problem

Post by blackmouse »

When I run the script through the command line

Code: Select all

/usr/bin/php -q /var/www/html/scripts/query_interface_traffic_catos.php |hostname| "|snmp_community|" 2 161 500 "" "" get ifInOctets 1
I get the InOctets returned.

As well as when I run:

Code: Select all

/usr/bin/php -q /var/www/html/scripts/query_interface_traffic_catos.php |hostname| "|snmp_community|" 2 161 500 "" "" query ifInOctets
I get a list of all Index's returned with their resulting InOctets.

I then added the device to cacti as well as the ports I wanted it to monitor the interface traffic and am receiving the same problem as the people above. It is not creating the rrd files.

So reading the forums I came across a post that mentioned trying to manually create the rrd file by adding the code created by the Data Source Debug. This created the rrd file but it is not updated by poller.

I have read through gandalf's 'Debug NaN's in your graphs' and suspect my problem is somewhere in steps 3-5.

Step 3-
I run the command
/usr/bin/php -1 /var/www/html/cmd.php 21 21

I get:

POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!

So I have a data source but "System Utlities -> View Poller Cache" does not show anything for that host. Running the poller against this host gives me nothing. But Verbose Query for this Data Query gives me results. It shows graphs but they report NaN's. The host is detected as up. I have several other devices all working correctly so my problem shouldn't be with the poller. I suspect there is some problem with the XML template.

Steps 4 and 5- There is no poller_output for the device or rrdtool update.
Step 6 - I have made sure that it has the right ownership(chown user:group *)
Step 7 - Cant really do no valid rrdtool update in logs.
Step 8- They seem to all be correct.
Step 9- I have changed it to 96MB to be safe.
Step 10,11- Shouldn't matter as all other graphs are showing up correctly, but have double checked to make sure.

Addintonal Logs:

**************************************************************************
Data Source Debug
/usr/bin/rrdtool create \
/var/www/html/rra/|hostname|_traffic_in_147.rrd \
--step 60 \
DS:traffic_in:COUNTER:120:0:1000000000 \
DS:traffic_out:COUNTER:120:0:100000000 \
RRA:AVERAGE:0.5:1:10080 \
RRA:AVERAGE:0.5:1:25920 \
RRA:AVERAGE:0.5:6:9000 \
RRA:AVERAGE:0.5:24:2250 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:10080 \
RRA:MIN:0.5:1:25920 \
RRA:MIN:0.5:6:9000 \
RRA:MIN:0.5:24:2250 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:10080 \
RRA:MAX:0.5:1:25920 \
RRA:MAX:0.5:24:2250 \
RRA:MAX:0.5:6:9000 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:10080 \
RRA:LAST:0.5:1:25920 \
RRA:LAST:0.5:24:2250 \
RRA:LAST:0.5:6:9000 \
RRA:LAST:0.5:288:797 \
**************************************************************************
RRDTool Command(w/o manually creating rrd file):
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="|Interface Title|" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:7: \
--font UNIT:8: \
DEF:a="/var/www/html/rra/|hostname|.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/html/rra/|hostname|.rrd":traffic_out:AVERAGE \
AREA:a#00CF00FF:"Inbound" \
GPRINT:a:LAST:" Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total In\: 0 bytes\n" \
LINE1:b#002A97FF:"Outbound" \
GPRINT:b:LAST:"Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total Out\: 0 bytes"

RRDTool Says:

ERROR: opening '/var/www/html/rra/|hostname|_traffic_in_147.rrd': No such file or directory
**************************************************************************
RRDTool Command(w/ manually creating rrd file using Data Source Debug):

RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="|Interface Title|" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:7: \
--font UNIT:8: \
DEF:a="/var/www/html/rra/|hostname|_traffic_in_147.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/html/rra/|hostname|_traffic_in_147.rrd":traffic_in:LAST \
DEF:c="/var/www/html/rra/|hostname|_traffic_in_147.rrd":traffic_in:MIN \
DEF:d="/var/www/html/rra/|hostname|_traffic_in_147.rrd":traffic_in:MAX \
DEF:e="/var/www/html/rra/|hostname|_traffic_in_147.rrd":traffic_out:AVERAGE \
DEF:f="/var/www/html/rra/|hostname|_traffic_in_147.rrd":traffic_out:LAST \
DEF:g="/var/www/html/rra/|hostname|_traffic_in_147.rrd":traffic_out:MIN \
DEF:h="/var/www/html/rra/|hostname|_traffic_in_147.rrd":traffic_out:MAX \
AREA:a#00CF00FF:"Inbound" \
GPRINT:b:LAST:" Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:d:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total In\: 0 bytes\n" \
LINE1:e#002A97FF:"Outbound" \
GPRINT:f:LAST:"Current\:%8.2lf %s" \
GPRINT:e:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:h:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total Out\: 0 bytes"

RRDTool Says:

OK
disH
Posts: 33
Joined: Thu May 22, 2008 2:09 am

Post by disH »

this still works :) thanks very much! :D
I've been looking to get this to work for a while and gave up on it.
Today it is working!

*edit
this script is quite heavy on the cpu.. or atleast my rubbish sparc says it is :)

*edit
REALLY crazy on cpu, it kicks my cpu load from my normal 0.3-0.7 to 4.x-8.x on average! This happeneds when checking on my 2 core switches. Not sure what the problem is but the whole system becomes almost unusable.
I removed a few of the graphs to test for improvement and it became a little better but now with i think 10 graphs is shouldnt be too much.
Infact its almost impossible to access my machine if its graphing my core sw's.

Interesting thing about it.. i never knew how far linux's cpu load can go.
Now i know it can easily go above 8

Anyone else with this problem?
[url=http://forums.cacti.net/viewtopic.php?t=4356]Template: Cisco CatOS[/url]
[url=http://forums.cacti.net/viewtopic.php?t=21785]Mactrack: Netscreen Fw[/url]
[b]_______________[/b]
[b]Cacti Version[/b] - 0.8.7e, [b]Plugin Architecture[/b] - 2.5, [b]Poller Type[/b] - Cact-Spine 0.8.7e
[b]Server Info[/b] - Ubuntu Server 8.10 (2.6.27-7-server), [b]Web Server[/b] - Apache/2.2.9 PHP/5.2.6-2ubuntu4.3 with Suhosin-Patch
[b]PHP[/b] - 5.2.6-2ubuntu4.3, [b]MySQL[/b] - 5.0.67-0ubuntu6-log, [b]RRDTool[/b] - 1.3.1, [b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Thresholds v0.4.1, Login Mod v1.0, Host Info v0.2
karbon
Posts: 2
Joined: Tue Mar 24, 2009 11:14 am

CatOS PHP Slowww

Post by karbon »

I am having the same problem, the CatOS script absolutely kills my CPU and all the graphs to go along with it.
dhananjay
Posts: 1
Joined: Fri Apr 17, 2009 1:26 am
Location: India
Contact:

CPU utilization on C6506

Post by dhananjay »

:D Hi Champs !!
I have newly join this forum and working with Cat6506 Switches which contains CATOS. i am interested to configure the CPU utilization with Graph but i am not aware of installation.
Can anybody help me out for this step by step procedure as i had downloaded the CPU Graph templete and CPU Utilization Templete.
Need your Kind Help....
hid3
Cacti User
Posts: 63
Joined: Sat Jun 14, 2008 1:59 am

Post by hid3 »

Hello.
Does anyone know if this tempate works with the latest cacti version?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests