I changed cacti from cmd.exe to cactid.exe without any big probs.
But now the ping.pl skript isnt workin.
This is the output from the cactid poller:
CACTID: Host[13] ERROR: Empty result [192.168.11.129]: 'perl E:/inetpub/mrtgroot/cacti/scripts/ping.pl 192.168.11.129'
CACTID: Host[13] WARNING: Result from SCRIPT not valid. Partial Result: U...
Host[2] ERROR: Empty result [192.168.10.39]: 'E:/PHP/php.exe -q E:/inetpub/mrtgroot/cacti/scripts/query_host_cpu.php 192.168.10.39 public 1 get usage 0'
CACTID: Host[2] WARNING: Result from SCRIPT not valid. Partial Result: U...
CACTID: Host[2] ERROR: Empty result [192.168.10.39]: 'E:/PHP/php.exe -q E:/inetpub/mrtgroot/cacti/scripts/query_host_partitions.php 192.168.10.39 public 1 get used 2'
CACTID: Host[2] WARNING: Result from SCRIPT not valid. Partial Result: U...
If i run the line in the commandshell like this it works fine as you can see.
C:\cactid>perl E:/inetpub/mrtgroot/cacti/scripts/ping.pl 192.168.11.129
10
C:\cactid>E:/PHP/php.exe -q E:/inetpub/mrtgroot/cacti/scripts/query_host_cpu.php 192.168.10.39 public
1 get usage 0
3
C:\cactid>E:/PHP/php.exe -q E:/inetpub/mrtgroot/cacti/scripts/query_host_partitions.php 192.168.10.39
public 1 get used 2
5370687488
Here is the script. I changed it a bit for windows.
#!/usr/bin/perl
$ping = `ping -n 1 $ARGV[0] | grep.exe Antwort`;
$ping =~ /(.*Zeit)(<|=)(.*)(ms|usec)/;
print $3;
The Datainputmethod is Script/Command and here is the path:
E:\Perl\bin\perl.exe <path_cacti>/scripts/ping.pl <ip>
I dont know why there is valid returnvalue.
any suggestions....?
thx in advance
Problem with ping, hostpartition and cpu-values[SOLVED]
Moderators: Developers, Moderators
Problem with ping, hostpartition and cpu-values[SOLVED]
Last edited by cpt_ahab on Mon Feb 07, 2005 3:32 am, edited 1 time in total.
got it.. :D
had to install cywin.
thought the dll in the cactid dir is enough.
everything works fine now, except our webserver which is a windowsmachine.
cpu load and disk space arent returning values
any ideas??
thought the dll in the cactid dir is enough.
everything works fine now, except our webserver which is a windowsmachine.
cpu load and disk space arent returning values
any ideas??
One possible reason is that your scheduled task to run poller.php, is using an account that doesn't have the proper permissions to gather info from remote machines (especially WMI stuff).
As for why snmp gathering fails with the script but works manually, I'm not sure. I assume, you ran them from the same machine?
As for why snmp gathering fails with the script but works manually, I'm not sure. I assume, you ran them from the same machine?
Who is online
Users browsing this forum: No registered users and 1 guest