1
0
mirror of https://github.com/Luzifer/mondash.git synced 2024-09-19 17:02:58 +00:00
mondash/apiary.apib

100 lines
3.6 KiB
Plaintext
Raw Normal View History

2015-02-07 18:32:44 +00:00
FORMAT: 1A
2015-03-12 22:53:33 +00:00
HOST: https://mondash.org
2015-02-07 18:32:44 +00:00
# MonDash
MonDash is a service for everyone having to display monitoring results to people who have not
2015-02-07 18:32:44 +00:00
the time or knowledge to get familar with Nagios / Icinga or similar monitoring systems. Therefore
MonDash provides a simple API to submit monitoring results and a simple dashboard to view those
results.
For the API to work you will need the APIToken assigned to your dashboard. This token is displayed
on the dashboard itself as long as no metrics are available to display.
2015-03-12 22:53:33 +00:00
To start just create a [randomly named dashboard](https://mondash.org/create) or start with a
named dashboard by simply visiting https://mondash.org/mydashboardname (if you plan to use the
2015-02-07 18:32:44 +00:00
named version please pay attention this will be easily guessable and you data is lesser protected
than with the random naming.
## Dashboard [/{dashid}]
This API controls your dashboard itself
+ Parameters
+ dashid (required, string, `098f6bcd4621d373cade`) ... The id of your dashboard to be found in the URL
### Delete your dashboard [DELETE]
This request will delete all your monitoring results available on your dashboard and release the
dashboard URL to the public.
_Please pay attention your dashboard URL will be available for others to register immediately
as we are not storing any data beyond this DELETE request._
+ Request
+ Header
2015-02-07 18:32:44 +00:00
Authorization: MyAPIToken
2015-02-07 18:32:44 +00:00
+ Response 200 (text/plain)
OK
2015-02-07 18:32:44 +00:00
## Metric [/{dashid}/{metricid}]
This API controls the metrics on your dashboard
+ Parameters
+ dashid (required, string, `098f6bcd4621d373cade`) ... The id of your dashboard to be found in the URL
+ metricid (required, string, `beer_available`) ... The unique name for your metric
### Submit a monitoring result [PUT]
+ Request (application/json)
+ Header
2015-02-07 18:32:44 +00:00
Authorization: MyAPIToken
2015-02-07 18:32:44 +00:00
+ Body
2015-02-07 18:32:44 +00:00
{
"title": "Amount of beer in the fridge",
"description": "Currently there are 12 bottles of beer in the fridge",
"status": "OK",
"expires": 604800,
"freshness": 3600,
"value": 12.0
2015-02-07 18:32:44 +00:00
}
2015-02-07 18:32:44 +00:00
+ Attributes (object)
+ title (required, string) - The title of the metric to display on the dashboard
+ description (required, string) - A descriptive text for the current state of the metric
+ detail_url (optional, string) - An URL with further information of the status
2016-03-27 16:49:53 +00:00
+ status (required, enum[string]) - One of: OK, Warning, Critical, Unknown
2015-02-07 18:32:44 +00:00
+ expires: 604800 (optional, number) - Time in seconds when to remove the metric if there is no update (Valid: `0 < x < 604800`)
+ freshness: 3600 (optional, number) - Time in seconds when to switch to stale state of there is no update (Valid: `0 < x < 604800`)
+ ignore_mad: false (optional, boolean) - If set to true the status passed in the update will be used instead of the median absolute deviation
2016-03-27 19:13:36 +00:00
+ hide_mad: false (optional, boolean) - If set to true the median absolute deviation is hidden on the dashboard for this metric
+ hide_value: false (optional, boolean) - If set to true the current value will not be shown on the dashboard (useful for checks not having values)
+ staleness_status: Unknown (optional, string) - If set this status will be set when the metric gets stale (no updates within freshness time range
2015-02-07 18:32:44 +00:00
+ Response 200 (text/plain)
+ Body
OK
### Delete a metric from your dashboard [DELETE]
+ Request
+ Header
2015-02-07 18:32:44 +00:00
Authorization: MyAPIToken
+ Response 200 (text/plain)
+ Body
2015-02-07 18:40:52 +00:00
OK