Cisco CBWFQ monitoring

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

Moderators: Developers, Moderators

Post Reply
LeonT
Posts: 8
Joined: Mon May 09, 2005 2:12 am

Post by LeonT »

That output means the .pl file doesnt get the correct parameters.
You should verify the cbwfq.xml and the data input.
Good luck...
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Post by pwozney »

Do a verbose query from your device.

Mine look like this:

Code: Select all

Data Query Debug Information
+ Running data query [12].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/cbwfq.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/html/cacti/scripts/cbwfq.pl <IP> public index'
+ Executing script query 'perl /var/www/html/cacti/scripts/cbwfq.pl <IP> public query class'
+ Found item [class='QoSclass1'] index: 1029
+ Found item [class='QoSdefault'] index: 1379
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/cbwfq.xml'
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Post by pwozney »

nonolk wrote:And here is the debug output from cmd.php

Code: Select all

05/13/2005 02:56:09 PM - CMDPHP: Poller[0] Host[2] RECACHE: Processing 2 items in the auto reindex cache for '10.104.17.1'.
05/13/2005 02:56:10 PM - CMDPHP: Poller[0] Host[2] WARNING: Result from CMD not valid.  Partial Result: usage:

./nmiscbwfq.
05/13/2005 02:56:10 PM - CMDPHP: Poller[0] Host[2] CMD: /usr/share/cacti/site/scripts/cbwfq.pl  private get class-default, output: U

I thought about this a little bit, and I think maybe your data input method is not correct. It seems to me that my script is complaining that it's not getting the right input parameters - it even displays the usage line.

So, I've copied the rest of my data input method so you can mimic it.
Attachments
ip.jpg
ip.jpg (48.94 KiB) Viewed 18252 times
community.jpg
community.jpg (50.5 KiB) Viewed 18253 times
class.jpg
class.jpg (49.26 KiB) Viewed 18254 times
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Post by pwozney »

pwozney wrote:So, I've copied the rest of my data input method so you can mimic it.
And the last image:
Attachments
bytes.jpg
bytes.jpg (28.32 KiB) Viewed 18251 times
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Post by pwozney »

LeonT wrote:pwozney - Thanks alot. I managed to get it working thanks to your help.
I had to change some variables and calling options in the .pl file because of the version of netsnmp I am using (win32 ) but that was done without problems.
In combination with Weathermap this really is a great addition. Thumbs up for you.

nonol - did you change the filterstrings in the .pl file? Otherwise please tell us what setup you are using.
I'm glad you were able to get it going. This is my first publicly released...anything. :D
ShadowPhax
Posts: 10
Joined: Wed Mar 30, 2005 3:57 am

Post by ShadowPhax »

Hi,

i get the following verbose query result.

+ Running data query [12].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/local/share/cacti/resource/script_queries/cbwfq.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /usr/local/share/cacti/scripts/cbwfq.pl xx.xx.xx.xx index'
+ Executing script query 'perl /usr/local/share/cacti/scripts/cbwfq.pl xx.xx.xx.xx query class'
+ Found item [class=''] index: usage
+ Found data query XML file at '/usr/local/share/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/usr/local/share/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/usr/local/share/cacti/resource/script_queries/cbwfq.xml'

I cannot get any result by running the .pl from the cmdline. please help
ShadowPhax
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Post by pwozney »

ShadowPhax wrote:+ Executing script query 'perl /usr/local/share/cacti/scripts/cbwfq.pl xx.xx.xx.xx query class'
This looks like the right syntax.
ShadowPhax wrote:I cannot get any result by running the .pl from the cmdline. please help
I expect your environment is probably different than mine. Linux? Windows? Snmpwalk binary location?
ShadowPhax
Posts: 10
Joined: Wed Mar 30, 2005 3:57 am

Post by ShadowPhax »

pwozney wrote:
ShadowPhax wrote:+ Executing script query 'perl /usr/local/share/cacti/scripts/cbwfq.pl xx.xx.xx.xx query class'
This looks like the right syntax.
ShadowPhax wrote:I cannot get any result by running the .pl from the cmdline. please help
I expect your environment is probably different than mine. Linux? Windows? Snmpwalk binary location?
I've added the correct path to your " my $snmppath " and still nothing

user@wendy$ perl cbwfq.pl xx.xx.xx.xx public index
usage:

./nmiscbwfq.pl IP COMMUNITY index
./nmiscbwfq.pl IP COMMUNITY query {bytes|class}
./nmiscbwfq.pl IP COMMUNITY get {bytes} CLASS
user@wendy$

thats what i get when executing the command
ShadowPhax
budhal2003
Posts: 6
Joined: Mon May 02, 2005 1:48 pm

Post by budhal2003 »

I still got some error :

---------

Console -> Data Queries -> (Edit) -> Associated Graph Templates

Associated Data Templates
Data Template - CBWFQ Throughput
Data Source: bytes
Warning: Variable passed to each() is not an array or object in /var/www/localhost/htdocs/cacti/data_queries.php on line 312

---------

Did I miss something ?

Thx.
iceman123
Posts: 10
Joined: Wed May 04, 2005 8:01 pm

Post by iceman123 »

i'm not seeing any results from the query as well..running on redhat

+ Running data query [11].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/cbwfq.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /var/www/html/cacti/scripts/cbwfq.pl x.x.x.x public index'
+ Executing script query 'perl /var/www/html/cacti/scripts/cbwfq.pl x.x.x.x public query class'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/cbwfq.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/cbwfq.xml'
iceman123
Posts: 10
Joined: Wed May 04, 2005 8:01 pm

Post by iceman123 »

i got it..had to change the filter to .* and now it seems to be working..thanks a lot :D
LeonT
Posts: 8
Joined: Mon May 09, 2005 2:12 am

Post by LeonT »

On a side-note; this only shows the outbound traffic. Is it somehow possible to also see what the inbound traffic is?
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Post by pwozney »

LeonT wrote:On a side-note; this only shows the outbound traffic. Is it somehow possible to also see what the inbound traffic is?
It depends on how your policies are set - but on my setup I only apply QoS to outbound traffic. To give a good view of outbound and inbound traffic on the same graph, I had to make a custom graph template that allows multiple inputs; there is enough information on how to do it in this forum.
starkie
Posts: 30
Joined: Mon Nov 22, 2004 2:35 pm

Post by starkie »

Guys,

This really great feature.

I only have one prolem. I have installed thsi onto my redhat box and it works perfectly.
When I install on my win2k setup, I cant import the templates. If I try and copy in the xml into the text box nothing happens. Even if i try and upload the files nothing happens. It returns nothing??

Any help please??
ShadowPhax
Posts: 10
Joined: Wed Mar 30, 2005 3:57 am

Post by ShadowPhax »

make sure you edit your php.ini file to include file uploads. That's usually 99% of the problem
--
tim
ShadowPhax
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest