Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Cisco catOS host template
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
aboyz
Guest





PostPosted: Sun May 01, 2005 4:44 pm    Post subject: what is a CATOS switch? Reply with quote

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..
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Sun May 01, 2005 4:57 pm    Post subject: Reply with quote

CatOS == Catalyst Operating System == Catalyst Switch

TheWitness
Back to top
zorrolero



Joined: 24 Feb 2005
Posts: 11
Location: Germany

PostPosted: Wed May 04, 2005 8:35 am    Post subject: PortNames CatOS Reply with quote

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
Back to top
pwozney



Joined: 16 Dec 2004
Posts: 28

PostPosted: Fri May 13, 2005 5:07 pm    Post subject: Reply with quote

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?
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Fri May 13, 2005 7:17 pm    Post subject: Reply with quote

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

TheWitness
Back to top
rony
Developer/Forum Admin


Joined: 17 Nov 2003
Posts: 5448
Location: Wisconsin, USA

PostPosted: Fri May 13, 2005 7:32 pm    Post subject: Reply with quote

Back to top
xenonserge



Joined: 12 Jul 2007
Posts: 1
Location: Paris - France

PostPosted: Thu Jul 12, 2007 6:38 am    Post subject: CatOS PHP Interface Traffic Reply with quote

rony wrote:


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" )



catos.jpg
 Description:
 Filesize:  92.49 KB
 Viewed:  4184 Time(s)

catos.jpg



CatOS PHP Interface Traffic.zip
 Description:

Download
 Filename:  CatOS PHP Interface Traffic.zip
 Filesize:  15.88 KB
 Downloaded:  324 Time(s)

Back to top
JJX
Cacti User


Joined: 06 Oct 2005
Posts: 171

PostPosted: Wed Jul 18, 2007 6:26 am    Post subject: Reply with quote

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?
Back to top
dgaavl



Joined: 22 Feb 2006
Posts: 3

PostPosted: Wed Oct 31, 2007 7:18 am    Post subject: Problem with php script - Solved Reply with quote

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.
Back to top
dgaavl



Joined: 22 Feb 2006
Posts: 3

PostPosted: Tue Nov 20, 2007 6:42 am    Post subject: query_interface_traffic_catos.php for 0.8.7a Reply with quote

Just some quick changes for this script to work with cacti 0.8.7a version:


query_interface_traffic_catos.php.gz
 Description:

Download
 Filename:  query_interface_traffic_catos.php.gz
 Filesize:  1.82 KB
 Downloaded:  286 Time(s)

Back to top
Argh



Joined: 30 Apr 2007
Posts: 5

PostPosted: Wed Dec 05, 2007 9:35 am    Post subject: Reply with quote

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.
Back to top
gvibe06



Joined: 30 Oct 2007
Posts: 20
Location: Alpharetta, GA

PostPosted: Thu Dec 06, 2007 11:28 am    Post subject: Re: Cisco catOS host template Reply with quote

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 ...
Back to top
Argh



Joined: 30 Apr 2007
Posts: 5

PostPosted: Mon Dec 17, 2007 10:45 am    Post subject: Reply with quote

Still trying to solve my issue with this script. The error states an empty result from the command

Quote:
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:

Quote:
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)
Back to top
fireman949



Joined: 14 Apr 2006
Posts: 11
Location: MS

PostPosted: Wed Jan 30, 2008 6:42 pm    Post subject: Reply with quote

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:
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?
Back to top
Graham99



Joined: 05 Mar 2008
Posts: 1

PostPosted: Wed Mar 05, 2008 10:03 am    Post subject: same problem Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 



Powered by phpBB © 2001, 2005 phpBB Group