Cisco catOS host template

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

Moderators: Developers, Moderators

aboyz

what is a CATOS switch?

Post by aboyz »

Can someone explain to me what is a catOS switch? is it the same as any catalyst switch? like 2900 3500. whta is the catOS stand for? any link..
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

CatOS == Catalyst Operating System == Catalyst Switch

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
zorrolero
Posts: 11
Joined: Thu Feb 24, 2005 6:45 am
Location: Germany
Contact:

PortNames CatOS

Post by zorrolero »

Hi,

do you perhaps now have the time to describe the feature?

In the past this was your statement to the problem:
TheWitness wrote:There was a new feature released in 0.8.6c that will allow the creation of the PortName and Catalyst template. I just don't have time to write it.

Sorry,

TheWitness
THX in advance!!

greetz
zorrolero
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Post by pwozney »

TheWitness wrote:There was a new feature released in 0.8.6c that will allow the creation of the PortName and Catalyst template. I just don't have time to write it.

Sorry,

TheWitness
I would like this as well as I've got CatOS switches around. Would it worthwhile to do this using a perl script - the same way I have done QoS classes with CBWFQ?

I'm not really interested in writing a script that polls for everything SNMP, but maybe a snap-in module that can crack out the interface names. Is this possible?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Only thing for me is incentive to write. Paypal is a friend....

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

:D
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
xenonserge
Posts: 1
Joined: Thu Jul 12, 2007 5:42 am
Location: Paris - France

CatOS PHP Interface Traffic

Post by xenonserge »

rony wrote::D
Hello;

I'm write a php script for Interface Traffic.

Now, you have the number module, the number port and portname.

Actually work find with WS-C4003 Cisco Catalyst.

- Put query_interface_traffic_catos.php in |path_cacti|/scripts/query_interface_traffic_catos.php

- Put iftraffic_catos.xml in |path_cacti|/resource/script_queries

- Import cacti_host_template_cisco_catos_switch.xml

My cacti version is 0.8.6i ( "cat |path_cacti|/include/config.php | grep cacti_version" )
Attachments
CatOS PHP Interface Traffic.zip
(15.88 KiB) Downloaded 861 times
catos.jpg
catos.jpg (92.49 KiB) Viewed 13654 times
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Post by JJX »

I am using this host template to graph an cisco catalyst 6500.

The problem i face is that i cant graph the traffic for vlans. (i get zero values)

Anyone else facing this problem?
cacti rulez!
dgaavl
Posts: 3
Joined: Wed Feb 22, 2006 6:13 am

Problem with php script - Solved

Post by dgaavl »

xenonserge,
i´ve had a problem with your script.

Basically, it didn´t report any data to Cacti.

# cactid -f 80 -l 81 --verbosity=4 -R -S

CACTID: Using cactid config file [/etc/cactid.conf]
CACTID: Version 0.8.6f starting
Host[80] SNMP Result: Host responded to SNMP

Host[80] ERROR: Empty result [hostA]: '/usr/bin/php -q /usr/share/cacti/scripts/query_interface_traffic_catos.php hostA "communityA" 2 161 500 "" "" get ifInOctets 10'

Host[80] DS[3641] WARNING: Result from SCRIPT not valid. Partial Result: ...

Host[80] DS[3641] SCRIPT: /usr/bin/php -q /usr/share/cacti/scripts/query_interface_traffic_catos.php hostA "communityA" 2 161 500 "" "" get ifInOctets 10, output: U

It seems i´ve got a problem with double quotes at community string (I´ve checked the device options at cacti´s web and the community has no quotes). I don´t know why nobody else have had it.

php script "query_interface_traffic_catos.php" calls cacti_snmp_get function and pass the $community variable including doble quotes so cacti_snmp_get returns U error code.

WORKAROUND

query_interface_traffic_catos.php

174 # -------------------------------------------------------------------------
175 }elseif ($cmd == "get") {
176 print (cacti_snmp_get($hostname, $snmp_community, $oids[$query_field] .
177 ".$query_index", $snmp_version, $snmp_user, $snmp_pw,
178 $snmp_port, $snmp_timeout, $snmp_retries));
179
180 # -------------------------------------------------------------------------

You must insert the next line:

174 # -------------------------------------------------------------------------
175 }elseif ($cmd == "get") {
176 $snmp_community=str_replace("\"","",$snmp_community);
177 print (cacti_snmp_get($hostname, $snmp_community, $oids[$query_field] .
178 ".$query_index", $snmp_version, $snmp_user, $snmp_pw,
179 $snmp_port, $snmp_timeout, $snmp_retries));
180
181 # -------------------------------------------------------------------------

Hope this help you.
dgaavl
Posts: 3
Joined: Wed Feb 22, 2006 6:13 am

query_interface_traffic_catos.php for 0.8.7a

Post by dgaavl »

Just some quick changes for this script to work with cacti 0.8.7a version:
Attachments
query_interface_traffic_catos.php.gz
(1.82 KiB) Downloaded 788 times
Argh
Posts: 5
Joined: Mon Apr 30, 2007 1:33 pm

Post by Argh »

Hi, I am getting this error:

SPINE: Poller[0] Host[13] ERROR: Empty result [xxx.xxx.xxx.xxx]: 'c:\php\php.exe -q C:\apache2\htdocs\cacti\scripts\query_interface_traffic_catos.php xxx.xxx.xxx.xxx "public" 2 161 500 "" "" get ifInOctets 12'

I am using Cacti 0.8.7a and Spine 0.8.7a and php 5.2.5. I am using the latest query_interface_traffic_catos.php file to accomodate the changes in 0.8.7a also.

Any idea what that error means.
User avatar
gvibe06
Posts: 20
Joined: Tue Oct 30, 2007 8:12 am
Location: Alpharetta, GA
Contact:

Re: Cisco catOS host template

Post by gvibe06 »

adesimone wrote:host template with -

- cpu
- memory
- backplane usage

- interface

This *only* works for catOS switches

Exported with cacti 8.5a / PHP 4.3.2 and cactihistoric
Hi ..

I was just wondering how you enabled the sysTraffic counter on your switches? This would be the counter for the Cisco CatOS Load data/graph templates in your package.

Mine currently say "0" for all of the items in .1.3.6.1.4.1.9.5.1.1.8.0

Any help would be great ...
Argh
Posts: 5
Joined: Mon Apr 30, 2007 1:33 pm

Post by Argh »

Still trying to solve my issue with this script. The error states an empty result from the command
Empty result [xxx.xxx.xxx.xxx]: 'c:\php\php.exe -q C:\apache2\htdocs\cacti\scripts\query_interface_traffic_catos.php xxx.xxx.xxx.xxx "public" 1 161 500 "" "" get ifInOctets 9'
However, when I run it from a command line it returns a value. Also, when I poll using cmd.php the error is no longer there. So, it appears something is not right with spine and the script. Others seem to have this script running fine, so any help would be greatly appreciated.

SPECS:
Cacti Version - 0.8.7a
Plugin Architecture - 1.4
Poller Type - Cactid v
Server Info - Windows NT 5.2
Web Server - Apache/2.2.6 (Win32) PHP/5.2.5
PHP - 5.2.5
PHP Extensions - bcmath, calendar, com_dotnet, ctype, session, filter, ftp, hash, iconv, json, odbc, pcre, Reflection, date, libxml, standard, tokenizer, zlib, SimpleXML, dom, SPL, wddx, xml, xmlreader, xmlwriter, apache2handler, mysql, snmp, sockets, gd
MySQL - 5.0.45-community-nt
RRDTool - 1.2.15
SNMP - snmpwalk [OPTIONS] AGENT [OID]

Version: 5.4.1
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net
Plugins
  • Host Info (hostinfo - v0.2)
    PHP Network Weathermap (weathermap - v0.941)
fireman949
Posts: 11
Joined: Fri Apr 14, 2006 10:11 am
Location: MS

Post by fireman949 »

I have a fresh install of cacti and followed the instructions above but something fails when I create a new graph.

I attempt to create a 95th percentile graph but the Inbound and Outbound data sources are empty.

I also get this:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="dfw-agg01 mod 1 - Traffic - sc0" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/dfw-agg01_mod_1_traffic_in_10.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/cacti/rra/dfw-agg01_mod_1_traffic_in_10.rrd":traffic_in:MAX \
DEF:c="/var/www/cacti/rra/dfw-agg01_mod_1_traffic_in_10.rrd":traffic_out:AVERAGE \
DEF:d="/var/www/cacti/rra/dfw-agg01_mod_1_traffic_in_10.rrd":traffic_out:MAX \
CDEF:cdefa=a,8,* \
CDEF:cdefd=b,8,* \
CDEF:cdefe=c,8,* \
CDEF:cdefh=d,8,* \
AREA:cdefa#00CF00FF:"Inbound"  \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefd:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefe#002A97FF:"Outbound"  \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefh:MAX:"Maximum\:%8.2lf %s\n"  \
COMMENT:"\n"  \
HRULE:0#FF0000FF:"95th Percentile"  \
COMMENT:"(0 mbit in+out)" 

RRDTool Says:

ERROR: opening '/var/www/cacti/rra/dfw-agg01_mod_1_traffic_in_10.rrd': No such file or directory
Nothing is created in /var/www/cacti/rra/

I've tried several things but nothing seems to work. Is this a lost cause or is there any hope of getting useful data off my CatOS switch?
Graham99
Posts: 1
Joined: Wed Mar 05, 2008 9:57 am

same problem

Post by Graham99 »

I'm getting the same problem, an RRD file is not created. Apart from 1-minute polling, this is a vanilla install of 0.8.7a. No plugins. No other scripts installed. I don't know where to start with debugging this.

The initial graph creation dialogue pulls back the correct data from the switch (4006) including the port descriptions, but after selecting the interfaces to graph, no files are created:

RRDTool Says:

ERROR: opening '/var/www/htdocs/cacti-0.8.7a/rra/myswitch1_traffic_in_204.rrd': No such file or directory

There are no errors showing in the log file.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests