cactid poller error using perl script
Moderators: Developers, Moderators
cactid poller error using perl script
Hi all,
i'm using cacti on my XP desktop and on a W2K3 server.
the version used are:
IIS5.1 or 6.0
cacti : 0.8.6g + patches
cactid: 0.8.6f-1
mysql: 4.1.15
rrdtool: 1.2.11
perl: 5.8.7
php : 5.0.5
I have tried to use the perl scripts furnished in topic:
http://forums.cacti.net/about4370.html
If i set poller to "cmd.php", the graphs are correctly set and i can monitor a 2cpus server in 1 graph.
Due to the amount of hosts/equipement i have to monitor, i reached frequently the limit of 600s and the, i decided to switch the polling mechanism from "cmd.php" to "cactid".
Now, each time the polling is performed, i have the following entries in the cacti log file:
11/15/2005 03:58:03 PM - CACTID: Poller[0] Host[14] DS[120] WARNING: Result from SCRIPT not valid. Partial Result: ...
11/15/2005 03:58:03 PM - CACTID: Poller[0] Host[14] ERROR: Empty result [es30linc]: 'perl C:/bvra/cacti/scripts/w32_query_cpu.pl es30linc get LoadPercentage 2'
launching cactid manually gives the same error
note that the same script launched manually in a cmd window using the same account gives the following expected result:
C:\bvra\cacti>perl C:/bvra/cacti/scripts/w32_query_cpu.pl es30linc get LoadPercentage 2
CPU0:7 CPU1:5
i'm certainly missing something but, browsing this forum, it seems that i'm not the only guy with this particular problem
Any advice?
Pascal
i added the debug output of the log in case of...
i'm using cacti on my XP desktop and on a W2K3 server.
the version used are:
IIS5.1 or 6.0
cacti : 0.8.6g + patches
cactid: 0.8.6f-1
mysql: 4.1.15
rrdtool: 1.2.11
perl: 5.8.7
php : 5.0.5
I have tried to use the perl scripts furnished in topic:
http://forums.cacti.net/about4370.html
If i set poller to "cmd.php", the graphs are correctly set and i can monitor a 2cpus server in 1 graph.
Due to the amount of hosts/equipement i have to monitor, i reached frequently the limit of 600s and the, i decided to switch the polling mechanism from "cmd.php" to "cactid".
Now, each time the polling is performed, i have the following entries in the cacti log file:
11/15/2005 03:58:03 PM - CACTID: Poller[0] Host[14] DS[120] WARNING: Result from SCRIPT not valid. Partial Result: ...
11/15/2005 03:58:03 PM - CACTID: Poller[0] Host[14] ERROR: Empty result [es30linc]: 'perl C:/bvra/cacti/scripts/w32_query_cpu.pl es30linc get LoadPercentage 2'
launching cactid manually gives the same error
note that the same script launched manually in a cmd window using the same account gives the following expected result:
C:\bvra\cacti>perl C:/bvra/cacti/scripts/w32_query_cpu.pl es30linc get LoadPercentage 2
CPU0:7 CPU1:5
i'm certainly missing something but, browsing this forum, it seems that i'm not the only guy with this particular problem
Any advice?
Pascal
i added the debug output of the log in case of...
- Attachments
-
- log.txt
- cacti log with debug mode set
- (12.07 KiB) Downloaded 179 times
Hmm, thats odd. Typically it's a combination of using backward slashes for the paths and/or the older version of cactid that leads to this problem. Neither is the case for you. TheWitness will have to dig into this one.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
as this problem seems to be a bug (reproduced on 2 different servers), i have created an official bug request:
http://bugs.cacti.net/view.php?id=629
Cheers
pascal
http://bugs.cacti.net/view.php?id=629
Cheers
pascal
Am i the only guy with this problem?
all my perl scripts gives this kind of errors (WARNING: Result from SCRIPT not valid. Partial Result: ... ) if the polling is set to cactid (and works fine if set to cmd.php).
Also launching the script manually is also perfect (expoected result displayed).
i have reinstalled multiple time this server, trying to change the path, the addon versions (like perl,php etc...) with the same result.
Is there somebody in the CACTI world using perl scripts/cacti on a W2K server and polling set to cactid?
waiting an answer
Pascal
all my perl scripts gives this kind of errors (WARNING: Result from SCRIPT not valid. Partial Result: ... ) if the polling is set to cactid (and works fine if set to cmd.php).
Also launching the script manually is also perfect (expoected result displayed).
i have reinstalled multiple time this server, trying to change the path, the addon versions (like perl,php etc...) with the same result.
Is there somebody in the CACTI world using perl scripts/cacti on a W2K server and polling set to cactid?
waiting an answer
Pascal
-
- Posts: 23
- Joined: Mon Nov 21, 2005 4:28 am
- Location: Spain
The same behaviour on my recent update from cacti-0.8.5 to cacti-0.8.6g + cactid-0.8.6f-1 on a Win2003 + php-4.3.8-Win32
I have lots of perl scripts to monitor the % of used hard disks of a bunch of servers using w32_query_logicaldisk.pl and all of them fail with the same problem as you and none of the RRAs are updated.
However, if I run the script from a command line:
I have lots of perl scripts to monitor the % of used hard disks of a bunch of servers using w32_query_logicaldisk.pl and all of them fail with the same problem as you and none of the RRAs are updated.
Code: Select all
11/22/2005 04:25:00 PM - CACTID: Poller[0] Host[2] ERROR: Empty result [10.0.1.5]: 'perl C:/Inetpub/wwwroot/cacti/scripts/w32_query_logicaldisk.pl 10.0.1.5 get freespace,size C:'
11/22/2005 04:25:00 PM - CACTID: Poller[0] Host[2] DS[86] WARNING: Result from SCRIPT not valid. Partial Result: ...
11/22/2005 04:25:00 PM - CACTID: Poller[0] Host[2] DS[86] SCRIPT: perl C:/Inetpub/wwwroot/cacti/scripts/w32_query_logicaldisk.pl 10.0.1.5 get freespace,size C:, output: U
Code: Select all
C:\Inetpub\wwwroot\cacti>perl C:/Inetpub/wwwroot/cacti/scripts/w32_query_logicaldisk.pl 10.0.1.5 get freespace,size C:
freespace:101027184640 size:200047001600
C:\Inetpub\wwwroot\cacti>
-
- Posts: 23
- Joined: Mon Nov 21, 2005 4:28 am
- Location: Spain
No, it does not work. I have just changed in Console > Settings > Poller > Type from cactid to cmd.php and the RRD files are not updated either. Do I need to change something else in order to change from cactid to cmd.php? Poller.php is still configured in Scheduled Tasks to run every 5 minutes.
Regards.
Regards.
magoo95: Cactid is TheWitness baby... he'll need to help you with why it isn't working. If you feel comfortable, you could try the latest version in the SVN.
jagbarcelo: You have other problems if cmd.php does not work either. What happens when you manually run cmd.php?
jagbarcelo: You have other problems if cmd.php does not work either. What happens when you manually run cmd.php?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 23
- Joined: Mon Nov 21, 2005 4:28 am
- Location: Spain
When calling cmd.php directly from a comman line console the script seems to run fine (php c:\inetpub\wwwroot\cacti\cmd.php). A fragment of the log file after the run is as follows:
As you can see there are errors telling that Result from CMD not valid but they are. Those w32_query_logicaldisk.pl calls run fine and return data when called also directly from a command line.
I suppose my RRD files do not get updated because of this error. No matter the way I use, either cactid or cmd.php, the data returned by perl scripts are not understood by cacti.
Anything else that I could check? Thanks for your help.
Code: Select all
11/22/2005 06:12:21 PM - CMDPHP: Poller[0] Host[9] DS[98] CMD: perl C:/Inetpub/wwwroot/cacti/scripts/w32_query_logicaldisk.pl 10.0.3.2 get freespace,size E:, output: freespace:0 size:581152768
11/22/2005 06:12:24 PM - CMDPHP: Poller[0] Host[9] DS[99] WARNING: Result from CMD not valid. Partial Result:
11/22/2005 06:12:24 PM - CMDPHP: Poller[0] Host[9] DS[99] CMD: perl C:/Inetpub/wwwroot/cacti/scripts/w32_query_logicaldisk.pl 10.0.3.2 get freespace,size F:, output: U
11/22/2005 06:12:24 PM - CMDPHP: Poller[0] Host[9] DS[116] SNMP: v1: 10.0.3.2, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.2, output: 1494503248
11/22/2005 06:12:24 PM - CMDPHP: Poller[0] Host[9] DS[116] SNMP: v1: 10.0.3.2, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.2, output: 1633830845
11/22/2005 06:12:24 PM - CMDPHP: Poller[0] Host[14] SNMP: Host responded to SNMP
11/22/2005 06:12:24 PM - CMDPHP: Poller[0] Host[14] DS[102] SNMP: v1: 10.0.1.2, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.65539, output: 1151366287
11/22/2005 06:12:24 PM - CMDPHP: Poller[0] Host[14] DS[102] SNMP: v1: 10.0.1.2, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.65539, output: 3723296697
11/22/2005 06:12:26 PM - CMDPHP: Poller[0] Host[14] DS[104] CMD: perl C:/Inetpub/wwwroot/cacti/scripts/w32_query_logicaldisk.pl 10.0.1.2 get freespace,size C:, output: freespace:51251728384 size:80015491072
11/22/2005 06:12:26 PM - CMDPHP: Poller[0] Host[14] DS[105] WARNING: Result from CMD not valid. Partial Result:
11/22/2005 06:12:26 PM - CMDPHP: Poller[0] Host[14] DS[105] CMD: perl C:/Inetpub/wwwroot/cacti/scripts/w32_query_logicaldisk.pl 10.0.1.2 get freespace,size D:, output: U
11/22/2005 06:12:26 PM - CMDPHP: Poller[0] Host[14] DS[106] CMD: perl C:/Inetpub/wwwroot/cacti/scripts/w32_query_logicaldisk.pl 10.0.1.2 get freespace,size E:, output: freespace:38256615424 size:120031477760
11/22/2005 06:12:27 PM - CMDPHP: Poller[0] Host[14] DS[107] CMD: perl C:/Inetpub/wwwroot/cacti/scripts/w32_query_logicaldisk.pl 10.0.1.2 get freespace,size F:, output: freespace:90679463936 size:160039239680
11/22/2005 06:12:27 PM - CMDPHP: Poller[0] Host[14] DS[113] CMD: perl C:/Inetpub/wwwroot/cacti/scripts/dual_cpu_load.pl 10.0.1.2 public, output: cpu1:7 cpu2:6
11/22/2005 06:12:27 PM - CMDPHP: Poller[0] Host[14] DS[214] CMD: C:/Inetpub/wwwroot/cacti/snmp1.bat 10.0.1.2 public .1.3.6.1.4.1.311.1.4.1.1.2.1.17.4.90.69.85.82, output: 143
11/22/2005 06:12:27 PM - CMDPHP: Poller[0] Host[14] DS[215] CMD: C:/Inetpub/wwwroot/cacti/snmp1.bat 10.0.1.2 public .1.3.6.1.4.1.311.1.4.1.1.2.1.16.4.90.69.85.82, output: 162
11/22/2005 06:12:27 PM - CMDPHP: Poller[0] Host[14] DS[216] SNMP: v1: 10.0.1.2, dsname: users, oid: .1.3.6.1.2.1.25.1.5.0, output: 7
11/22/2005 06:12:29 PM - CMDPHP: Poller[0] Host[14] DS[217] SNMP: v1: 10.0.1.2, dsname: processes, oid: .1.3.6.1.2.1.25.1.6.0, output: 95
[... more log lines omitted ...]
11/22/2005 06:13:01 PM - CMDPHP: Poller[0] Time: 58.3101 s, Theads: N/A, Hosts: 34
I suppose my RRD files do not get updated because of this error. No matter the way I use, either cactid or cmd.php, the data returned by perl scripts are not understood by cacti.
Anything else that I could check? Thanks for your help.
Odd it's only returning partial results. On 10.0.1.2 would you mind posting an snmpwalk of the HDD partition OID?
You're running the patches for cacti, right?
Further down in your log file, you should be seeing CACTI2RRD entries. This is when the data cacti collected gets stored in the rrd files. These are not present when you run cmd.php or poller.php ?
You're running the patches for cacti, right?
Further down in your log file, you should be seeing CACTI2RRD entries. This is when the data cacti collected gets stored in the rrd files. These are not present when you run cmd.php or poller.php ?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 23
- Joined: Mon Nov 21, 2005 4:28 am
- Location: Spain
Yes, I am running 0.8.6g + patches downloaded from .../pre-patched/ directory.
Since w32_query_logicaldisk.pl makes use of Win32_LogicalDisk class WMI, there is no OID to do a snmpwalk to. I have attached the perl script just in case. I cannot remember where I downloaded the script from, but it is quite old, it is dated 2003 in my system. The usage is as follows:
Besides, and most annoying thing of all... there are no CACTI2RRD entries in the log file. Any suggestion for this?
Since w32_query_logicaldisk.pl makes use of Win32_LogicalDisk class WMI, there is no OID to do a snmpwalk to. I have attached the perl script just in case. I cannot remember where I downloaded the script from, but it is quite old, it is dated 2003 in my system. The usage is as follows:
Code: Select all
perl w32_query_logicaldisk.pl computer action rvalue driveletter
Parameters:
computer - the name of the computer to query
action - index, query, get or browse
Note: browse will return all of the properties in this class.
rvalue - the value or values you want back
(FreeSpace,Size)
driveletter - the disk you want the information about
(C:)
- Attachments
-
- w32_query_logicaldisk.txt
- This is a perl scrip that makes use of Win32_LogicalDisk class of a computer using Windows Management Instrumentation (WMI). Rename the extension to .pl to run.
- (5.31 KiB) Downloaded 202 times
Ah right, lovely WMI. Does cacti always not return a certain partition from each host or is it random? You do realize the 'Host MIB - Hard drive space' template which is built into Cacti returns the same information via SNMP.
As for the lack of CACTI2RRD, not really sure. Try clearing your poller table by the following:
mysql -u root -p cacti
>truncate table poller_output;
>quit
Then run php poller.php under an admin account.
As for the lack of CACTI2RRD, not really sure. Try clearing your poller table by the following:
mysql -u root -p cacti
>truncate table poller_output;
>quit
Then run php poller.php under an admin account.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Wow, Pascal, what version of Cygwin do you have installed? What about changing the path for perl in the Data Input Method to the full perl path and then clearing the poller cache?
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Hi witness,
Sorry for the daly but i'm in france and there are lots of strikes.
I already tried to set full path for the perl command (using / or \ in case of) and clearing the poller cache after each test, reinstalling and set all packages in a folder directly under C:\ (my previous configuration used a C:\bvra main folder).
in all my tests, i have tried also the standard cactid package (with cygwin dll furnishedor by using the latest cygwin package 1.5.18-1 (and removing cygwin1.dll) and the result is still the same.
Once again, note that all perl scripts are not polled correctly using latest cactid version (but works with default poller) while all other (snmp OID) works fine with cactid.
is it possible i'm the only guy using cactid on a windows server with perl scripts/wmi and havind this problem.
It seems that everybody else uses linux.
In all cases, thanks in advance for you help
Pascal
Sorry for the daly but i'm in france and there are lots of strikes.
I already tried to set full path for the perl command (using / or \ in case of) and clearing the poller cache after each test, reinstalling and set all packages in a folder directly under C:\ (my previous configuration used a C:\bvra main folder).
in all my tests, i have tried also the standard cactid package (with cygwin dll furnishedor by using the latest cygwin package 1.5.18-1 (and removing cygwin1.dll) and the result is still the same.
Once again, note that all perl scripts are not polled correctly using latest cactid version (but works with default poller) while all other (snmp OID) works fine with cactid.
is it possible i'm the only guy using cactid on a windows server with perl scripts/wmi and havind this problem.
It seems that everybody else uses linux.
In all cases, thanks in advance for you help
Pascal
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I am uncertain about others having the problem. I did not that some of the perl scripts did run with Cactid. Is that correct? I am working on a new release right now (requires full path in Data Input Method). Can you build that from source and test?
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 1 guest