Table of Contents
Cluster State
Fetch event data (optionally filtered by one or more event types)
Monitor Configuration
Fetch check state data including latest check status, ownership, last check timestamp;
Specification
Value
Resource Path
/cluster
API Version
BasePath for the API
{{.}}
Consumes
Produces
Resource Path
Operation
Description
/cluster
[GET](#Fetch Cluster Stats)
Fetches cluster state data (membership, current director, heartbeats)
Fetches cluster state data (membership, current director, heartbeats)
Field Name (alphabetical)
Field Type
Description
Field Name (alphabetical)
Field Type
Description
Director
encoding.json.RawMessage
Members
array
Field Name (alphabetical)
Field Type
Description
message
string
status
string
Specification
Value
Resource Path
/event
API Version
BasePath for the API
{{.}}
Consumes
application/json
Produces
Resource Path
Operation
Description
/event
[GET](#Fetch Events)
Fetch event data (optionally filtered by one or more event types)
Fetch event data (optionally filtered by one or more event types)
Param Name
Param Type
Data Type
Description
Required?
type
query
string
comma separated event types
Field Name (alphabetical)
Field Type
Description
memberid
string
message
string
timestamp
Time
type
string
Field Name (alphabetical)
Field Type
Description
message
string
status
string
Specification
Value
Resource Path
/monitor
API Version
BasePath for the API
{{.}}
Consumes
application/json
Produces
Resource Path
Operation
Description
/monitor
[POST](#Add Monitor Configuration)
Add/Update monitor config
/monitor/{check}
[GET](#Fetch Monitor Configuration)
Fetch all (or specific) monitor configuration(s) from etcd
/monitor/{check}
[GET](#Set Disabled State for Given Monitor)
Enable or disable a specific monitor configuration (changes are immediate)
/monitor/{check}
[DELETE](#Delete existing monitor configuration)
Delete monitor config
Add/Update monitor config
Param Name
Param Type
Data Type
Description
Required?
N/A
POST
object (map[string]MonitorConfig )
Collection of monitors to add
Yes
Example payload:
{
"exec-check1" : {
"type" : " exec" ,
"description" : " exec check test" ,
"timeout" : " 5s" ,
"command" : " echo" ,
"args" : [
" hello" ,
" world"
],
"interval" : " 10s" ,
"return-code" : 0 ,
"expect" : " world" ,
"warning-threshold" : 1 ,
"critical-threshold" : 3 ,
"warning-alerter" : [
" primary-slack"
],
"critical-alerter" : [
" primary-email"
],
"tags" : [
" dbservers" ,
" mysql"
]
}
}
API: /monitor/{check} (GET)
Fetch all (or specific) monitor configuration(s) from etcd
Param Name
Param Type
Data Type
Description
Required?
check
path
string
Specific check name
API: /monitor/{check} (GET)
Enable or disable a specific monitor configuration (changes are immediate)
Param Name
Param Type
Data Type
Description
Required?
check
path
string
Specific check name
Yes
disable
query
string
Disable/enable a check
API: /monitor/{check} (DELETE)
Delete existing monitor config
Param Name
Param Type
Data Type
Description
Required?
check
path
string
Specific check name
Yes
Field Name (alphabetical)
Field Type
Description
Field Name (alphabetical)
Field Type
Description
message
string
status
string
Specification
Value
Resource Path
/alerter
API Version
BasePath for the API
{{.}}
Consumes
application/json
Produces
Resource Path
Operation
Description
/alerter
[POST](#Add Alerter Configuration)
Add/Update alerter config
/alerter/{alerterName}
[GET](#Fetch Alerter Configuration)
Fetch all (or specific) alerter configuration(s) from etcd
/alerter/{alerterName}
[DELETE](#Delete existing alerter configuration)
Delete alerter config
Add/Update alerter config
Param Name
Param Type
Data Type
Description
Required?
N/A
POST
object (map[string]AlerterConfig )
Collection of alerters to add
Yes
Example payload:
{
"test-alerter" : {
"type" : " slack" ,
"description" : " foobar" ,
"options" : {
"channel" : " some-team" ,
"icon-url" : " https://pbs.twimg.com/profile_images/593893225045200896/r9uL4jWU.png" ,
"token" : " asdfasdfasdfasdfasdf" ,
"username" : " monit"
}
}
}
API: /alerter/{alerterName} (GET)
Fetch all (or specific) alerter configuration(s) from etcd
Param Name
Param Type
Data Type
Description
Required?
alerterName
path
string
Specific alerter name
API: /alerter/{alerterName} (DELETE)
Delete existing alerter config
Param Name
Param Type
Data Type
Description
Required?
alerterName
path
string
Specific check name
Yes
Field Name (alphabetical)
Field Type
Description
Specification
Value
Resource Path
/state
API Version
BasePath for the API
{{.}}
Consumes
application/json
Produces
Resource Path
Operation
Description
/state
[GET](#Fetch Check State Data)
Fetch check state data including latest check status, ownership, last check timestamp;
Fetch check state data including latest check status, ownership, last check timestamp;
Param Name
Param Type
Data Type
Description
Required?
tags
query
string
One or more tags (comma separated)
Field Name (alphabetical)
Field Type
Description
Field Name (alphabetical)
Field Type
Description
check
string
config
encoding.json.RawMessage
count
int
date
Time
message
string
owner
string
status
string
Field Name (alphabetical)
Field Type
Description
message
string
status
string