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:
Łukasz Harasimowicz
2016-08-30 17:44:12 +02:00
committed by Cameron Sparr
parent e19845c202
commit 80391bfe1f
3 changed files with 36 additions and 44 deletions

View File

@@ -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)
}