-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some improvment in mesos input plugin, #1572
Conversation
Removing uneeded statistics prefix for task's metric, Adding framework id tags into each task's metric, Adding state (leader/follower) tags to master's metric, Make sure the slave's metrics are tags with slave
@@ -116,7 +116,7 @@ func (m *Mesos) Gather(acc telegraf.Accumulator) error { | |||
for _, v := range m.Slaves { | |||
wg.Add(1) | |||
go func(c string) { | |||
errorChannel <- m.gatherMainMetrics(c, ":5051", MASTER, acc) | |||
errorChannel <- m.gatherMainMetrics(c, ":5051", SLAVE, acc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! 👍
tags["state"] = "follower" | ||
} | ||
} | ||
|
||
acc.AddFields("mesos", jf.Fields, tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just noticed that slave metrics have timestamp which we can use to pass as fourth parameter to AddFields
. It's an extra - you can ignore it if you want. I will try to add this later if you won't.
|
||
acc.AddFields("mesos-tasks", jf.Fields, tags) | ||
acc.AddFields("mesos-tasks", jf.Fields, tags, timestamp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should have caught this earlier, but this should be mesos_tasks
, not mesos-tasks
, could we change that? how long has it been like this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sparrc this one is from my PR I believe.
Alright! I have no more comments! LGTM |
@sparrc can we get it merged to master soon? |
yes, I should be able to merge this today |
Removing unneeded statistics prefix for task's metric,
Adding framework id tags into each task's metric,
Adding state (leader/follower) tags to master's metric,
Make sure the slave's metrics are tags with slave