Simple Dashing job to send sensu client history checks to dashing widgets.
##Dependencies
##Usage
Put the sensu.rb
file in your /jobs
folder.
Add a snippet, like the one below, to the dashboard layout file for each client/check combination. Customize it to work for the particular client and check:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="sensuclientname-sensucheckname" data-view="Text" data-title="sensu check" data-text="Waiting For Data"></div>
</li>
##Settings
Checks are fetched every 3 minutes, but you can change that by editing the job schedule.
Change the SENSU_API_ENDPOINT
if dashing is not running on the same host as the sensu api server.
sensu.rb fix
line 22
send_event(id, text: message)
should be:
line 22
send_event(id, { text: message })
dashing send_event expects json and had to do that to get your script to work.