It is currently April 24th, 2024, 4:18 pm

Substitute with Ping Plugin ?

Get help with creating, editing & fixing problems with skins
User avatar
krakoukas
Posts: 71
Joined: December 11th, 2018, 5:56 pm
Location: France

Substitute with Ping Plugin ?

Post by krakoukas »

Hi Friends,

I'm using Ping Plugin for monitoring few machines and sites :

Measures return the ping in ms (ie 14 for Google)
And I add "ms" in the Meter with Text=%1 ms

But when a computer is offline, Measure return 30000 and Meter shows 30000 ms
How can I show only TIMEOUT when Ping Measure returns 30000 ?

Thanks for your help
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Substitute with Ping Plugin ?

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
Dest1=www.google.com
Dest1Label=Google.com
GoodColor=255,255,255,255
BadColor=255,0,0,255

[MeasurePing]
Measure=Plugin
Plugin=PingPlugin
DestAddress=#Dest1#
TimeOut=2000
TimeOutValue=-1
UpdateRate=10
IfCondition=MeasurePing = -1
IfTrueAction=[!SetOption MeterPing Text "#Dest1Label#: TIMEOUT"][!SetOption MeterPing FontColor "#BadColor#"][!UpdateMeter MeterPing][!Redraw]
IfFalseAction=[!SetOption MeterPing Text "#Dest1Label#: %1ms"][!SetOption MeterPing FontColor "#GoodColor#"][!UpdateMeter MeterPing][!Redraw]

[MeterPing]
Meter=String
MeasureName=MeasurePing
Padding=5,5,5,5
SolidColor=25,35,45,255
Just be sure your TimeOut value is less than your UpdateRate X Update value. You don't want the plugin getting stacked up. The default 30 seconds is not useful in my opinion. No way any ping is going to be successful after more than a couple of seconds at most.
User avatar
krakoukas
Posts: 71
Joined: December 11th, 2018, 5:56 pm
Location: France

Re: Substitute with Ping Plugin ?

Post by krakoukas »

Works great, thank you !