Windows Ping.pl

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

Moderators: Developers, Moderators

Post Reply
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

Windows Ping.pl

Post by LA »

Its just toooo easy...

I have been fideling around for hours now. I would like to know the mechanism for transfering variables that com from a perl script to cacti..

I am using a perl script to ping a machine.. I get the following

12/08/2004 07:35:01 PM - CACTID: Poller[0] Host[33] SCRIPT: perl C:/cacti/scripts/winping.pl 192.168.0.254, output: U
12/08/2004 07:35:01 PM - CACTID: Poller[0] Host[33] WARNING: Result from SCRIPT not valid. Partial Result: U...
12/08/2004 07:35:01 PM - CACTID: Poller[0] Host[33] ERROR: Empty result [192.168.0.254]: 'perl C:/cacti/scripts/winping.pl 192.168.0.254'


when I run the scipt from the prompt it returns a value, I can make it return

max_response:2

I can make it return

2

no matter what I do the result is never attained. I have followed all the instructions I can find on many scripts that return variable for plotting but none work on my cacti install.

I am using Version 0.8.6b , winxp pro...

everything else works fine without errors..

Can someone explain to me the mechanism or what I could be doing wrong..

heres my poller cache

Data Source: pipeline - Traffic - 192.168.0.254/ie0
RRD: C:\cacti\rra\pipeline_traffic_in_164.rrd
Action: 0, OID: .1.3.6.1.2.1.2.2.1.10.4 (Host: 192.168.0.254, Community: public)
Data Source: pipeline - Traffic - 192.168.0.254/ie0
RRD: C:\cacti\rra\pipeline_traffic_in_164.rrd
Action: 0, OID: .1.3.6.1.2.1.2.2.1.16.4 (Host: 192.168.0.254, Community: public)
Data Source: pipeline - Ping Host
RRD: C:\cacti\rra\pipeline_max_response_170.rrd
Action: 1, Script: perl C:\cacti\scripts\winping.pl 192.168.0.254


the interface graphs are working fine..

Please help if you can...
LIfe is very hard without the proper tools.....I am but a Slave...
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

CMD.php works

Post by LA »

Forgot to mention, I am using cactid as the poller, when I use cmd.php then..

C:\Documents and Settings\MASTER>php c:\cacti\cmd.php
#!/usr/bin/php -q
12/08/2004 08:54:15 PM - CMDPHP: Poller[0] Host[33] SNMP: v1: 192.168.0.254, dsn
ame: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.4, output: 919311
12/08/2004 08:54:15 PM - CMDPHP: Poller[0] Host[33] SNMP: v1: 192.168.0.254, dsn
ame: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.4, output: 761166
12/08/2004 08:54:15 PM - CMDPHP: Poller[0] Host[33] CMD: perl C:\cacti\scripts\w
inping.pl 192.168.0.254, output: max_response:2 min_response:2
12/08/2004 08:54:15 PM - CMDPHP: Poller[0] Time: 0.4228 s, Theads: N/A, Hosts: 1


works like a charm, I really would like to keep using cactid because I have two production systems that are using it...anybody know a fix ???

Mr. Witness I know your a genius, help me out ???
LIfe is very hard without the proper tools.....I am but a Slave...
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Cactid on Windows platform is Cygwin based. Ensure that perl executable is in the path when running by cactid.

- Piotr
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

Cactid

Post by LA »

It is, I have the cygwin.dll in the catid directory, as I mentioned the cactid traffic interface polling isworking fine...
Might it be necessary to install the entire cygwin software ??

Thank you.

Its a problem with cactid and how it gets variable handover from perl scripts....
LIfe is very hard without the proper tools.....I am but a Slave...
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I recommend the base install ("default"). It includes "sh.exe" which is required for the use of the popen function.

Just one word of advice, I plan on integrating the ping function right into the base system in 0.8.7 as system DS's with graphing options available. I will track both RTT and packet loss in that version.

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?
boots
Cacti User
Posts: 55
Joined: Wed Jan 07, 2004 4:59 am
Location: Melbourne Australia

Post by boots »

How far away do you think 0.8.7 is?

Cheers

Boots
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

HI

Post by LA »

That would be great, I will just wait for the 087, version, cause I am afraid if I change the poller now I might mess things up.

By the way, the plan here is to have is to have at least 400 devices by the end of December with approximately 2 interfaces from each device, this will be a good test scenario for the poller, I am quite curious how this will turn out.....
LIfe is very hard without the proper tools.....I am but a Slave...
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

cygwin

Post by LA »

Hi witness,

OK I finally installed the base package for cygwin and now the Cactid poller is returning the results from my perl scripts....

Everythings OK for now...

Thanks a billion and keep up the good work...

:wink:
LIfe is very hard without the proper tools.....I am but a Slave...
LA
Posts: 31
Joined: Fri Nov 12, 2004 4:21 am
Location: sttutgart, germany

cygwin

Post by LA »

Hi witness,

OK I finally installed the base package for cygwin and now the Cactid poller is returning the results from my perl scripts....

Everythings OK for now...

Thanks a billion and keep up the good work...

:wink:
LIfe is very hard without the proper tools.....I am but a Slave...
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests