Add per-host shard metrics if configured#3819
Add per-host shard metrics if configured#3819danielnelson merged 4 commits intoinfluxdata:masterfrom
Conversation
Allows users to get per-host shard metrics from `shardConnPoolStats`. Since this adds additional measurement from the `mongodb` plugin, it is configured via the telegraf configuration file. Also adds unit test and documentation for the changeset.
|
Since it doesn't take another request to get this data, I don't think we need an option to control it. Users can remove it using the normal measurement filtering options. |
|
@danielnelson awesome, makes sense. Sorry for late reply, was on vacation, will fix and push an update by EOD. |
Gather's per-host shard metrics by default, allowing users to opt-out if needed/wanted.
|
AppVeyor seems to be failing from a non-related issue: |
|
Looks like a network issue, hopefully it will clear up soon and I'll try to run the build again periodically. |
|
Appveyor team helped me get the tests running again. |
|
@danielnelson, fixed merge conflicts, any target release to be able to include this? Thanks again! 🎉 |
danielnelson
left a comment
There was a problem hiding this comment.
Looks good, just a few questions I had around naming. Also can you update the README changes since I modified the README style a bit recently.
| db.Fields = make(map[string]interface{}) | ||
| } | ||
| for _, host := range d.ShardHostData { | ||
| d.Tags["shard_host_name"] = host.Name |
There was a problem hiding this comment.
Should this be just hostname to match existing tags in other measurements?
| for _, host := range d.ShardHostData { | ||
| d.Tags["shard_host_name"] = host.Name | ||
| acc.AddFields( | ||
| "mongodb_shard_host_stats", |
There was a problem hiding this comment.
Would this be better as mongodb_shard_stats since we have mongodb_db_stats?
36ef4f8 to
398e443
Compare
|
@danielnelson updated! thanks for taking a look! |
|
Merged for 1.7, thanks! |
|
Awesome, thanks! |
Allows users to get per-host shard metrics from
shardConnPoolStats.Since this adds additional measurement from the
mongodbplugin, it isconfigured via the telegraf configuration file.
Also adds unit test and documentation for the changeset.
Required for all PRs: