Kudos to willjohnson
This is a Dashing widget to checks whether a server is responding to either an http
or ping
request. It displays either a check or alert depending on the response.
-
Copy
server_status.coffee
,server_status.html
, andserver_status.scss
into the/widgets/server_status
directory of your Dashing app. -
Copy the
server_status.rb
file into your/jobs
folder. -
In the
server_status.rb
, update your server information
servers = [{name: 'server1', url: 'https://www.test.com', method: 'http'},
{name: 'server2', url: 'https://www.test2.com', method: 'http'},
{name: 'server3', url: '192.168.0.1', method: 'ping'}]
To include the widget in a dashboard, add the following snippet to the dashboard layout file:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="server_status" data-view="ServerStatus" data-title="Server Status"></div>
</li>