From c13ac2036ee63f11ffbcade9ea7c3fca082cb6c3 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Sun, 20 Sep 2015 19:08:02 -0700 Subject: [PATCH] website: agent self docs --- website/source/docs/http/agent-self.html.md | 165 ++++++++++++++++++++ website/source/layouts/http.erb | 29 +++- 2 files changed, 192 insertions(+), 2 deletions(-) create mode 100644 website/source/docs/http/agent-self.html.md diff --git a/website/source/docs/http/agent-self.html.md b/website/source/docs/http/agent-self.html.md new file mode 100644 index 000000000..db280b293 --- /dev/null +++ b/website/source/docs/http/agent-self.html.md @@ -0,0 +1,165 @@ +--- +layout: "http" +page_title: "HTTP API: /v1/agent/self" +sidebar_current: "docs-http-agent-self" +description: |- + The '/1/agent/self' endpoint is used to query the state of the agent. +--- + +# /v1/agent/self + +The `self` endpoint is used to query the state of the target agent. + +## GET + +
+
Description
+
+ Lists all the evaluations. +
+ +
Method
+
GET
+ +
URL
+
`/v1/evaluations`
+ +
Parameters
+
+ None +
+ +
Returns
+
+ + ```javascript + { + "config": { + "Region": "global", + "Datacenter": "dc1", + "NodeName": "", + "DataDir": "", + "LogLevel": "DEBUG", + "BindAddr": "127.0.0.1", + "EnableDebug": true, + "Ports": { + "HTTP": 4646, + "RPC": 4647, + "Serf": 4648 + }, + "Addresses": { + "HTTP": "", + "RPC": "", + "Serf": "" + }, + "AdvertiseAddrs": { + "RPC": "", + "Serf": "" + }, + "Client": { + "Enabled": true, + "StateDir": "", + "AllocDir": "", + "Servers": null, + "NodeID": "", + "NodeClass": "", + "Meta": null + }, + "Server": { + "Enabled": true, + "Bootstrap": false, + "BootstrapExpect": 0, + "DataDir": "", + "ProtocolVersion": 0, + "NumSchedulers": 0, + "EnabledSchedulers": null + }, + "Telemetry": null, + "LeaveOnInt": false, + "LeaveOnTerm": false, + "EnableSyslog": false, + "SyslogFacility": "", + "DisableUpdateCheck": false, + "DisableAnonymousSignature": true, + "Revision": "", + "Version": "0.1.0", + "VersionPrerelease": "dev", + "DevMode": true, + "Atlas": null + }, + "member": { + "Name": "Armons-MacBook-Air.local.global", + "Addr": "127.0.0.1", + "Port": 4648, + "Tags": { + "bootstrap": "1", + "build": "0.1.0dev", + "dc": "dc1", + "port": "4647", + "region": "global", + "role": "nomad", + "vsn": "1", + "vsn_max": "1", + "vsn_min": "1" + }, + "Status": "alive", + "ProtocolMin": 1, + "ProtocolMax": 3, + "ProtocolCur": 2, + "DelegateMin": 2, + "DelegateMax": 4, + "DelegateCur": 4 + }, + "stats": { + "client": { + "heartbeat_ttl": "19116443712", + "known_servers": "0", + "last_heartbeat": "8222075779", + "num_allocations": "0" + }, + "nomad": { + "bootstrap": "false", + "known_regions": "1", + "leader": "true", + "server": "true" + }, + "raft": { + "applied_index": "91", + "commit_index": "91", + "fsm_pending": "0", + "last_contact": "never", + "last_log_index": "91", + "last_log_term": "1", + "last_snapshot_index": "0", + "last_snapshot_term": "0", + "num_peers": "0", + "state": "Leader", + "term": "1" + }, + "runtime": { + "arch": "amd64", + "cpu_count": "4", + "goroutines": "58", + "kernel.name": "darwin", + "max_procs": "1", + "version": "go1.4.2" + }, + "serf": { + "encrypted": "false", + "event_queue": "0", + "event_time": "1", + "failed": "0", + "intent_queue": "0", + "left": "0", + "member_time": "1", + "members": "1", + "query_queue": "0", + "query_time": "1" + } + } + } + ``` + +
+
+ diff --git a/website/source/layouts/http.erb b/website/source/layouts/http.erb index 3e6da507e..ebe451935 100644 --- a/website/source/layouts/http.erb +++ b/website/source/layouts/http.erb @@ -64,11 +64,36 @@ + > + Status + + + > Agent