Commit Graph

58 Commits

Author SHA1 Message Date
Daniel Nelson 99a390b8e6
Fix open error handling in file output (#5540) 2019-03-22 13:59:30 -07:00
Adrián López 33ee309fd1 Fix deadlock when Telegraf is aligning aggregators (#5612) 2019-03-20 10:36:51 -07:00
Daniel Nelson 7497a2027b
Deliver empty metric tracking group immediately (#5176) 2018-12-26 19:36:10 -08:00
Daniel Nelson c12eecc90e
Signal telegraf process until it exits (#5169) 2018-12-26 18:54:50 -08:00
Daniel Nelson cf2b85f383
Add running field to procstat_lookup (#5069) 2018-12-11 19:11:33 -08:00
Greg 91ecec71ea Only print final collection when runing --test (#4991) 2018-11-15 15:44:36 -08:00
Daniel Nelson 6e5c2f8bb6
Remove outputs blocking inputs when output is slow (#4938) 2018-11-05 13:34:28 -08:00
Daniel Nelson 7553c8fd13
Remove metric recreation when filtering (#4767) 2018-09-28 14:48:20 -07:00
Daniel Nelson 9e77bfc3ed
Fix potential deadlock by not calling AddMetric concurrently (#4404) 2018-07-11 17:33:27 -07:00
Daniel Nelson 9491cd91cd
Fix data race with default tags (#4395) 2018-07-07 00:54:21 -07:00
Piotr Popieluch dfe7b5eec2 Don't skip metrics during startup in aggregate phase (#4230) 2018-06-05 16:30:53 -07:00
Daniel Nelson caf860bc88
Don't print name of plugin or interval size during --test 2018-04-04 16:30:22 -07:00
Daniel Nelson 1c0f63a90d
Add new line protocol parser and serializer, influxdb output (#3924) 2018-03-27 17:30:51 -07:00
Daniel Nelson efb9d5b4cb
Return Accumulator interface from NewAccumulator 2018-01-26 11:40:34 -08:00
Daniel Nelson 5270aa451c
Avoid loop creation in second processor pass (#3656) 2018-01-22 11:16:07 -08:00
Piotr Popieluch 601dc99606 Align aggregator period with internal ticker to avoid skipping metrics (#3693)
By the time the aggregator.run() was called about 600ms already passed since setting now which was skewing up the aggregation intervals and skipping metrics.
2018-01-18 17:37:53 -08:00
Maximilien Richer 5f215c22fe Fix typos in comments (#3415) 2017-10-31 17:00:06 -07:00
Jeremy Doupe a6797a44d5 Add history and summary types to telegraf and prometheus plugins (#3337) 2017-10-24 16:28:52 -07:00
Daniel Nelson 573bd4aa32 Start first aggregator period at startup time (#3050)
Fixes issue where metrics collected immediately after startup would not
be aggregated.
2017-07-24 18:25:05 -07:00
Daniel Nelson b165ce4cd5 Prevent possible deadlock when using aggregators (#3016)
Looping the metrics back through the same channel could result in a
deadlock, by using a new channel and locking the processor we can ensure
that all stages can make continual progress.
2017-07-13 15:34:21 -07:00
Cameron Sparr 54c9a385d5
Fix prometheus_client reload behavior
fixes #2282
2017-02-16 21:57:13 +00:00
Cameron Sparr 22243a8354
Skip service input plugins in test mode 2017-02-13 10:40:38 +00:00
Cameron Sparr ff9369f1a1
prepend 'inputs.' to --test output check 2017-02-13 10:33:51 +00:00
Cosmo Petrich b1945c0493
Increment gather_errors for all input errors
closes #2339
2017-02-03 11:22:31 +00:00
Cameron Sparr 6df3f0fdae
Run scheduled flushes in background
doing this unblocks incoming metrics while waiting for a flush to take
place.

we have to create a semaphore so that we can
'skip' flushes that try to run while a flush is already running.

closes #2262
2017-01-23 14:41:40 -08:00
Cameron Sparr d71a42cd1b Implement telegraf collecting stats on itself
closes #1348
2016-12-05 18:56:54 +00:00
Cameron Sparr e5c7a71d8e Fix unit tests for new metric implementation 2016-12-01 18:17:02 +00:00
Cameron Sparr db7a4b24b6 Implement telegraf's own full metric type
main reasons behind this:
- make adding/removing tags cheap
- make adding/removing fields cheap
- make parsing cheaper
- make parse -> decorate -> write out bytes metric flow much faster

Refactor serializer to use byte buffer
2016-12-01 18:17:02 +00:00
Cameron Sparr 2b0cd2037b Add Copy() function to Metric interface 2016-11-23 12:30:31 +00:00
Cameron Sparr a84ce5d5cb drop metrics outside of the aggregators period 2016-10-12 14:56:03 +01:00
Cameron Sparr 03b2984ac2 Fixup some code based on feedback from @dgnorton 2016-10-12 14:50:19 +01:00
Cameron Sparr 2175a72fcc Rebase fixup 2016-10-12 14:50:19 +01:00
Cameron Sparr fead80844e Refactor handling of MinMax functionality into RunningAggregator
allows for easier addition of a sliding window at a later time.

Also makes `period` be a generic argument for all aggregator plugins.
2016-10-12 14:50:19 +01:00
Cameron Sparr 64a71263a1 Support Processor & Aggregator Plugins
closes #1726
2016-10-12 14:50:19 +01:00
Cameron Sparr c7834209d2 Major Logging Overhaul
in this commit:

- centralize logging output handler.
- set global Info/Debug/Error log levels based on config file or flags.
- remove per-plugin debug arg handling.
- add a I!, D!, or E! to every log message.
- add configuration option to specify where to send logs.

closes #1786
2016-10-03 17:13:03 +01:00
Cameron Sparr 50ef3282b6 Refactor and code cleanup of filtering
started working on this with the idea of fixing #1623, although I
realized that this was actually just a documentation issue around
a toml eccentricity.

closes #1623
2016-09-05 16:30:18 +01:00
Cameron Sparr b18d375d6c Implement AddGauge & AddCounter functions
and utilize them in the in the 'system' input plugins.
2016-09-02 16:51:26 +01:00
Cameron Sparr 6dbbe65897 Remove Add() function from accumulator 2016-09-02 16:35:27 +01:00
Cameron Sparr d3bb1e7010 Rename internal_models package to models 2016-08-08 14:41:40 +01:00
Patrick Hemmer e68f251df7 add AddError method to accumulator (#1536) 2016-07-25 13:09:49 +01:00
Patrick Hemmer 1be6ea5696 remove unused accumulator.prefix (#1535) 2016-07-22 09:22:52 +01:00
Cameron Sparr bfdd665435 Copy metrics for each configured output
This is for better thread-safety when running with multiple outputs,
which can cause very odd panics at very high loads

primarily this is to address #1432

closes #1432
2016-07-14 09:16:29 -06:00
Cameron Sparr d7efb7a71d Add precision rounding to accumulator
Adding precision rounding to the accumulator. This means that now every
input metric will get rounded at collection, rather than at write (and
only for the influxdb output).

This feature is disabled for service inputs, because service inputs
should be in control of their own timestamps & precisions.
2016-06-14 00:36:39 +01:00
Cameron Sparr 892abec025 Refactor collection_jitter and flush_jitter
use a common function between collection_jitter and flush_jitter. which
creates the same behavior between the two options.

going forward, both jitters will be random sleeps that get re-evaluated
at runtime for every interval (previously only collection_jitter did
this)

also fixes behavior so that both jitters will exit in the event of a
process exit.

closes #1296
2016-05-31 14:24:32 +01:00
Cameron Sparr c44ecf54a5 Utilize timeout in net_response plugin.
Also changing the net_response and http_response plugins to only accept
duration strings for their timeout parameters. This is a breaking config
file change.

closes #1214
2016-05-23 15:59:23 +01:00
Cameron Sparr 4f5d5926d9 Set a timeout for calls to input.Gather
Changing the internal behavior around running plugins. Each plugin
will now have it's own goroutine with it's own ticker. This means that a
hung plugin will not block any other plugins. When a plugin is hung, we
will log an error message every interval, letting users know which
plugin is hung.

Currently the input interface does not have any methods for killing a
running Gather call, so there is nothing we can do but log an "ERROR"
and move on. This will give some visibility into the plugin that is
acting up.

closes #1230
fixes #479
2016-05-21 21:39:01 +01:00
Cameron Sparr 2e68bd1412 don't overwrite host tags in plugins
closes #1227
closes #1210
2016-05-19 13:19:28 +01:00
Cameron Sparr 9aec58c6b8 Don't allow inputs to overwrite host tag
closes #1054

This affects tags in the following plugins:

- cassandra
- disque
- rethinkdb
2016-04-19 17:44:33 -06:00
Cameron Sparr 92e57ee06c Set default tags in test accumulator
closes #1012
2016-04-18 19:24:17 -06:00
Cameron Sparr 81d0a64d46 Adds support for removing/keeping tags from metrics
closes #706
2016-04-16 15:13:38 -06:00