Windows Ping Script!

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

a2line59
Posts: 45
Joined: Mon May 23, 2005 8:20 am
Location: France

Post by a2line59 »

and install 0.8.6f is not a problem ? if i use 0.8.6f, do i loose all graphs ?
what is the best solution to change cacti's version ?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Oops! I that's odd. I will have to review the ping.php code for divide by zero issues.
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?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The upgrade should be uneventful.
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?
jas0420
Cacti User
Posts: 91
Joined: Thu Jan 13, 2005 3:58 pm
Location: College Station, TX - USA

Post by jas0420 »

Well, but that was with me running the script in a funky way (just trying to match what was on the Input String since I didn't quite grasp why there were two instances of ss_tping in said string). I don't think it was actually pinging the host. Think that from the command line when I did it like that it was trying to ping something it thought should be called "ss_tping".

So I blame me for that, not your code. :)
jas0420
Cacti User
Posts: 91
Joined: Thu Jan 13, 2005 3:58 pm
Location: College Station, TX - USA

Post by jas0420 »

I started some new charts with a new Data Input Method, host template, etc. that point to your script so that I could run it in parallel with the tping one. I've only added 4 of the 22 hosts, but so far they have all been accurate this time around. Going to start adding in the rest.......

jas
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok,

Here is a modified ss_tping.php. I did in fact screw up for a host that was 100% down. This is what happens when you have a regular job and then do Cacti in your spare time :)

TheWitness

EDIT: I have made another small change and uploaded. The change makes percentage in units such as 5%, 10% instead of 0.05, 0.10 (percent only included in this post). In addition I have limited the results to 4 decimal places.

EDIT2: I have made another small change and uploaded. This last change allows you to specify the number or attempts to make. The timeout still remains with the hosts.

The new syntax is as follows: "php ss_tping hostname [ping_sweeps]". Of course, [ping_sweeps] is optional and if it were the script_server, your poller cache would look as follows:

<cacti_root>/scripts/ss_tping.php ss_tping hostname [ping_sweeps]

TheWitness
Attachments
ss_tping.zip
(683 Bytes) Downloaded 1310 times
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?
jas0420
Cacti User
Posts: 91
Joined: Thu Jan 13, 2005 3:58 pm
Location: College Station, TX - USA

Post by jas0420 »

That's really what I was testing when I was filling out the funky script w/bogus hostname... ;)

I wound up starting all of the charts again from scratch... Seems much happier now than this morning when I was tagging it onto the end of the existing charts for some reason...

How about that question above about TheWitness' wishlist?

Thanks for all of the time,
Jason
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I think that I am out of control :)

TheWitness

http://forums.cacti.net/viewtopic.php?p=37589#37589
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?
jas0420
Cacti User
Posts: 91
Joined: Thu Jan 13, 2005 3:58 pm
Location: College Station, TX - USA

Post by jas0420 »

Heh... well... the world does revolve around pings, ya know....

I'm afraid I spoke too soon on my success after rebuilding the graphs. Everything went belly up on me again, and it happend after all of them had been going for a while. I had 6 stop charting again, and similar impossible numbers across the WAN.

I can't explain the ones that stopped charting completely, but I'm wondering if somehow the threads are picking up on another thread's reply or something... Once the change happens, it is so consistent though... I'm pretty sure I was away from my desk being umm... a "Notworking" Engineer at the time (slightly before 16:00) the change happened...

Image
Image
Image

Jason
opiekelly
Posts: 1
Joined: Tue Nov 22, 2005 12:26 pm

times are incorrect in grap

Post by opiekelly »

I am running the following on win2000
cacti 0.8.6g
php 5.0.5
mysql 4.0.26
rrdtool 1.2.11

When the average ping times are less then 1 ms the graphs show 10 times the value. I have average times of 0.31ms which is what is returned from the ss_tping.php script(cacti.log). The graph is showing 310ms. I can run the scipt manually and get 0.31ms response times. Any suggestions.

Thanks
Brendan
Attachments
ping.JPG
ping.JPG (23.01 KiB) Viewed 20354 times
jolramospr
Posts: 32
Joined: Mon Aug 07, 2006 2:32 pm
Location: PR
Contact:

Post by jolramospr »

I have installed the smokepinglike script but i get the following message on the log:

08/08/2006 05:45:05 PM - CACTID: Poller[0] Host[7] ERROR: Empty result [192.168.28.253]: 'perl /var/www/html/scripts/ping-latency.pl 192.168.28.253'
08/08/2006 05:45:05 PM - CACTID: Poller[0] Host[7] DS[212] WARNING: Result from SCRIPT not valid. Partial Result: ...
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I suggest you use the advanced ping template: http://forums.cacti.net/viewtopic.php?t=10049

As for the error, when you manually run the script, does it return data?
pannes
Posts: 1
Joined: Wed Apr 30, 2008 3:10 am
Location: Sweden, Jönköping

Problem importing xml template

Post by pannes »

Hi
I've tried to import the xml template on my cactiserver running
windows 2003
cact 0.8.7b
IIS6
PHP4
MySQL 4

When I try to import it I end up with the following error:

Code: Select all

Warning: filesize() [function.filesize]: Stat failed for C:\WINDOWS\TEMP\phpC47A.tmp (errno=2 - No such file or directory) in c:\inetpub\wwwroot\cacti\templates_import.php on line 57

Warning: fread() [function.fread]: Length parameter must be greater than 0. in c:\inetpub\wwwroot\cacti\templates_import.php on line 57

Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\cacti\templates_import.php:57) in c:\inetpub\wwwroot\cacti\templates_import.php on line 75
I figured it was something with the permissions on the temp dir but I've added write,modify,read,list to the IIS user (IIS_WPG). Still no luck.

Would appreciate some input on this, pretty new to iis.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests