cisco QoS and CAR 64bit templates pack

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

Moderators: Developers, Moderators

ascendo
Posts: 21
Joined: Wed Dec 05, 2007 12:25 pm

Post by ascendo »

I walked the tree and found 64 bit counters, so it's not that.

Ok I don't have \usr\bin on my server (running 0.8.7a on Windows 2003/iis). Why is Cacti looking for \usr\bin\php, when I have configured 'c:\php\php-win.exe' as the php executable?

Edit to add: I've edited the necessary files to locate PHP correctly, but still no joy.

If I run the files from a CMD prompt, I get the following error:

Code: Select all

PHP Fatal error:  Call to undefined function  snmp_set_oid_numeric_print() in C:\cacti\scripts\functions.php on line 39

Fatal error: Call to undefined function  snmp_set_oid_numeric_print() in C:\cacti\scripts\functions.php on line 39
I'm running PHP 5.2.5, and I do have the snmp extension enabled.
ascendo
Posts: 21
Joined: Wed Dec 05, 2007 12:25 pm

Post by ascendo »

From here: http://www.php.net/manual/en/function.s ... format.php
Note: snmp_set_oid_output_format() is only available when using the UCD SNMP library. This function is not available when using the Windows SNMP library.
Dang. :(
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

ascendo wrote:

Code: Select all

PHP Fatal error:  Call to undefined function  snmp_set_oid_numeric_print() in C:\cacti\scripts\functions.php on line 39
[/quote]

...or you can try commenting-out those two lines in functions.php
[quote]#snmp_set_oid_numeric_print(1)
#snmp_set_enum_print(1)[/quote]

i've had some issues on linux machines when they were ineffective as well - maybe this will work on windows as well?...
ascendo
Posts: 21
Joined: Wed Dec 05, 2007 12:25 pm

Post by ascendo »

I've given that a try, and the script now returns data. Unfortunately, columns from the data query result are incorrectly populated or not populated at all.
ascendo
Posts: 21
Joined: Wed Dec 05, 2007 12:25 pm

Post by ascendo »

I see that the output for the OIDs are:

.iso.a.b.c instead of .1.a.b.c etc. Perhaps this is causing a formatting problem?
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

ascendo wrote:I see that the output for the OIDs are:

.iso.a.b.c instead of .1.a.b.c etc. Perhaps this is causing a formatting problem?
output should be numeric:
.1.3.6.1.3.1......
instead of
.iso.enterprises.cisco.....
ascendo
Posts: 21
Joined: Wed Dec 05, 2007 12:25 pm

Post by ascendo »

The only non numeric part of the oid was 'iso', so I did a str_replace on the array, and it appears to have fixed THAT problem.

I went ahead and created some graphs, and they didn't work at all, and no other data from the devices was collected either.

I'll investigate the logs to see what's happening a bit later.
dirk
Posts: 5
Joined: Tue Mar 25, 2003 3:51 pm

error when using this template

Post by dirk »

Hello,

I've imported the car template, but when I tried to add graphs I get the following error:

Data Query [cisco-car-64]

Error in data query.

Notice: Undefined variable: column_counter in /var/www/html/netnb/cacti-0.8.7b/graphs_new.php on line 876

Anyone ideas ?
dirk
Posts: 5
Joined: Tue Mar 25, 2003 3:51 pm

update about the error

Post by dirk »

i'm a little bit ahead, now i have the following:

Data Query [cisco-car-64]

This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
Select a graph type: Input CAR Output CAR

Data Query [SNMP - Interface Statistics]

This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.

If I run the debug mode I get the following


Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/netnb/cacti-0.8.7b/resource/script_queries/cisco-car-64.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" index'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query index'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query name'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query alias'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query descr'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query status'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query cfglimit'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query cfgextlimit'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query cfgrate'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query direction'
+ Found data query XML file at '/var/www/html/netnb/cacti-0.8.7b/resource/script_queries/cisco-car-64.xml'
+ Found data query XML file at '/var/www/html/netnb/cacti-0.8.7b/resource/script_queries/cisco-car-64.xml'
+ Found data query XML file at '/var/www/html/netnb/cacti-0.8.7b/resource/script_queries/cisco-car-64.xml'

So what goes wrong ?
Also the snmp interfaces don't work either.

1) cisco-car-64 (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]
2) SNMP - Interface Statistics (Verbose Query) Uptime Goes Backwards Success [53 Items, 6 Rows]
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Re: update about the error

Post by johnrembo »

dirk wrote:i'm a little bit ahead, now i have the following:

Data Query [cisco-car-64]

This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
Select a graph type: Input CAR Output CAR

Data Query [SNMP - Interface Statistics]

This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.

If I run the debug mode I get the following


Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/netnb/cacti-0.8.7b/resource/script_queries/cisco-car-64.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" index'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query index'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query name'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query alias'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query descr'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query status'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query cfglimit'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query cfgextlimit'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query cfgrate'
+ Executing script query '/usr/bin/php /var/www/html/netnb/cacti-0.8.7b/scripts/cisco-car-64.php 1.1.1.1 "2::xxxx::::::MD5::::DES::::161::500" query direction'
+ Found data query XML file at '/var/www/html/netnb/cacti-0.8.7b/resource/script_queries/cisco-car-64.xml'
+ Found data query XML file at '/var/www/html/netnb/cacti-0.8.7b/resource/script_queries/cisco-car-64.xml'
+ Found data query XML file at '/var/www/html/netnb/cacti-0.8.7b/resource/script_queries/cisco-car-64.xml'

So what goes wrong ?
Also the snmp interfaces don't work either.

1) cisco-car-64 (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]
2) SNMP - Interface Statistics (Verbose Query) Uptime Goes Backwards Success [53 Items, 6 Rows]
dirk,
to see php errors you should run the query from the console manually.You can see the query string in the query-debug mode:
+ Running data query [15].
+ Found type = '4 '[script query].
+ Found data query XML file at '/opt/klientai/resource/script_queries/cisco-car-64.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php /opt/klientai/scripts/cisco-car-64.php 59.59.7.13 "3::nms::nms::nms::MD5::::[None]::" index'
+ Executing script query '/usr/bin/php /opt/klientai/scripts/cisco-car-64.php 59.59.7.13 "3::NmS2KKzx::vss::NmS2KKzx::MD5::::[None]::" query index'
+ Found item [index='127.1.1'] index: 127.1.1
+ Found item [index='129.1.1'] index: 129.1.1
+ Found item [index='129.2.1'] index: 129.2.1
+ Found item [index='129.2.2'] index: 129.2.2
+ Found item [index='135.1.1'] index: 135.1.1
+ Found item [index='135.2.1'] index: 135.2.1
+ Found item [index='144.1.1'] index: 144.1.1
+ Found item [index='153.1.1'] index: 153.1.1
+ Found item [index='154.1.1'] index: 154.1.1
+ Found item [index='155.1.1'] index: 155.1.1
the query here is: /usr/bin/php /opt/klientai/scripts/cisco-car-64.php 59.59.7.13 "3::NmS2KKzx::vss::NmS2KKzx::MD5::::[None]::" query index

bacause both templates are working fine on my linux machines, it is very difficult to diagnose problems at your end.

ps: i've uploaded some modified scripts. you should update them. no major changes...just some small fixes
[url=http://forums.cacti.net/viewtopic.php?t=24934&highlight=zond]zond plugin[/url]
[url=http://forums.cacti.net/viewtopic.php?t=28384]memorize plugin[/url]
[url=http://forums.cacti.net/viewtopic.php?p=141322#141322]transporter plugin[/url]
elviejorafiki
Posts: 7
Joined: Wed Apr 23, 2008 1:18 pm

Slowliness problems

Post by elviejorafiki »

Hi JohnRembo!! First of all I want to thank you for this scripts, they have been very usefull.

however I'm having problems with timming.. it seems that the execution of the scripts is taking too long.

I've already installed spine, but I'm getting this sort of messages in the cacti log file
"SPINE: Poller[0] ERROR: Spine Timed Out While Processing Hosts Internal"
And it's weird, because I don't think that I'm polling a lot of hosts.

Date Tue, 19 Aug 2008 13:51:27 -0500
Cacti Version 0.8.7b
Cacti OS unix
SNMP Version net-snmp
RRDTool Version RRDTool 1.2.x
Hosts 14
Graphs 206
Data Sources Script/Command: 2
SNMP Query: 24
Script Query: 180
Total: 206
Poller Information
Interval 300
Type spine
Items Action[0]: 40
Action[1]: 458
Total: 498
Concurrent Processes 8
Max Threads 30
PHP Servers 10
Script Timeout 15
Max OID 60
Last Run Statistics Time:295.2976 Method:spine Processes:8 Threads:30 Hosts:13 HostsPerProcess:2 DataSources:498 RRDsProcessed:142

did you have this problem also?

Regards
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Re: Slowliness problems

Post by johnrembo »

elviejorafiki wrote:Hi JohnRembo!! First of all I want to thank you for this scripts, they have been very usefull.

however I'm having problems with timming.. it seems that the execution of the scripts is taking too long.

I've already installed spine, but I'm getting this sort of messages in the cacti log file
"SPINE: Poller[0] ERROR: Spine Timed Out While Processing Hosts Internal"
And it's weird, because I don't think that I'm polling a lot of hosts.

Date Tue, 19 Aug 2008 13:51:27 -0500
Cacti Version 0.8.7b
Cacti OS unix
SNMP Version net-snmp
RRDTool Version RRDTool 1.2.x
Hosts 14
Graphs 206
Data Sources Script/Command: 2
SNMP Query: 24
Script Query: 180
Total: 206
Poller Information
Interval 300
Type spine
Items Action[0]: 40
Action[1]: 458
Total: 498
Concurrent Processes 8
Max Threads 30
PHP Servers 10
Script Timeout 15
Max OID 60
Last Run Statistics Time:295.2976 Method:spine Processes:8 Threads:30 Hosts:13 HostsPerProcess:2 DataSources:498 RRDsProcessed:142

did you have this problem also?

Regards
1st - you should check poller cache and try running single qos or car query from the console. You can use unix "time" command to measure how long it takes:
#time /usr/bin/php /opt/cacti/scripts/cisco-qos-64.php 10.10.10.10 .....

2nd - when next pooling is to come (you can determine it by using "date" command) - for example 11:59:30 - you could check what scripts prom previous pooler are still hanging there:
#ps ax|grep php

3rd - maybe you have thousands of interfaces on a busy cisco box and data-queries are taking far too long (usualy this happens when you press a green circle button which reloads a data-query cache). See my post above on debugging data-query (use "time" command as well).

4th - I had an issue with juniper routers and too long ifAlias (or ifDescr) fields. When data-query was reaching too long ifAlias (our engineers define them manually) - it was hanging the connection. See you router's doccumentation (or ask support) if there are such restrictions and fix them.

5th - OSI Layer-8 problems? :wink:
[url=http://forums.cacti.net/viewtopic.php?t=24934&highlight=zond]zond plugin[/url]
[url=http://forums.cacti.net/viewtopic.php?t=28384]memorize plugin[/url]
[url=http://forums.cacti.net/viewtopic.php?p=141322#141322]transporter plugin[/url]
elviejorafiki
Posts: 7
Joined: Wed Apr 23, 2008 1:18 pm

Re: Slowliness problems

Post by elviejorafiki »

johnrembo wrote:
1st - you should check poller cache and try running single qos or car query from the console. You can use unix "time" command to measure how long it takes:
#time /usr/bin/php /opt/cacti/scripts/cisco-qos-64.php 10.10.10.10 .....
time /opt/csw/php5/bin/php /opt/cacti-0.8.7b/scripts/cisco-qos-64.php PE_XXX_1 "3::::XXXX::YYYYY::MD5::::[None]::::161::500" query class

[...]


real 0m9.239s --->seems to me a lot of time, i have 80 different classes configured on the box, but the processor is operating normall.
user 0m2.060s
sys 0m0.760s

PE_ROUTER_1--> show proc cpu
CPU utilization for five seconds: 6%/2%; one minute: 4%; five minutes: 5%
johnrembo wrote: 2nd - when next pooling is to come (you can determine it by using "date" command) - for example 11:59:30 - you could check what scripts prom previous pooler are still hanging there:
#ps ax|grep php
Almost all the processes are finishing on time, I'm polling every five min, but i have had to remove some routers from the cacti db to achieve this, otherwise instead of processing 172 rrds cacti only have time to process about 140 rrds
johnrembo wrote: 3rd - maybe you have thousands of interfaces on a busy cisco box and data-queries are taking far too long (usualy this happens when you press a green circle button which reloads a data-query cache). See my post above on debugging data-query (use "time" command as well).
I'll do this and let you know
johnrembo wrote: 4th - I had an issue with juniper routers and too long ifAlias (or ifDescr) fields. When data-query was reaching too long ifAlias (our engineers define them manually) - it was hanging the connection. See you router's doccumentation (or ask support) if there are such restrictions and fix them.
Maybe this can be the issue, the ifAlias on my interfaces is too long, ie:
int Serial1/2/7:0
description PEP.RNTE.PE_YYY_1.GALLO-VERDE
johnrembo wrote: 5th - OSI Layer-8 problems? :wink:
maybe a problem between the chair and the keyboard :lol:
elviejorafiki
Posts: 7
Joined: Wed Apr 23, 2008 1:18 pm

Post by elviejorafiki »

Its working now!!! I've just rebuild the poller cache and the data collection time went to 100s!

Thanks for your help!
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Post by johnrembo »

elviejorafiki wrote:Its working now!!! I've just rebuild the poller cache and the data collection time went to 100s!

Thanks for your help!
elviejorafiki wrote:Its working now!!! I've just rebuild the poller cache and the data collection time went to 100s!

Thanks for your help!
great!

ps: on my quad-xeon(8 virtual cpu's) machine with 4Gigs of RAM

"query class" returns 112 classes in 0.52 sec.
"get conformedByte" takes 0.25 sec to finish.

both tests were taken while poller is running.

i suggest for you not to worry about long ifAliases, because, as I've allready mentioned - this is Juniper's problem and luckily cisco boxes doesn't have that illness.
[url=http://forums.cacti.net/viewtopic.php?t=24934&highlight=zond]zond plugin[/url]
[url=http://forums.cacti.net/viewtopic.php?t=28384]memorize plugin[/url]
[url=http://forums.cacti.net/viewtopic.php?p=141322#141322]transporter plugin[/url]
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests