It is currently November 26th, 2022, 7:08 pm

Monitor a remote server status

Skins that control functions in Windows or Rainmeter
User avatar
jsmorley
Developer
Posts: 22551
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Monitor a remote server status

Post by jsmorley »

A little skin to monitor the "up" status of a remote server with the Ping plugin.
PingSite_1.0.rmskin
1.png
1.png

Code: Select all

[Rainmeter]
Update=50
DynamicWindowSize=1
AccurateText=1
LeftMouseUpAction=[!Refresh]

[Metadata]
Name=PingSite
Author=JSMorley
Information=Monitor the status of a remote server.||Edit [Variables] for host and other options.|Set PlaySound="" for silent operation.
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=Jan 17, 2015

[Variables]
HostToPing=rainmeter.net
HostLabel=23.94.7.14
HowOften=30
PlaySound=#@#Sounds\Ping.wav
;PlaySound=""

[MeasurePing]
Measure=Plugin
Plugin=PingPlugin
DestAddress=#HostToPing#
Timeout=2000
TimeoutValue=-1
UpdateRate=(#HowOften#*20)
FinishAction=[Play "#PlaySound#"][!UnpauseMeasure MeasureTimer][!SetOption MeterTimer LineColor "255,255,255,255"][!ShowMeter MeterPing]
IfCondition=MeasurePing = -1
IfTrueAction=[!SetOption MeterPingBack LineColor "207,78,78,255"][!SetVariable Status "#CRLF#No response"][!UpdateMeter *][!Redraw]
IfCondition2=MeasurePing = 0
IfTrueAction2=[!SetOption MeterPingBack LineColor "175,247,151,255"][!UpdateMeter *][!Redraw]
IfCondition3=MeasurePing > 0
IfTrueAction3=[!SetOption MeterPingBack LineColor "175,247,151,255"][!SetVariable Status "#CRLF#[*MeasurePing*]ms response"][!UpdateMeter *][!Redraw]
Substitute="-1":"X"

[MeasureTimer]
Measure=Calc
Formula=(MeasureTimer % (#HowOften#*20)) + 1
IfCondition=MeasureTimer = (#HowOften#*20)
IfTrueAction=[!SetOption MeterTimer LineColor "255,0,0,255"]
Paused=1
MinValue=1
MaxValue=(#HowOften#*20)

[MeterPingBack]
Meter=Roundline
W=80
H=80
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineLength=25
LineColor=175,247,151,255
Solid=1
AntiAlias=1
ToolTipIcon=#@#Images\Server.ico
ToolTipTitle=#HostToPing#
ToolTipText=#HostLabel##Status#
DynamicVariables=1

[MeterPing]
Meter=String
MeasureName=MeasurePing
W=80
H=16
X=40
Y=40
FontSize=13
FontColor=47,47,47,255
StringAlign=CenterCenter
StringStyle=Bold
AntiAlias=1
Text=%1
Hidden=1

[MeterTimerBack]
Meter=Roundline
W=80
H=80
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=30
LineLength=33
LineColor=173,220,247,255
Solid=1
AntiAlias=1

[MeterTimer]
Meter=Roundline
MeasureName=MeasureTimer
W=80
H=80
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=25
LineLength=33
LineColor=207,78,78,255
LineWidth=3
AntiAlias=1
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22551
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Monitor a remote server status

Post by jsmorley »

Changed to a smoothly moving timer pointer.