sihemo
is a SImple HEartbeat MOnitoring application. It provides a web
interface and a REST API.
The web interface exposes a read-only view for live monitoring.
GET /services
Example:
curl localhost:8000/services
GET /services/:group/:name
Example:
curl localhost:8000/services/galactica/shields
POST /services/:group/:name
Send a heartbeat for the specified service.
Parameters:
alive
, an integer indicating how long we assume the component to be alive. If it is not given, the default 30 is used.
Example:
curl -XPOST -d alive=30 localhost:8000/services/galactica/shields
POST /services/:group/:name
Notify sihemo
that the given service is down.
-
Parameters:
-
state
, must be set todown
.
Example:
curl -XPOST -d state=down localhost:8000/services/galactica/shields
DELETE /services/:group/:name
Safely shut down the specified service. This will cause the system not to panic when no further heartbeats arrive.
Example:
curl -XDELETE localhost:8000/services/galactica/shields
(to document)
A simple ruby client is available in ruby/sihemo.rb
. Usage example:
s = Sihemo.new('localhost', 8000)
s.heartbeat('galactica', 'shields', 5)
s.down('galactica', 'shields')
s.shutdown('galactica', 'shields')