[XML] Cisco NBAR Protocol Statistics Query 1.2a [UPDATED]

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

Moderators: Developers, Moderators

Post Reply
johndoe123
Posts: 17
Joined: Mon Oct 03, 2005 1:20 pm

Post by johndoe123 »

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'
Erik.H
Posts: 5
Joined: Thu Sep 29, 2005 6:54 am

Post by Erik.H »

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.
Attachments
cacti_graph_template_nbar_stack_custom.xml
(14.44 KiB) Downloaded 1435 times
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

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: Select all

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
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Erik.H
Posts: 5
Joined: Thu Sep 29, 2005 6:54 am

Post by Erik.H »

did you install the scripts on the first page of this thread?
mseba
Posts: 2
Joined: Wed Nov 02, 2005 1:56 am

Error: XML: Hash version does not exist.

Post by mseba »

I have (when use import)

Error: XML: Hash version does not exist.

What is it ?
aestevez
Posts: 2
Joined: Wed Nov 02, 2005 9:20 am

Another Error

Post by aestevez »

Error: XML: Cacti version does not exist.

Why???? ¿ Por qué ?
boots
Cacti User
Posts: 55
Joined: Wed Jan 07, 2004 4:59 am
Location: Melbourne Australia

Post by boots »

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
cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Post by cwahlin »

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
Haakon
Posts: 6
Joined: Tue Jul 19, 2005 10:04 am

Post by Haakon »

I have the same issue Carl, no rra files. If I define the rra file from cmd shell the file is created, but it never updates. There is tree fields under 'Custom Data' when you create a nbar stacked graph;

Index Type
Index Value
Output Type ID

What are they for? Can you help us out Roddie?
eddievenus
Cacti User
Posts: 60
Joined: Mon Jul 18, 2005 7:01 pm

Post by eddievenus »

I am looking for a little bit of help on what those 3 feilds are for as well. i can get graphs from the nbar_all script server stuff, but I do not know how to set up the stacked_nbar graph.

What i need to know is what to use in these 3 feilds, and what they mean, so that I can figure this out on future graphs.

Custom Data [Template: Cisco Router - NBAR Bytes In/Out]

Index Type
Index Value
Output Type ID

If someone could just tell me what these mean, and how to fill this out, I would very happy with the way this works.
qwertz
Cacti User
Posts: 98
Joined: Thu Feb 16, 2006 9:20 am

Post by qwertz »

Hello,

Thanks for the scripts.

When i try to graph an isolated nbar value., it working perfectly.

When i try to use the stacked template, it tells me that after a debug in Graph management:

RRDTool Says:

ERROR: opening '...../cacti/rra/test_nbar_bytesin_29.rrd': No such file or directory.

I had a look in the rra folder and saw no "..._29.rrd" file.

Do you see what is really the problem?

Where should i search to investigate?

Thanks

Qwertz
manaf
Cacti User
Posts: 68
Joined: Sun Apr 16, 2006 2:03 am

Post by manaf »

i can graph all nbar protocols but without protocol names

Executing script query 'c:\php\php.exe -q C:\Apache2\htdocs\cacti\scripts\query_cisco_nbar_all.php x.x.x.x public 2 query protoname'

Found item [cnpdAllStatsProtocolName='No Such Instance currently exists'] index: 257

Can anybody help me?
lex8009
Posts: 37
Joined: Thu May 18, 2006 4:30 pm

nbar no graph

Post by lex8009 »

Please help. I'm having similar issue, where it doesn't generate the graph.


CRL-2610#sh ip nbar protocol-discovery top-n

Serial0/0.777
Input Output
Protocol Packet Count Packet Count
Byte Count Byte Count
2 minute bit rate (bps) 2 minute bit rate (bps)
------------------------ ------------------------ ------------------------
notes 6136536 6530990
1139070687 3416661738
22000 88000
http 1335800 1294334
967799842 225072298
60000 40000


Ran the php command using snmp v 1 and got this err msg:
C:\Inetpub\wwwroot\cacti\scripts>php ss_nbar_all.php 10.x.x.1 lcsnmp 1 query http
Content-type: text/html
X-Powered-By: PHP/4.3.6

<br />
<b>Warning</b>: Missing argument 6 for ss_nbar_all() in <b>C:\Inetpub\wwwroot\cacti\scripts\ss_nbar_all.php</b> on line
<b>17</b><br />

Ran the php command using snmp v 2 and got this error msg:
C:\Inetpub\wwwroot\cacti\scripts>php ss_nbar_all.php 10.23.17.1 lcsnmp 2 query http
Content-type: text/html
X-Powered-By: PHP/4.3.6
Last edited by lex8009 on Wed Jun 14, 2006 11:39 pm, edited 1 time in total.
rahadiyan
Posts: 1
Joined: Wed May 31, 2006 4:38 am
Contact:

Post by rahadiyan »

hai, Linegod...

i have same problem.... can u tell me how to solve that problem?

thanks,
sorry my english very bad
boots
Cacti User
Posts: 55
Joined: Wed Jan 07, 2004 4:59 am
Location: Melbourne Australia

Post by boots »

Hi guys,

I'm still persisting with this, however with no luck.

This takes ages to execute and eventually times out where I need to kill the browser and log in again. When I look in the device list, the device is available, but there are no items or rows available in the status.

snmpwalk -v1 -c XXXX X.X.X.X .1 1.3.6.1.4.1.9.9.244.1.8.1.1.2
iso.3.6.1.4.1.9.9.244.1.8.1.1.2.1 = STRING: "ftp"
iso.3.6.1.4.1.9.9.244.1.8.1.1.2.2 = STRING: "http"
iso.3.6.1.4.1.9.9.244.1.8.1.1.2.3 = STRING: "egp"
iso.3.6.1.4.1.9.9.244.1.8.1.1.2.4 = STRING: "gre"
etc etc works fine

php -q ss_nbar_all.php X.X.X.X XXXX 1 index
2049
2050
2051
2052
etc etc works fine

C:\>snmpwalk -v1 -c XXXX X.X.X.X. .1.3.6.1.4.1.9.9.244.1.2.1.1.2
iso.3.6.1.4.1.9.9.244.1.2.1.1.2.8.1 = STRING: "ftp"
iso.3.6.1.4.1.9.9.244.1.2.1.1.2.8.2 = STRING: "http"
iso.3.6.1.4.1.9.9.244.1.2.1.1.2.8.3 = STRING: "egp"
iso.3.6.1.4.1.9.9.244.1.2.1.1.2.8.4 = STRING: "gre"
iso.3.6.1.4.1.9.9.244.1.2.1.1.2.8.5 = STRING: "icmp"
etc etc works fine.

I have increased the IIS connection timeout value to a huge value, I have increased the maximum allocation time in PHP to the same large value and also increased the script and server timeout value to a very high vaule.

As mentioned in an earlier post, I have added the . in front of the OIDS through the script and I am running Win2K3, IIS5, PHP 4.3.9, Cacti 8.6g and Cactid 8.6f

When I run a verbose query, it timeouts eventually and locks the browser, getting no information in the log file when I increase the debug levels.

Any help, as I'd love to get this going...

Cheers

Boots
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests