@@ -4,57 +4,61 @@ import (
44 "encoding/json"
55 "flag"
66 "fmt"
7- "github.com/antonlindstrom/mesos_stats"
8- "github.com/golang/glog"
9- "github.com/prometheus/client_golang/prometheus"
107 "io/ioutil"
118 "net/http"
129 "os"
1310 "time"
11+
12+ "github.com/antonlindstrom/mesos_stats"
13+ "github.com/golang/glog"
14+ "github.com/prometheus/client_golang/prometheus"
1415)
1516
1617var (
1718 configFile = flag .String ("config.file" , "" , "Path to config file." )
1819 metricsPath = flag .String ("web.telemetry-path" , "/metrics" , "Path under which to expose metrics." )
20+ )
21+
22+ var (
1923 cpuLimitVal = prometheus .NewGaugeVec (
2024 prometheus.GaugeOpts {
2125 Namespace : "mesos_task" ,
22- Name : "cpus_limit " ,
23- Help : "CPU share limit." ,
26+ Name : "cpu_limit " ,
27+ Help : "Fractional CPU limit." ,
2428 },
25- []string {"service " , "mesos_slave" , "framework_id" },
29+ []string {"task " , "mesos_slave" , "framework_id" },
2630 )
2731 cpuSysVal = prometheus .NewGaugeVec (
2832 prometheus.GaugeOpts {
2933 Namespace : "mesos_task" ,
30- Name : "cpus_system_time_secs " ,
31- Help : "CPU system time for task ." ,
34+ Name : "cpu_system_seconds_total " ,
35+ Help : "Cumulative system CPU time in seconds ." ,
3236 },
33- []string {"service " , "mesos_slave" , "framework_id" },
37+ []string {"task " , "mesos_slave" , "framework_id" },
3438 )
3539 cpuUsrVal = prometheus .NewGaugeVec (
3640 prometheus.GaugeOpts {
3741 Namespace : "mesos_task" ,
38- Name : "cpus_user_time_secs " ,
39- Help : "CPU system time for task ." ,
42+ Name : "cpu_user_seconds_total " ,
43+ Help : "Cumulative user CPU time in seconds ." ,
4044 },
41- []string {"service " , "mesos_slave" , "framework_id" },
45+ []string {"task " , "mesos_slave" , "framework_id" },
4246 )
4347 memLimitVal = prometheus .NewGaugeVec (
4448 prometheus.GaugeOpts {
4549 Namespace : "mesos_task" ,
46- Name : "mem_limit_bytes " ,
50+ Name : "memory_limit_bytes " ,
4751 Help : "Task memory limit in bytes." ,
4852 },
49- []string {"service " , "mesos_slave" , "framework_id" },
53+ []string {"task " , "mesos_slave" , "framework_id" },
5054 )
5155 memRssVal = prometheus .NewGaugeVec (
5256 prometheus.GaugeOpts {
5357 Namespace : "mesos_task" ,
54- Name : "mem_rss_bytes " ,
58+ Name : "memory_rss_bytes " ,
5559 Help : "Task memory RSS usage in bytes." ,
5660 },
57- []string {"service " , "mesos_slave" , "framework_id" },
61+ []string {"task " , "mesos_slave" , "framework_id" },
5862 )
5963)
6064
0 commit comments