Fixed tags on mesos_task metrics.
Tagging values by executor_id can create quite a lot data series in InfluxDB so we should stick to framework_id and server.
This commit is contained in:
committed by
Cameron Sparr
parent
e19845c202
commit
80391bfe1f
@@ -459,7 +459,6 @@ func (m *Mesos) gatherSlaveTaskMetrics(address string, defaultPort string, acc t
|
||||
}
|
||||
|
||||
for _, task := range metrics {
|
||||
tags["task_id"] = task.ExecutorID
|
||||
tags["framework_id"] = task.FrameworkID
|
||||
|
||||
jf := jsonparser.JSONFlattener{}
|
||||
@@ -468,7 +467,9 @@ func (m *Mesos) gatherSlaveTaskMetrics(address string, defaultPort string, acc t
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
timestamp := time.Unix(int64(jf.Fields["timestamp"].(float64)), 0)
|
||||
jf.Fields["executor_id"] = task.ExecutorID
|
||||
|
||||
acc.AddFields("mesos_tasks", jf.Fields, tags, timestamp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user