Cisco CBWFQ monitoring

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

Moderators: Developers, Moderators

Post Reply
moonman
Cacti User
Posts: 101
Joined: Sat Sep 06, 2003 10:25 am

Post by moonman »

sorry for my late response

1. what data input method do you use ? you need "Get Script Data (Indexed)"
2. try to clear your poller cache or view it to see if the new script is there

3. if it dont help send me screen shot of your data query and the relevent lines from your view poller cache

Thanks
SergM
Posts: 1
Joined: Mon Aug 15, 2005 9:53 am

script by MOONMAN

Post by SergM »

If interface name contains ":", as in my case
Serial0/0/0:1

change in cbwfq.xml
<output_delimeter>:</output_delimeter>
at
<output_delimeter>!</output_delimeter>
and make corresponding changes in cbwfq.pl
starkie
Posts: 30
Joined: Mon Nov 22, 2004 2:35 pm

Re: script by MOONMAN

Post by starkie »

SergM wrote:If interface name contains ":", as in my case
Serial0/0/0:1

change in cbwfq.xml
<output_delimeter>:</output_delimeter>
at
<output_delimeter>!</output_delimeter>
and make corresponding changes in cbwfq.pl
cool, where abouts on the cbwfq.pl do you change it.

thanks
starkie
Posts: 30
Joined: Mon Nov 22, 2004 2:35 pm

Post by starkie »

moonman wrote:Here is beter looking script now with XML and data query template

To install

1. put the cbwfq.pl in your cacti scripts directory
2. cbwfq.xml in resource/script_queries/
3. import the data query template to your cacti


Nitzan

HI, I am trying to import the templates in and I get "incorrect hash"

Any ideas

Can you please repost??

Thanks
User avatar
Viggy
Posts: 23
Joined: Fri Sep 16, 2005 5:15 pm
Location: MI, USA

Windows based install

Post by Viggy »

I am using the scripts posted by moonman and am trying to get this to run on win32.

The scripts imported fine

Perl is installed

I added the data source in Cacti

Problem is when I add it to a router that has a policy-map I get back 0 rows, 0 items.

Below is a verbose output:

+ Running data query [11].
+ Found type = '4 '[script query].
+ Found data query XML file at 'D:/apache2/Apache2/htdocs/cacti/resource/script_queries/cbwfq.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl D:\apache2\Apache2\htdocs\cacti\scripts\cbwfq.pl 10.2.0.1 nwfusion index'
+ Executing script query 'perl D:\apache2\Apache2\htdocs\cacti\scripts\cbwfq.pl 10.2.0.1 nwfusion query class'
+ Found data query XML file at 'D:/apache2/Apache2/htdocs/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at 'D:/apache2/Apache2/htdocs/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at 'D:/apache2/Apache2/htdocs/cacti/resource/script_queries/cbwfq.xml'

I edited the paths in the cbwfq.pl

What else do I need to change to fet it to return data?
moonman
Cacti User
Posts: 101
Joined: Sat Sep 06, 2003 10:25 am

Post by moonman »

Try to run the script from the command line
may be you have other problem and we will see it there

Thanks
User avatar
Viggy
Posts: 23
Joined: Fri Sep 16, 2005 5:15 pm
Location: MI, USA

Windows based install

Post by Viggy »

I got it running. Yeah!! I think this is awesome, so a big thank you to the developers of this script for writing it and being willing to share.

For those of you who are trying to get this to run in windows, here are the trouble shooting steps I followed:

1. Installed Perl. (probably don't need this since its bundled with Net-snmp)

2. Edited the following items in the cbwfq.pl script
A. Change the path to snmpget.exe
B. Change the path to snmpwalk.exe
C. Change the filter to .* (script dependent)
C. Change the order of "-c $node $comm" to "-c $comm $node" in several places.

3. My MIBDIR environment variable was D:\PHP\MIB so I copied the Net-SNMP MIBs to this directory.

Then things started working. I believe the MIBDIR was the primary issue.
vector
Posts: 5
Joined: Tue Jan 04, 2005 9:03 am

Stackable Graphs

Post by vector »

Is there any template to have all QoS Classes for an interface in one Graph?
lkhanna
Posts: 17
Joined: Fri Sep 16, 2005 12:18 pm

CBWFQ and Cacti

Post by lkhanna »

Hi

I am also having exactly same problem. How did you resolve this
sohailb wrote:Im not sure which screens you want me to share. Here is what I have done... I imported the template, copied the script and xml file into the right locations, and set up the data input method. When I add this data query to a host, it does show me the names of the classes and from which interface they belong. When I try to graph them, rather than showing the previously shown name, it now shows |query_class| instead. At this point, I let it run for a while to get some data and when I check the graphs, they are all red x's. I check the graph debug and it states that the rrd's can not be found.

When I use the original templates, script, and xml, I can generate graphs and they get data and all that good stuff. The only problem I have with this is that the script is slow sometimes and cactid has issues with it after 296 seconds.

I would like to use your script with the orginal templates since your script is supposed to be faster.

-sohailb
bloodrayne
Cacti User
Posts: 53
Joined: Mon Nov 29, 2004 11:43 am

Post by bloodrayne »

Hi guys,

when i'm trying to run the script from the commandline (im in Fedora Core 3)...

i obtain nothing:

[root@CORNMS01 root]# perl /var/www/html/cacti/scripts/cbwfq.pl 1.1.1.1 xxxxx query class
[root@CORNMS01 root]#

How can i find why?

Thanks!
moonman
Cacti User
Posts: 101
Joined: Sat Sep 06, 2003 10:25 am

Post by moonman »

Please post the result of

snmpwalk -c COMM -v2c IP .1.3.6.1.4.1.9.9.166.1.7.1.1.1
snmpwalk -c COMM -v2c IP .1.3.6.1.4.1.9.9.166.1.6.1.1.1
snmpwalk -c COMM -v2c IP .1.3.6.1.4.1.9.9.166.1.1.1.1.4
snmpwalk -c COMM -v2c IP .1.3.6.1.2.1.2.2.1.2
snmpwalk -c COMM -v2c IP .1.3.6.1.4.1.9.9.166.1.5.1.1.2

I hope I can help
cactiSteve
Posts: 3
Joined: Fri Oct 14, 2005 6:02 pm

moonman's script

Post by cactiSteve »

moonman,

First of all, thanks for creating this script. I followed your instructions, but I'm unable to retrieve any data (0 rows, 0 items). Data query debug shows:

+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/cacti/resource/script_queries/cbwfq.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/cacti/scripts/cbwfq.pl myRouter myCommString index'
+ Executing script query 'perl /var/www/cacti/scripts/cbwfq.pl myRouter myCommString query class'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/cbwfq.xml'

When I execute the scripts manually, I do get output:

[cacti@cacti scripts]# perl /var/www/cacti/scripts/cbwfq.pl myRouter myCommString index
1483.1485
1483.1491
1769.1771
1769.1777
1769.1783
[cacti@cacti scripts]# perl /var/www/cacti/scripts/cbwfq.pl myRouter myCommString query
1483.1485:cbbtv-WAN_TO_ANNEX-Serial3/0
1483.1491:class-default-WAN_TO_ANNEX-Serial3/0
1769.1771:gep-WAN_TO_SIF-ATM4/ima1.100-aal5
1769.1777:cbbtv-WAN_TO_SIF-ATM4/ima1.100-aal5
1769.1783:class-default-WAN_TO_SIF-ATM4/ima1.100-aal5
[cacti@cacti scripts]#

Unlike the previously posted script, yours does NOT require me to create a Data Input Method, correct? Any help would be appreciated. Thanks.
[/quote]
woytekm
Posts: 6
Joined: Fri Apr 29, 2005 7:16 am

Re: moonman's script

Post by woytekm »

cactiSteve wrote:moonman,

First of all, thanks for creating this script. I followed your instructions, but I'm unable to retrieve any data (0 rows, 0 items). Data query debug shows:

+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/cacti/resource/script_queries/cbwfq.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/cacti/scripts/cbwfq.pl myRouter myCommString index'
+ Executing script query 'perl /var/www/cacti/scripts/cbwfq.pl myRouter myCommString query class'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_queries/cbwfq.xml'

When I execute the scripts manually, I do get output:
...
Check the exec/read permissions on the cbwfq.pl script. I had a problem with not enough permissions on this file and it looked exactly the same.

WM
cactiSteve
Posts: 3
Joined: Fri Oct 14, 2005 6:02 pm

Re: moonman's script

Post by cactiSteve »

Thanks for the suggestion, woytekm, but that doesn't appear to be the problem. The script is world-readable, like all of the other scripts in that directory:

-rw-r--r-- 1 root root 4861 Oct 17 14:57 cbwfq.pl

...and I can execute this script (via perl) just fine from the command line as cactiuser (and as any other user, too).

Regards,

Steve
cactiSteve
Posts: 3
Joined: Fri Oct 14, 2005 6:02 pm

Re: moonman's script

Post by cactiSteve »

Success!

The source of the problem was that my server was running selinux, and it was not allowing snmpwalk (called from the perl script by user apache) to open a socket to connect to my router to retrieve the data. This explains why the perl script would work when executed from a shell prompt, but not from within Cacti.

To disable selinux at startup:

Change this line in /etc/sysconfig/selinux:

SELINUX=enabled

to:

SELINUX=disabled

and reboot.

There's probably a way to modify the selinux profile to make this work and still use selinux, but I don't need selinux, so I simply disabled it.

A big thank-you to moonman for creating the scripts.

Regards,

Steve
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests