From 422d240afb55ff5ef98ed651971284815f7aa157 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Mon, 2 Nov 2015 17:23:40 -0700 Subject: [PATCH] Mongodb should output 2 plugins in test mode closes #336 --- CHANGELOG.md | 1 + agent.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dd135eee..4e10bd93d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ changed to just run docker commands in the Makefile. See `make docker-run` and ### Bugfixes - [#331](https://github.com/influxdb/telegraf/pull/331): Dont overwrite host tag in redis plugin. +- [#336](https://github.com/influxdb/telegraf/pull/336): Mongodb plugin should take 2 measurements. ## v0.2.0 [2015-10-27] diff --git a/agent.go b/agent.go index 7ee52d405..3c87f00aa 100644 --- a/agent.go +++ b/agent.go @@ -314,7 +314,7 @@ func (a *Agent) Test() error { // Special instructions for some plugins. cpu, for example, needs to be // run twice in order to return cpu usage percentages. switch plugin.name { - case "cpu": + case "cpu", "mongodb": time.Sleep(500 * time.Millisecond) fmt.Printf("* Plugin: %s, Collection 2\n", plugin.name) if err := plugin.plugin.Gather(acc); err != nil {