All values in "Stats" section of /agent/self output are encoded as strings
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
### Description of the Issue (and unexpected/desired result)
For example, this is what you get in Stats.consul subsection:
```
{
"bootstrap": "false",
"known_datacenters": "2",
"leader": "false",
"leader_addr": "10.37.3.181:8300",
"server": "true"
}
```
When it clearly should be this:
```
{
"bootstrap": false,
"known_datacenters": 2,
"leader": false,
"leader_addr": "10.37.3.181:8300",
"server": true
}
```
### Reproduction steps
An HTTP GET request to the /agent/self API endpoint
### `consul version` for both Client and Server
Client: N/A
Server: `Consul v1.0.6`
### `consul info` for both Client and Server
Client: N/A
Server:
```
agent:
check_monitors = 0
check_ttls = 0
checks = 0
services = 0
build:
prerelease =
revision = 9a494b5f
version = 1.0.6
consul:
bootstrap = false
known_datacenters = 2
leader = false
leader_addr = 10.37.3.181:8300
server = true
raft:
applied_index = 650855
commit_index = 650855
fsm_pending = 0
last_contact = 22.528594ms
last_log_index = 650855
last_log_term = 15
last_snapshot_index = 647204
last_snapshot_term = 15
latest_configuration = [{Suffrage:Voter ID:8e9baf45-e2e2-bea6-81f7-ecb3975048cc Address:10.37.3.180:8300} {Suffrage:Voter ID:241ab375-a605-3500-6663-af323d9eccda Address:10.37.3.181:8300} {Suffrage:Voter ID:a8d44039-7733-e59f-8b2c-700b67e67489 Address:10.37.3.182:8300}]
latest_configuration_index = 592862
num_peers = 2
protocol_version = 3
protocol_version_max = 3
protocol_version_min = 0
snapshot_version_max = 1
snapshot_version_min = 0
state = Follower
term = 15
runtime:
arch = amd64
cpu_count = 8
goroutines = 174
max_procs = 8
os = linux
version = go1.9.3
serf_lan:
coordinate_resets = 0
encrypted = false
event_queue = 0
event_time = 422
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 1265
members = 6
query_queue = 0
query_time = 1
serf_wan:
coordinate_resets = 0
encrypted = false
event_queue = 0
event_time = 1
failed = 0
health_score = 0
intent_queue = 0
left = 0
member_time = 60
members = 6
query_queue = 0
query_time = 1
```
### Operating system and Environment details
CentOS 7.4.1708
Contributor guide
Assessment
This issue has not been assessed yet.