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

InfluxDB Writes 0 metrics #884

Closed
s1m0 opened this issue Mar 18, 2016 · 1 comment · Fixed by #893
Closed

InfluxDB Writes 0 metrics #884

s1m0 opened this issue Mar 18, 2016 · 1 comment · Fixed by #893
Labels
bug unexpected problem or unintended behavior

Comments

@s1m0
Copy link

s1m0 commented Mar 18, 2016

I have several [[inputs.exec]] sections that telegraf runs every 5s to 5m. When an exec isn't run, telegraf still writes an empty http POST to InfluxDB. See example logging output below; there are 8 [[outputs.influxdb]] sections writing to 4 different databases on 2 separate installations (a single test server, migrating to a 3-way production cluster). Every 5 seconds 28 or 29 metrics are written to the 2 InfluxDB test and production databases but the others don't run so 0 metrics are available to be written, yet the empty message is still sent.

2016/03/17 16:25:25 Gathered metrics, (separate 5s interval), from exec in 74.880001ms
2016/03/17 16:25:25 Wrote 0 metrics to output influxdb in 474.396µs
2016/03/17 16:25:25 Wrote 0 metrics to output influxdb in 634.736µs
2016/03/17 16:25:25 Wrote 0 metrics to output influxdb in 898.01µs
2016/03/17 16:25:25 Wrote 0 metrics to output influxdb in 1.008772ms
2016/03/17 16:25:25 Wrote 0 metrics to output influxdb in 1.491286ms
2016/03/17 16:25:25 Wrote 0 metrics to output influxdb in 1.332947ms
2016/03/17 16:25:25 Wrote 28 metrics to output influxdb in 3.004514ms
2016/03/17 16:25:25 Wrote 28 metrics to output influxdb in 2.784524ms
2016/03/17 16:25:30 Gathered metrics, (separate 30s interval), from exec in 156.797282ms
2016/03/17 16:25:30 Gathered metrics, (separate 5s interval), from exec in 176.83572ms
2016/03/17 16:25:30 Wrote 29 metrics to output influxdb in 5.687058ms
2016/03/17 16:25:30 Wrote 0 metrics to output influxdb in 2.706675ms
2016/03/17 16:25:30 Wrote 28 metrics to output influxdb in 6.591603ms
2016/03/17 16:25:30 Wrote 0 metrics to output influxdb in 3.17213ms
2016/03/17 16:25:30 Gathered metrics, (separate 30s interval), from exec in 213.787362ms
2016/03/17 16:25:30 Wrote 0 metrics to output influxdb in 6.457787ms
2016/03/17 16:25:30 Wrote 0 metrics to output influxdb in 7.900459ms
2016/03/17 16:25:30 Wrote 29 metrics to output influxdb in 8.945402ms
2016/03/17 16:25:30 Wrote 28 metrics to output influxdb in 5.779109ms
2016/03/17 16:25:30 Gathered metrics, (separate 5m0s interval), from exec in 522.519729ms
2016/03/17 16:25:31 Gathered metrics, (separate 1m0s interval), from exec in 1.300327534s
2016/03/17 16:25:35 Gathered metrics, (separate 5s interval), from exec in 78.649291ms
2016/03/17 16:25:35 Wrote 1 metrics to output influxdb in 4.443708ms
2016/03/17 16:25:35 Wrote 5 metrics to output influxdb in 3.774689ms
2016/03/17 16:25:35 Wrote 28 metrics to output influxdb in 5.265983ms
2016/03/17 16:25:35 Wrote 12 metrics to output influxdb in 4.738119ms
2016/03/17 16:25:35 Wrote 5 metrics to output influxdb in 137.146364ms
2016/03/17 16:25:35 Wrote 12 metrics to output influxdb in 137.678064ms
2016/03/17 16:25:35 Wrote 1 metrics to output influxdb in 138.070356ms
2016/03/17 16:25:35 Wrote 28 metrics to output influxdb in 138.275571ms

This is a sample of the InfluxDB logging showing the empty messages being logged (I tagged each influxdb output section with a different user_agent string so I could track the messages. In this case OSS-FC & OSS-O:

[httpd] 2016/03/18 00:01:15 write body received by handler:
[httpd] 2016/03/18 00:01:15 write body received by handler:
[http] 2016/03/18 00:01:15 127.0.0.1 - - [18/Mar/2016:00:01:15 +0000] POST /write?consistency=&db=FlexCache&precision=s&rp=default HTTP/1.1 204 0 - OSS-FC 88649365-ec9c-11e5-aee6-000000000000 130.237µs
[http] 2016/03/18 00:01:15 127.0.0.1 - - [18/Mar/2016:00:01:15 +0000] POST /write?consistency=&db=Origin&precision=s&rp=default HTTP/1.1 204 0 - OSS-O 88649707-ec9c-11e5-aee7-000000000000 72.56µs

By the way, what is the "consistency=" option?

@sparrc sparrc added the bug unexpected problem or unintended behavior label Mar 18, 2016
@sparrc
Copy link
Contributor

sparrc commented Mar 18, 2016

agreed, we should skip when there are 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants