Skip to content

Commit 6af64e5

Browse files
authored
Merge pull request #492 from jcvrabo/extend-process-stats-object
extend process stats object
2 parents 48e2735 + 829d170 commit 6af64e5

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

resource/process.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,19 @@ type ProcessStats struct {
4747
}
4848

4949
type ProcessStat struct {
50-
Type string `json:"type"` // Process type; a unique identifier for processes belonging to an app
51-
Index int `json:"index"` // The zero-based index of running instances
52-
State string `json:"state"` // The state of the instance; valid values are RUNNING, CRASHED, STARTING, DOWN
50+
Type string `json:"type"` // Process type; a unique identifier for processes belonging to an app
51+
Index int `json:"index"` // The zero-based index of running instances
52+
InstanceGuid string `json:"instance_guid"` // The unique identifier of the instance
53+
State string `json:"state"` // The state of the instance; valid values are RUNNING, CRASHED, STARTING, DOWN
54+
Routable bool `json:"routable"` // Whether the instance is routable (determined by the readiness check of the app). If app readiness checks and routability are unsupported by Diego, this will return as null.
5355
Usage Usage `json:"usage"`
5456
Host string `json:"host"`
57+
InstanceInternalIp string `json:"instance_internal_ip"` // The internal IP address of the instance
5558
InstancePorts []map[string]int `json:"instance_ports"`
5659
Uptime int `json:"uptime"`
5760
MemoryQuota int `json:"mem_quota"`
5861
DiskQuota int `json:"disk_quota"`
62+
LogRateLimit int `json:"log_rate_limit"` // The current maximum log rate allocated for the instance; the value -1 is unlimited, the value is null when the log_rate_limit is unavailable
5963
FileDescriptorQuota int `json:"fds_quota"`
6064

6165
// The current isolation segment that the instance is running on; the value is null when the

testutil/template/process_stats.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
{
44
"type": "web",
55
"index": 0,
6+
"instance_guid": "35abad02-f2b8-4247-53ba-9ce1",
67
"state": "RUNNING",
8+
"routable": true,
79
"usage": {
810
"time": "2016-03-23T23:17:30.476314154Z",
911
"cpu": 0.00038711029163348665,
@@ -13,6 +15,7 @@
1315
"log_rate": 0
1416
},
1517
"host": "10.244.16.10",
18+
"instance_internal_ip": "10.255.176.38",
1619
"instance_ports": [
1720
{
1821
"external": 64546,
@@ -24,6 +27,7 @@
2427
"uptime": 9042,
2528
"mem_quota": 268435456,
2629
"disk_quota": 1073741824,
30+
"log_rate_limit": 50000,
2731
"fds_quota": 16384,
2832
"isolation_segment": "example_iso_segment",
2933
"details": null

0 commit comments

Comments
 (0)