[SOLVED] Perl Scripts Issue
Moderators: Developers, Moderators
If you switch back to the cmd.php poller, does everything work?
| 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 |
That is a dumb logic bug. I've got instructions in my FAQ (in my installation guide) on how to fix that. Once thats fixed, then see how the cmd.php poller works.
| 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 |
In first time, I add $guess = strtolower($guess);
And it worked.
I have changed also:
if (version_compare("5.2.0", PHP_VERSION, "<")) {
to:
if (version_compare("5.2.0", PHP_VERSION, ">=")) {
There is no message "Empty result', but there is no graph at all too.
In Cacti log there is no any errors related to this data source too.
What can I do next ?
And it worked.
I have changed also:
if (version_compare("5.2.0", PHP_VERSION, "<")) {
to:
if (version_compare("5.2.0", PHP_VERSION, ">=")) {
There is no message "Empty result', but there is no graph at all too.
In Cacti log there is no any errors related to this data source too.
What can I do next ?
Cacti user
Alright so now when you run cmd.php there aren't any errors right? with the logging level set to debug, you should see stuff scrolling across the screen and in the log file. Do you?
| 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 |
Yes, but nothing related to data source that I am interested in.
The difference between the CACTID mode is that graph not showing at all(there was a graph with CACTID, but without values in it) , but there is not Error message of type 'Empty result...'.
Does it matter that my host is dummy host i.e. 'SNMP not in use' ?
The difference between the CACTID mode is that graph not showing at all(there was a graph with CACTID, but without values in it) , but there is not Error message of type 'Empty result...'.
Does it matter that my host is dummy host i.e. 'SNMP not in use' ?
Cacti user
Yes, that could be a problem. Cacti should poll that device every time.
So do any of your graphs work or just the perl script one is broken?
So do any of your graphs work or just the perl script one is broken?
| 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 |
Ah alright. Lets stick with the cmd.php poller until everything works. Then migrate over to cactid.
1) Have you read on the documentation site on how to properly create a script/template?
2) What is the output of your script when you manually run it?
3) With cacti logging level set to debug, what is the output of the script when cacti runs it?
1) Have you read on the documentation site on how to properly create a script/template?
2) What is the output of your script when you manually run it?
3) With cacti logging level set to debug, what is the output of the script when cacti runs it?
| 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 |
The only record related to my script I found was:
11/14/2007 01:32:48 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_item (local_data_id,host_id,action,hostname, snmp_community,snmp_version,snmp_timeout,snmp_username,snmp_password,snmp_port,rrd_name,rrd_path, rrd_num,arg1,arg2,arg3) values (14748,429,1,'Sofia', '','2','6000', '','','161', '','C:\\Inetpub\\Wwwroot\\cacti\\rra\\sofia_weather_min_14748.rrd', '1','c:/perl/bin/perl.exe C:/Inetpub/Wwwroot/cacti/scripts/dnsresponsetime.pl -s 10.15.200.5 -h dir.bg -t 9 -i 300 -r -d 10','','')"
The script is giving the results started in command prompt:
C:\Inetpub\Wwwroot\cacti\scripts>dnsresponsetime.pl -s 10.15.200.5 -h dir.bg -i 15 -r
avg:2 max:68 median:2 min:0 iter:1932
and yes I have read the documentation about how to write scripts for CACTI.
Interesting is that with cmd.php I do not receive any errors in my log file.
Also the data source:
C:/Inetpub/Wwwroot/cacti/rra/sofia_weather_min_14748.rrd
which is my data source for the script results is not present in this folder C:/Inetpub/Wwwroot/cacti/rra/
Only when I am using CACTID it is there, but then I am getting the 'Empty result...' message.
11/14/2007 01:32:48 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_item (local_data_id,host_id,action,hostname, snmp_community,snmp_version,snmp_timeout,snmp_username,snmp_password,snmp_port,rrd_name,rrd_path, rrd_num,arg1,arg2,arg3) values (14748,429,1,'Sofia', '','2','6000', '','','161', '','C:\\Inetpub\\Wwwroot\\cacti\\rra\\sofia_weather_min_14748.rrd', '1','c:/perl/bin/perl.exe C:/Inetpub/Wwwroot/cacti/scripts/dnsresponsetime.pl -s 10.15.200.5 -h dir.bg -t 9 -i 300 -r -d 10','','')"
The script is giving the results started in command prompt:
C:\Inetpub\Wwwroot\cacti\scripts>dnsresponsetime.pl -s 10.15.200.5 -h dir.bg -i 15 -r
avg:2 max:68 median:2 min:0 iter:1932
and yes I have read the documentation about how to write scripts for CACTI.
Interesting is that with cmd.php I do not receive any errors in my log file.
Also the data source:
C:/Inetpub/Wwwroot/cacti/rra/sofia_weather_min_14748.rrd
which is my data source for the script results is not present in this folder C:/Inetpub/Wwwroot/cacti/rra/
Only when I am using CACTID it is there, but then I am getting the 'Empty result...' message.
Cacti user
It appears cacti is running the script with different arguments from what you manually ran. Does that make a difference?
Make sure the script and perl.exe have the correct permissions to the IUSR_ and IIS_WPG accounts have read/execute rights.
Make sure the script and perl.exe have the correct permissions to the IUSR_ and IIS_WPG accounts have read/execute rights.
| 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 |
Alright, fire up sysinternals filemon during a polling session. Makes it easier to see whats going on if you set the filter highlighting to 'denied'. Post the log as an attachment.
| 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 |
Here it is as an attachment the FILEMON log file from 2 pool intervals.
There is no highlited lines, because there is no DENIED status messages.
There is no highlited lines, because there is no DENIED status messages.
- Attachments
-
- LOG.zip
- (90.94 KiB) Downloaded 164 times
Cacti user
Who is online
Users browsing this forum: No registered users and 1 guest