Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Mar 28, 2017 3:17 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Tue May 06, 2008 3:18 am 
Offline

Joined: Wed Dec 05, 2007 12:25 pm
Posts: 21
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:
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 4:45 am 
Offline

Joined: Wed Dec 05, 2007 12:25 pm
Posts: 21
From here: http://www.php.net/manual/en/function.s ... format.php

Quote:
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. :(


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 5:00 am 
Offline
Cacti User
User avatar

Joined: Mon Apr 24, 2006 3:33 am
Posts: 216
ascendo wrote:
[code]PHP Fatal error: Call to undefined function snmp_set_oid_numeric_print() in C:\cacti\scripts\functions.php on line 39


...or you can try commenting-out those two lines in functions.php
Quote:
#snmp_set_oid_numeric_print(1)
#snmp_set_enum_print(1)


i've had some issues on linux machines when they were ineffective as well - maybe this will work on windows as well?...


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 5:54 am 
Offline

Joined: Wed Dec 05, 2007 12:25 pm
Posts: 21
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 6:17 am 
Offline

Joined: Wed Dec 05, 2007 12:25 pm
Posts: 21
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?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 7:24 am 
Offline
Cacti User
User avatar

Joined: Mon Apr 24, 2006 3:33 am
Posts: 216
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.....


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 7:31 am 
Offline

Joined: Wed Dec 05, 2007 12:25 pm
Posts: 21
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.


Top
 Profile  
 
 Post subject: error when using this template
PostPosted: Fri Aug 15, 2008 10:34 am 
Offline

Joined: Tue Mar 25, 2003 3:51 pm
Posts: 5
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 ?


Top
 Profile  
 
 Post subject: update about the error
PostPosted: Fri Aug 15, 2008 11:08 am 
Offline

Joined: Tue Mar 25, 2003 3:51 pm
Posts: 5
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]


Top
 Profile  
 
 Post subject: Re: update about the error
PostPosted: Mon Aug 18, 2008 2:55 am 
Offline
Cacti User
User avatar

Joined: Mon Apr 24, 2006 3:33 am
Posts: 216
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:
Quote:
+ 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

_________________
zond plugin
memorize plugin
transporter plugin


Top
 Profile  
 
 Post subject: Slowliness problems
PostPosted: Tue Aug 19, 2008 1:54 pm 
Offline

Joined: Wed Apr 23, 2008 1:18 pm
Posts: 7
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


Top
 Profile  
 
 Post subject: Re: Slowliness problems
PostPosted: Wed Aug 20, 2008 1:30 am 
Offline
Cacti User
User avatar

Joined: Mon Apr 24, 2006 3:33 am
Posts: 216
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:

_________________
zond plugin
memorize plugin
transporter plugin


Top
 Profile  
 
 Post subject: Re: Slowliness problems
PostPosted: Wed Aug 20, 2008 9:36 am 
Offline

Joined: Wed Apr 23, 2008 1:18 pm
Posts: 7
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:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 20, 2008 3:44 pm 
Offline

Joined: Wed Apr 23, 2008 1:18 pm
Posts: 7
Its working now!!! I've just rebuild the poller cache and the data collection time went to 100s!

Thanks for your help!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 21, 2008 2:04 am 
Offline
Cacti User
User avatar

Joined: Mon Apr 24, 2006 3:33 am
Posts: 216
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.

_________________
zond plugin
memorize plugin
transporter plugin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group