Problem with ping, hostpartition and cpu-values[SOLVED]

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

Problem with ping, hostpartition and cpu-values[SOLVED]

Post by cpt_ahab »

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
Last edited by cpt_ahab on Mon Feb 07, 2005 3:32 am, edited 1 time in total.
User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

got it.. :D

Post by cpt_ahab »

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??
User avatar
cpt_ahab
Cacti User
Posts: 61
Joined: Tue Feb 01, 2005 11:34 am

Post by cpt_ahab »

Got the Problem with the query_host_partition.php -script

The script cant handle special characters in the community string. I had # and ! in it. Numbers and Letters work fine now.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests