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    


[XML] Cisco NBAR Protocol Statistics Query 1.2a [UPDATED]
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
roddie
Cacti User


Joined: 10 Feb 2004
Posts: 90
Location: Frisco, TX

PostPosted: Wed Aug 03, 2005 11:31 am    Post subject: Reply with quote

I have the same issue - I'm not too graph template savvy, but I'll poke around and try to figure out why. It seems like some kind of a scaling issue.
Back to top
zoltar



Joined: 30 Aug 2005
Posts: 4

PostPosted: Wed Sep 07, 2005 4:42 am    Post subject: Reply with quote

Im not using this template (QOS MIB fits me better), but I think you should check if turn bytes into bits is selected for CDEF function in template for each graph item bound to output field.
Back to top
Linegod
Developer


Joined: 20 Feb 2003
Posts: 518
Location: Canada

PostPosted: Thu Oct 06, 2005 11:29 am    Post subject: Reply with quote

I keep getting this:

Code:

10/06/2005 10:21:34 AM - CACTID: Poller[0] ERROR: PHP Script Server communications lost, attempting to close and restart
10/06/2005 10:21:34 AM - CACTID: Poller[0] Host[1106] DS[5079] WARNING: Result from SERVER not valid.  Partial Result: ...
10/06/2005 10:21:34 AM - CACTID: Poller[0] Host[1106] DS[5079] SERVER: /usr/share/cacti/scripts/ss_nbar_all.php ss_nbar_all 192.168.1x1.1x2 communitystring 2 get outbytes 258, output: U


To me, it looks like it is passing the script 7 variables, when it only wants 6. If I run it from a console, removing the ss_nbar_all variable, it returns a value (with the ss_nbar_all in there, it returns nothing):

Code:

php /usr/share/cacti/scripts/ss_nbar_all.php 192.168.1x1.1x2 communitystring 2 get outbytes 312
5886262


Any idea what is going on here?
The previous NBAR script worked, but was slow....
Back to top
Linegod
Developer


Joined: 20 Feb 2003
Posts: 518
Location: Canada

PostPosted: Thu Oct 06, 2005 1:03 pm    Post subject: Reply with quote

Hmm... maybe I should have more coffee, or less.

The script tests out from the console, as per the script server test, so it is passing the correct values, its just the script server dying for some reason....
Back to top
TheWitness
Developer


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

PostPosted: Thu Oct 06, 2005 1:22 pm    Post subject: Reply with quote

What about Cactid 0.8.6f? Could also be a timeout. Goto Settings->Poller and increase your Script Timeout value.

Larry
Back to top
Linegod
Developer


Joined: 20 Feb 2003
Posts: 518
Location: Canada

PostPosted: Thu Oct 06, 2005 3:26 pm    Post subject: Reply with quote

Using cactid086f-rc12 and timeout is set to 300.

On full debug it gives me this:

Code:

10/06/2005 11:06:23 AM - CACTID: Poller[0] ERROR: PHP Script Server communications lost, attempting to close and restart
10/06/2005 11:06:23 AM - CACTID: Poller[0] DEBUG: PHP Script Server Shutdown Started
10/06/2005 11:06:23 AM - CACTID: Poller[0] DEBUG: PHP Script Server Routine Starting                                                   
10/06/2005 11:06:23 AM - CACTID: Poller[0] DEBUG: PHP Script Server About to FORK Child Process
10/06/2005 11:06:23 AM - CACTID: Poller[0] DEBUG: PHP Script Server Child FORK Success                                                 
10/06/2005 11:06:23 AM - CACTID: Poller[0] Host[1106] DS[5021] WARNING: Result from SERVER not valid.  Partial Result: ...
10/06/2005 11:06:23 AM - CACTID: Poller[0] Host[1106] DS[5021] SERVER: /usr/share/cacti/scripts/ss_nbar_all.php  192.168.1x1.1x2 commstring 2 get inbytes 315, output: U
Back to top
Linegod
Developer


Joined: 20 Feb 2003
Posts: 518
Location: Canada

PostPosted: Thu Oct 06, 2005 4:22 pm    Post subject: Reply with quote

My bad. It was a path issue

It is quick though. 128secs on old style, 94secs with script_server.
Back to top
johndoe123



Joined: 03 Oct 2005
Posts: 17

PostPosted: Thu Oct 13, 2005 10:47 am    Post subject: Reply with quote

I can't get this to work. I can snmpwalk the oid in this thread and it returns all the protocols fine. Here is the debug information. IT says 0 sources found.

Data Query Debug Information

+ Running data query [10].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/cacti/resource/script_server/cisco_nbar_all.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/cacti/scripts/ss_nbar_all.php awfeawef.com dfewa 2 index'
+ Executing script query '/usr/bin/php -q /var/www/cacti/scripts/ss_nbar_all.php fewafwea.com fewa 2 query index'
+ Executing script query '/usr/bin/php -q /var/www/cacti/scripts/ss_nbar_all.php fewafw.com fewa 2 query ifName'
+ Executing script query '/usr/bin/php -q /var/www/cacti/scripts/ss_nbar_all.php fewafwe.com faew 2 query ifType'
+ Executing script query '/usr/bin/php -q /var/www/cacti/scripts/ss_nbar_all.php fweafawe.com fwea 2 query ifAdminStatus'
+ Executing script query '/usr/bin/php -q /var/www/cacti/scripts/ss_nbar_all.php feawfwa.com feawf 2 query ifOperStatus'
+ Executing script query '/usr/bin/php -q /var/www/cacti/scripts/ss_nbar_all.php fewfaw.com fewafwae 2 query protoname'
+ Found data query XML file at '/var/www/cacti/resource/script_server/cisco_nbar_all.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_server/cisco_nbar_all.xml'
+ Found data query XML file at '/var/www/cacti/resource/script_server/cisco_nbar_all.xml'
Back to top
Erik.H



Joined: 29 Sep 2005
Posts: 5

PostPosted: Thu Oct 27, 2005 4:02 am    Post subject: Reply with quote

To all those with scale issues on the stacked data I made a graph template to fix that. Just import and use this one. I didn't include the min, max and average data, seeing as how I don't need data like that, I just need to know approx values.


cacti_graph_template_nbar_stack_custom.xml
 Description:

Download
 Filename:  cacti_graph_template_nbar_stack_custom.xml
 Filesize:  14.44 KB
 Downloaded:  818 Time(s)

Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Thu Oct 27, 2005 4:06 am    Post subject: Reply with quote

Erik.H wrote:
To all those with scale issues on the stacked data I made a graph template to fix that. Just import and use this one. I didn't include the min, max and average data, seeing as how I don't need data like that, I just need to know approx values.

Hi

I tried to import your template, but got this :
Code:
Data Template

[success] Cisco Router - NBAR BitRate In/Out [update]
   + Found Dependency: (Data Input Method) Get Script Server Data (Indexed)
   + Found Dependency: (Data Input Field) Index Type
   + Found Dependency: (Data Input Field) Output Type ID
   + Found Dependency: (Data Input Field) Index Value
   + Unmet Dependency: (Data Input Field) Output Type ID
   + Unmet Dependency: (Data Input Field) Index Value
   + Unmet Dependency: (Data Input Field) Index Type
Back to top
Erik.H



Joined: 29 Sep 2005
Posts: 5

PostPosted: Thu Oct 27, 2005 4:17 am    Post subject: Reply with quote

did you install the scripts on the first page of this thread?
Back to top
mseba



Joined: 02 Nov 2005
Posts: 2

PostPosted: Wed Nov 02, 2005 1:59 am    Post subject: Error: XML: Hash version does not exist. Reply with quote

I have (when use import)

Error: XML: Hash version does not exist.

What is it ?
Back to top
aestevez



Joined: 02 Nov 2005
Posts: 2

PostPosted: Wed Nov 02, 2005 9:22 am    Post subject: Another Error Reply with quote

Error: XML: Cacti version does not exist.

Why???? ¿ Por qué ?
Back to top
boots



Joined: 07 Jan 2004
Posts: 49
Location: Melbourne Australia

PostPosted: Fri Feb 17, 2006 12:47 am    Post subject: Reply with quote

Hi all,

I have been trying to get this script going with not much success.

I am running Win2K3, IIS5, PHP 4.3.9, Cacti 8.6g and Cactid 8.6f

I have confirmed my router is the correct IOS version for SNMP and have a successfull response to the snmpwalk;

C:\XXXXXX\cacti-0.8.6g\scripts>snmpwalk -v1 -c XXXX XX.XX.XX.XX 1.3.6.1.4.1.9.244.1.2.1.1.2
iso.3.6.1.4.1.9.9.244.1.2.1.1.2.4.1 = STRING: "ftp"
iso.3.6.1.4.1.9.9.244.1.2.1.1.2.4.2 = STRING: "http"
iso.3.6.1.4.1.9.9.244.1.2.1.1.2.4.3 = STRING: "egp"
iso.3.6.1.4.1.9.9.244.1.2.1.1.2.4.4 = STRING: "gre"
iso.3.6.1.4.1.9.9.244.1.2.1.1.2.4.5 = STRING: "icmp"
and so on.....

I can also manually run the ss_nbar_all.php script from the command line and receive the indexs back;

C:\XXX\cacti-0.8.6g\scripts>php ss_nbar_all.php XXX.XX.XXX.X XXXX 1
Content-type: text/html X-Powered-By: PHP/4.3.9

2049
2050
2051
2052
2053
2054
2055
and so on,

I have added the . in front of the OIDs throughout the script as well as increasing PHP max execution time beyond 300 as recommended in the forum.

When I add a device to use this template, I eventually get a CGI timeout and when I close the browser and log back in, the device has been added against this template. When I view the device, the data query has no items and rows. When I run a verbose query the browser eventually times out.

When I run a debug, I cant find this host in the debug log.

Any ideas?

Thanks

Steve
Back to top
cwahlin
Cacti User


Joined: 10 Oct 2003
Posts: 87

PostPosted: Mon Mar 20, 2006 3:48 am    Post subject: Reply with quote

I'm not getting any rrd files. I'm not seeing any actions related to nbar in the poller cache. Query works fine, but I am not seeing anything related to nbar and this host in the log (running debug).

Any ideas?

/Carl
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, 4, 5  Next
Page 3 of 5

 



Powered by phpBB © 2001, 2005 phpBB Group