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

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

Moderators: Developers, Moderators

Post Reply
scottsta
Posts: 9
Joined: Sat Jun 17, 2006 9:58 am

Operational Issue - Read and R/W Community strings with NBAR

Post by scottsta »

Hi all -

I have a small problem - for operational reasons within out network - we only use SNMP read community strings. I understand that NBAR queries requires the use of a READ/WRITE.

So - we have established an additional SNMP community string (with Write access) for only access to the NBAR specific OIDS.

Unfortunately - because the scripts here cannot differentiate - the NBAR graphs do not work.

I have looked through both the scipts (resources and script-server scripts) to see if I can somehow hard code a RW string for the NBAR specific OID strings (i think his would be the easiest approach). The standard SNMP string for the initial query of the interfaces etc at the start of the scripts would presumably use the global SNMP community string(which in our case is read only)

Although an odd issue, I suspect that someone may have already encountered this - has this happened to anyone ? What was the solution.

I dont understand the structure of the scripts well enough to go in and modify myeslf ? Any pointers ?

thanks in advance..
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

IMO the NBAR queries only require read only SNMP access (I use it on Cisco 2700 routers this way).
[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]
KARLOS
Posts: 34
Joined: Thu Jan 20, 2005 7:31 am

Problems with NBAR

Post by KARLOS »

Hi at all,

I have installed cacti0.8.6g, Apache 2.0.54, PHP 5.0.3, RRDTool 1.0.49, en Suse Linux 9.1

I have installed the NBAR and when i execute it get this errors.


OK u:0.08 s:0.12 r:7.11
OK u:0.08 s:0.12 r:7.11
PHP Warning: main(/srv/www/htdocs/cacti_g/scripts/ss_nbar_all.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /srv/www/htdocs/cacti_G/script_server.php on line 130
PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening '/srv/www/htdocs/cacti_g/scripts/ss_nbar_all.php' for inclusion (include_path='.:/usr/share/php5/PEAR') in /srv/www/htdocs/cacti_G/script_server.php on line 130
CACTID: Host[82] DS[2325] SS[0] WARNING: Result from SERVER not valid. Partial Result: ...
PHP Warning: main(/srv/www/htdocs/cacti_g/scripts/ss_nbar_all.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /srv/www/htdocs/cacti_D/script_server.php on line 130
PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening '/srv/www/htdocs/cacti_g/scripts/ss_nbar_all.php' for inclusion (include_path='.:/usr/share/php5/PEAR') in /srv/www/htdocs/cacti_G/script_server.php on line 130
CACTID: Host[82] DS[2325] SS[1] WARNING: Result from SERVER not valid. Partial Result: ...
OK u:0.08 s:0.12 r:8.12

Any ideas?

Thks
etijburg
Posts: 5
Joined: Thu Jul 20, 2006 11:48 am
Location: Plano, TX

Stacked Graph

Post by etijburg »

Maybe I'm missing something here. The only Graph that I want is the stacked graph, so that is the only one I'm having Cacti create. I was just thinking that maybe that all the other graphs might be required to get the data polled and stored in an rra before the stacked graph can get it's data. Does this make any sense or am I way off base here.
Erik Tijburg
Chief Network Analyst
RedMoon Inc.
mek1
Cacti User
Posts: 55
Joined: Tue Mar 21, 2006 11:31 am

Post by mek1 »

I am having problems with graphing nbar similar to others. It shows green and that it is being graphed but retrusn 0 items, 0 rows. I ran snmpwalk .1.3.6.1.4.1.9.9.244.1.2.1.1.2 against both routers with NBAR enabled and both return all strings fine.

what else might i need to do here?

thanks
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

BTW, if you want the bit rate to be correct (which is the default value on the Y-axis), you have to change the CDEF to *1024. It is set to * 8 which will gives you incorrect bit rates.
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Post by spoonman »

Question??? How can I tell if I have the Correct IOS on my 6509 router for SNMP NBAR to work? I'm assuming i do not because when I walk the OID i get nothing in return.. Here is my IOS we are running >>
IOS (tm) s72033_rp Software (s72033_rp-IPSERVICESK9-M), Version 12.2(18)SXE1, RELEASE SOFTWARE (fc2)

Any ideas?? I've configured one Vlan interface with the ip nbar protocol-discovery command

And running the sh ip nbar protocol-discovery top-n command returns valdid data.

Thanks
ABX
Cacti User
Posts: 68
Joined: Thu Mar 01, 2007 5:55 am

Post by ABX »

I solved the graph issue by changing the allow_call_time_pass_reference to ON in php.ini

OS: Windows 2003 server
sandman
Posts: 3
Joined: Wed Sep 13, 2006 6:23 am

BiteRate vs Bits/second

Post by sandman »

Hi.. I would like to know whats the difference between the 2 types of graphs... the case is: Comparing the data from NetFlow Analyzer, the Volume of HTTP data of the last day is much more when "total bandwidth" value... calculated from this formula:

Item # 5 COMMENT: Total In: |sum:auto:current:2:auto|<HR> COMMENT AVERAGE

in the graph editor.


Thanks...
rsaeks
Posts: 34
Joined: Mon Nov 06, 2006 5:15 pm

Post by rsaeks »

When I setup the graph, I get the error message in GraphDebug Mode:

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

Any thoughts as to what to look at for the bytesout setup?
rsaeks
Posts: 34
Joined: Mon Nov 06, 2006 5:15 pm

Post by rsaeks »

I am attempting to run this in CLI mode just to see if I get some output, but I get a missing argument 6 with this command:

php ./ss_nbar_all.php 10.17.1.2 STRING 1 query http

I can walk OID to get a list of the protocols, but no graphs, no data. The query is showing a bunch of results, so I know the data is there.

Any help before I scrap this template?
aleu
Cacti User
Posts: 216
Joined: Mon Dec 11, 2006 10:17 am

Post by aleu »

eddievenus wrote: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.
Just wondering whether you guys have the same issue. Unfortunately, I do. All the individual graphs are fine, but the stacked one.

Please advice.

Thanks,
Aleu
Mikeeo
Posts: 15
Joined: Sun Nov 03, 2002 9:13 am

Post by Mikeeo »

rsaeks wrote:When I setup the graph, I get the error message in GraphDebug Mode:

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

Any thoughts as to what to look at for the bytesout setup?
I get the same issue complaining about the rrd not being created.
the_sphynx
Posts: 21
Joined: Wed Aug 04, 2004 4:28 pm
Location: Thornton, CO

Getting this to work on 0.8.7a

Post by the_sphynx »

All,
I had trouble getting this to work on 0.8.7a. I was using the plugin arch. It located all of the files (xml, php, etc) and never gave me an error via cacti but would return 0 rows. When I would run the script via CLI with a

Code: Select all

php -q ss_nbar_all.php x.x.x.x commstring 2 query index
I would get

Code: Select all

Fatal error: Call to undefined function read_config_option() in /var/www/xxxx/cacti/lib/snmp.php on line 233
I added the following line into ss_nbar_all.php:

Code: Select all

include_once(dirname(__FILE__) . "/../include/global.php");
It now runs like a charm.
I just wanted to let anyone else having the same issues know the fix.
Thanks,

Bryan
infinity005
Posts: 13
Joined: Wed Dec 15, 2004 3:29 am

Re: Getting this to work on 0.8.7a

Post by infinity005 »

the_sphynx wrote:All,
I had trouble getting this to work on 0.8.7a. I was using the plugin arch. It located all of the files (xml, php, etc) and never gave me an error via cacti but would return 0 rows. When I would run the script via CLI with a

Code: Select all

php -q ss_nbar_all.php x.x.x.x commstring 2 query index
I would get

Code: Select all

Fatal error: Call to undefined function read_config_option() in /var/www/xxxx/cacti/lib/snmp.php on line 233
I added the following line into ss_nbar_all.php:

Code: Select all

include_once(dirname(__FILE__) . "/../include/global.php");
It now runs like a charm.
I just wanted to let anyone else having the same issues know the fix.
Thanks. Looks like that was the key for me.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests