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

Improvings for buffer logging #967

Closed
abra7134 opened this issue Apr 5, 2016 · 1 comment
Closed

Improvings for buffer logging #967

abra7134 opened this issue Apr 5, 2016 · 1 comment

Comments

@abra7134
Copy link

abra7134 commented Apr 5, 2016

Hello!
Here standard output of the collector of metrics:

Starting Telegraf (version 0.12.0)
Loaded outputs: influxdb file
Loaded inputs: processes swap system cpu disk diskio mem
Tags enabled: host=localhost
Agent Config: Interval:10s, Debug:false, Quiet:false, Hostname:"ssl1.www.gootax.pro", Flush Interval:10s
Gathered metrics, (10s interval), from 7 inputs in 11.283118ms
Wrote 10 metrics to output file in 13.644µs
Gathered metrics, (10s interval), from 7 inputs in 11.283118ms
Database creation failed: Get http://localhost:8086/query?db=&q=CREATE+DATABASE+IF+NOT+EXISTS+%22telegraf%22: dial tcp [::1]:8096: getsockopt: connection refused
Error writing to output [influxdb]: Could not write to any InfluxDB server in cluster
ERROR writing full metric buffer to output influxdb, Could not write to any InfluxDB server in cluster
Wrote 10 metrics to output influxdb in 139.644µs

I suggest to add the following information (it is highlighted in bold):

Agent Config: Interval:10s, Buffer:1000metrics, Debug:false, Quiet:false, Hostname:"ssl1.www.gootax.pro", Flush Interval:10s
Gathered 10 metrics to buffers (total - influxdb:10, file:10 / remained - influxdb:990, file:990), (10s interval), from 7 inputs in 11.283118ms
Gathered 10 metrics to buffers (total - influxdb:20, file:10 / remained - influxdb:980, file:990), (10s interval), from 7 inputs in 11.283118ms
ERROR writing full metric buffer (1000 metrics) to output [influxdb], Could not write to any InfluxDB server in cluster. All metrics have been DESTROYED.
Wrote 10 metrics from buffer to output [influxdb] in 139.644µs

My offer is directed better to understand what happens to the buffer during inaccessibility of the server of metrics to estimate time before his overflow.
In addition I suggest to enter counters for statistics (from last start) and to periodically place them in output:

Statistics: Total gathered:10345 metrics, Buffers overflows:0 times, Max buffers usage:768 of 1000 metrics, Total lost:1345 metrics.

sparrc added a commit that referenced this issue Apr 26, 2016
@sparrc
Copy link
Contributor

sparrc commented Apr 26, 2016

@abra7134 I'm currently working on a PR to refactor buffer handling that will include this #1096

sparrc added a commit that referenced this issue Apr 26, 2016
sparrc added a commit that referenced this issue Apr 26, 2016
sparrc added a commit that referenced this issue Apr 26, 2016
sparrc added a commit that referenced this issue Apr 26, 2016
sparrc added a commit that referenced this issue Apr 26, 2016
sparrc added a commit that referenced this issue Apr 26, 2016
sparrc added a commit that referenced this issue Apr 26, 2016
@sparrc sparrc closed this as completed in 4de75ce Apr 27, 2016
This issue was closed.
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

No branches or pull requests

2 participants