Skip to content

Commit

Permalink
Add cpu, gpu, mem, disk stats per app
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-deboer committed Nov 15, 2016
1 parent ef75b4b commit ab8b887
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,14 @@ func (e *Exporter) exportMetrics(ch chan<- prometheus.Metric) (err error) {
func (e *Exporter) scrapeApps(json *gabs.Container, ch chan<- prometheus.Metric) {
elements, _ := json.S("apps").Children()
states := map[string]string{
"running": "tasksRunning",
"staged": "tasksStaged",
"healthy": "tasksHealthy",
"unhealthy": "tasksUnhealthy",
"running": "tasksRunning",
"staged": "tasksStaged",
"healthy": "tasksHealthy",
"unhealthy": "tasksUnhealthy",
"cpus": "cpus",
"mem_in_mb": "mem",
"disk_in_mb": "disk",
"gpus": "gpus",
}

for _, app := range elements {
Expand Down

0 comments on commit ab8b887

Please sign in to comment.