Skip to content
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

Merged
merged 7 commits into from
Aug 30, 2016

Conversation

tuier
Copy link
Contributor

@tuier tuier commented Aug 3, 2016

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

     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)
Copy link
Contributor

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)
Copy link
Contributor

@harnash harnash Aug 3, 2016

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)
Copy link
Contributor

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?

Copy link
Contributor

@harnash harnash Aug 19, 2016

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.

@harnash
Copy link
Contributor

harnash commented Aug 5, 2016

Alright! I have no more comments! LGTM

@harnash
Copy link
Contributor

harnash commented Aug 30, 2016

@sparrc can we get it merged to master soon?

@sparrc
Copy link
Contributor

sparrc commented Aug 30, 2016

yes, I should be able to merge this today

@sparrc sparrc merged commit 30cdc31 into influxdata:master Aug 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants