Commit Graph

235 Commits

Author SHA1 Message Date
Daniel Nelson 3621bcf5a6
Add basic unittest for templating engine 2019-01-07 14:14:00 -08:00
Daniel Nelson 4fd5fa006b
Allow non-tls config downloading 2019-01-04 10:40:44 -08:00
emily f42d9378ba Add cloud_pubsub input plugin (#5136) 2019-01-03 16:20:07 -08:00
Samuel-BF f530ca6e7c Use godirwalk in globpath (#5145) 2018-12-18 14:23:25 -08:00
Daniel Nelson 544262a23a
Apply global and plugin level metric modifications before filtering (#5152) 2018-12-18 14:20:43 -08:00
Samuel-BF 8906e2796b Add size to filecount input (#4778) 2018-12-13 12:25:49 -08:00
Greg 74d8523db6 Aggregate early metrics, rather than ignore (#5085) 2018-12-10 16:07:08 -08:00
Daniel Nelson 0a506a93fe
Remove metrics from the buffer on write (#5052) 2018-11-29 12:58:48 -08:00
Daniel Nelson 574fa5a6be
Add support for fetching config over https (#4637) 2018-11-05 14:19:46 -08:00
Daniel Nelson 6e5c2f8bb6
Remove outputs blocking inputs when output is slow (#4938) 2018-11-05 13:34:28 -08:00
Trevor Pounds ee056278f5 Enable gofmt code simplification (#4887) 2018-10-19 13:32:54 -07:00
Samuel-BF 589d0587f6 Add ability to specify bytes options as strings with units (KB, MiB, ...) (#4852) 2018-10-19 11:17:18 -07:00
Samuel-BF f259229a35 Improve performance of globpath with some patterns (#4836) 2018-10-12 14:48:11 -07:00
Kevin Conaway 7bb219222a Add internal function for telegraf version (#4828) 2018-10-09 13:45:07 -07:00
Mihai Todor f3da717a88 Add entity-body compression to http output (#4807) 2018-10-05 15:06:41 -07:00
Rudy a1f9f63463 Add new config for csv column explicit type conversion (#4781) 2018-10-03 18:19:44 -07:00
Daniel Nelson c3bab78ea8 Fix case of timezone/grok_timezone options. (#4799) 2018-10-03 13:58:21 -06:00
Daniel Nelson 7553c8fd13
Remove metric recreation when filtering (#4767) 2018-09-28 14:48:20 -07:00
Lee Jaeyong 6b7d64f1d6 Add ability to define a custom service name when installing as a Windows service (#4753) 2018-09-27 18:41:24 -07:00
Lee Jaeyong a086ea6989 Use time.AfterFunc to avoid need for goroutine in WaitTimeout (#4702) 2018-09-26 19:15:38 -07:00
Daniel Nelson fe0b964d3e
Document that proc/agg/outputs are not run as part of --test 2018-09-20 15:00:05 -07:00
Daniel Nelson 1e3e28428d
Clean up csv_trim_space after building parser config 2018-09-20 12:55:58 -07:00
Lee Jaeyong dfe8e3b473 Fix config file types of csv_skip_rows and csv_skip_columns (#4726) 2018-09-20 12:43:39 -07:00
Daniel Nelson a75c789e3e
Remove warning not to set flush_interval below interval 2018-09-18 18:13:20 -07:00
Daniel Nelson b5299f4cc4
Fix cleanup of csv parser options, use per file parser (#4712) 2018-09-18 09:23:45 -07:00
Daniel Nelson 1aa969aabc
Use separate mutexes for write and aggregation in running_output 2018-09-12 00:23:50 -07:00
Lance O'Connor c80aab0445 Add Splunk Metrics serializer (#4339) 2018-09-11 13:01:08 -07:00
Daniel Nelson 23a8498963
Fix locking if output is an AggregatingOutput 2018-09-10 15:14:14 -07:00
Daniel Nelson 1ca17652cd
Fix parsing and documentation for json_string_fields (#4656) 2018-09-10 11:55:08 -07:00
Greg 4ef058c120 Document all supported cli arguments (#4655) 2018-09-10 11:53:04 -07:00
Gunnar f70d6519e7 Add Azure Monitor output plugin (#4089) 2018-09-05 14:50:32 -07:00
maxunt 889745a112 Add csv parser (#4439) 2018-08-24 16:40:41 -07:00
maxunt 2729378b7f Add name, time, path and string field options to JSON parser (#4351) 2018-08-22 19:26:48 -07:00
estk edb6e1f655 Implement a lock based ring buffer for internal/buffer. (#3377) 2018-08-20 13:47:48 -07:00
Daniel Nelson 886d8cc840
Drop message batches in kafka output if too large (#4565) 2018-08-17 13:51:21 -07:00
Daniel Nelson feb75d493a
Lock buffer when adding metrics (#4514)
This function is not thread-safe but is currently used by multiple
goroutines in RunningOutput
2018-08-07 11:22:10 -07:00
Shanshi Shi e538433959 Preserve metric type when using filters in output plugins (#4481) 2018-08-01 16:39:54 -06:00
Daniel Nelson 93ed28e745 Add support for configuring an AWS endpoint_url (#4485) 2018-07-31 16:07:21 -06:00
maxunt 774a9f0492 Add file input plugin and grok parser (#4332) 2018-07-13 23:22:59 -07:00
maxunt 9ebf16636d Add parse_multivalue to collectd parser (#4403) 2018-07-11 17:29:23 -07:00
maxunt 39206677f8 Add new measurement with results of pgrep lookup to procstat input (#4307) 2018-06-19 11:47:13 -07:00
Daniel Nelson acba20af1a
Fix TLS and SSL config option parsing (#4247) 2018-06-06 18:29:59 -07:00
Piotr Popieluch dfe7b5eec2 Don't skip metrics during startup in aggregate phase (#4230) 2018-06-05 16:30:53 -07:00
Piotr Popieluch e0071f365a Print the enabled aggregator and processor plugins on startup (#4212) 2018-05-31 11:56:49 -07:00
Daniel Nelson 0d21296aed
Expose graphite_tag_support option in graphite output data format 2018-05-21 16:39:15 -07:00
Daniel Nelson de355b76d6
Simplify testing with TLS (#4095) 2018-05-04 16:33:23 -07:00
Daniel Nelson 7c0754ebe5
Move usage string to internal to fix `go run` 2018-05-04 14:16:21 -07:00
Bob Shannon 0b4f4b089f Add TLS support to socket_writer and socket_listener plugins (#4021) 2018-04-17 17:02:04 -07:00
Daniel Nelson c8d2ba2bc8
Remove RateLimiter tests due to race conditions
These tests are fundamentally racy, removing to improve reliability of
test cases.
2018-04-16 18:52:52 -07:00
jvassev 2c19d74829 Prevent loading config twice in K8S (#3999)
When config dir is mounted from configmap, filepath.Walk() finds the same
.conf file twice as 20-acme.conf is a link to ..data/20-acme.conf for example.

This patch skips all folder names starting with '..' which is pretty
uncommon and mainly used by Kubernetes mounts.
2018-04-11 16:51:19 -07:00
Daniel Nelson beeab2c509
Sort field names when running --test 2018-04-04 16:30:22 -07:00
Daniel Nelson b99cd14129
Add influx uint support as a runtime option (#3948) 2018-03-29 13:31:43 -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 8147d60973
Fix metric buffer limit in internal plugin after reload 2018-02-19 20:55:28 -08:00
Paul Myjavec 12d62e60b3 Use CircleCI 2.0 for builds (#3731) 2018-02-01 15:05:39 -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
atzoum 317de40ac4 Add support for dropwizard input format (#2846) 2018-01-08 15:11:36 -08:00
Daniel Nelson b0c2bb870e
Escape environment variables during config toml parsing (#3637) 2018-01-04 15:28:00 -08:00
Maximilien Richer 5f215c22fe Fix typos in comments (#3415) 2017-10-31 17:00:06 -07:00
Daniel Nelson d0b690f040 Fix short tests on darwin (#3099) 2017-09-08 13:03:37 -07:00
Daniel Nelson 28d16188b3 Fix panic when handling string fields with escapes (#3188) 2017-08-30 21:16:37 -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 31ce98fa91 Don't match pattern on any error (#3040)
This prevents a pattern with no wildcards from matching in case
permissions is denied.
2017-07-21 14:28:14 -07:00
DanKans d903a9142d Fix filtering when both pass and drop match an item (#3036)
Adjust logic in functions responsible for passing metrics in order to be able
to process them correctly in case where pass and drop are defined together.
2017-07-21 10:53:57 -07:00
DanKans 34c042c7dc Fix combined tagdrop/tagpass filtering (#3031) 2017-07-19 13:08:40 -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
Daniel Nelson 5d2c093105 Prevent Write from being called concurrently (#3011) 2017-07-12 12:03:23 -07:00
Daniel Nelson 1388e2cf92 Do not allow metrics with trailing slashes (#3007)
It is not possible to encode a measurement, tag, or field whose last
character is a backslash due to it being an unescapable character.
Because the tight coupling between line protocol and the internal metric
model, prevent metrics like this from being created.

Measurements with a trailing slash are not allowed and the point will be
dropped.  Tags and fields with a trailing a slash will be dropped from
the point.
2017-07-11 15:54:38 -07:00
Seuf 2092443cd7 Add Kafka 0.9+ consumer support (#2487) 2017-06-07 18:22:28 -07:00
Daniel Nelson 052e88ad5e
Fix grammar 2017-04-27 14:59:18 -07:00
Patrick Hemmer 06baf7cf78 use AddError everywhere (#2372) 2017-04-24 11:13:26 -07:00
Daniel Nelson 360b10c4de Clarify precision documentation (#2655) 2017-04-12 10:42:11 -07:00
Daniel Nelson 2c98e5ae66 Add collectd parser (#2654) 2017-04-12 10:41:26 -07:00
Daniel Nelson 540f98e228 Fix possible deadlock when output cannot write. (#2610) 2017-03-31 12:45:28 -07:00
tjmcs fb1c7d0154 Adds a new json_timestamp_units configuration parameter (#2587) 2017-03-29 17:12:29 -07:00
Cameron Sparr 9e810ac463
Handle nil os.FileInfo in filepath.Walk
closes #2466
2017-02-28 17:51:03 +00:00
Cameron Sparr 06176ef410
Only set the buffer size once
fixes #2380
2017-02-17 14:11:15 +00:00
Cameron Sparr 21cf79163c
don't use influxdata/config, just use influxdata/toml 2017-02-10 17:27:18 +00:00
Cameron Sparr f7d551a807
Add more nested globpath tests 2017-02-01 23:44:35 +00:00
Cameron Sparr e87ce22af9
running output: Drop nil metrics
fixes #2317
2017-02-01 08:55:22 +00:00
Cameron Sparr 7279018cfe
readme fixup & test output fixup 2017-01-09 12:28:13 +00:00
Cameron Sparr 12db3b9120
Check if metric is nil before calling SetAggregate
fixes #2146
2016-12-13 12:27:10 +00: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 0ecbf9e349 Fix single quote parsing of TOML durations
closes #2023
2016-11-10 09:47:46 +00:00
Cameron Sparr f729fa990d Unit testing for internal.Duration Unmarshal
closes #1926
2016-10-25 13:11:32 +01:00
Alex Zorin 662db7a944 Fix panic in internal.Duration UnmarshalTOML 2016-10-25 18:30:01 +11:00
Cameron Sparr c849b58de9 http_listener input unit tests 2016-10-24 18:17:49 +01:00
Cameron Sparr 097b1e09db http listener refactor
in this commit:

- chunks out the http request body to avoid making very large
  allocations.
- establishes a limit for the maximum http request body size that the
  listener will accept.
- utilizes a pool of byte buffers to reduce GC pressure.
2016-10-24 18:17:49 +01:00
Cameron Sparr b00ad65b08 Log config file parsing errors properly
closes #1344
2016-10-12 16:50:22 +01:00
Cameron Sparr a84ce5d5cb drop metrics outside of the aggregators period 2016-10-12 14:56:03 +01:00
Cameron Sparr 8ca4a50c18 delete nil fields in the metric maker.
closes #1771
2016-10-12 14:50:19 +01:00
Cameron Sparr 03b2984ac2 Fixup some code based on feedback from @dgnorton 2016-10-12 14:50:19 +01:00
Cameron Sparr 9540a6532f Update influxdb dependency for new models.Tags 2016-10-12 14:50:19 +01:00
Cameron Sparr 78f544c0aa Support --aggregator-filter & --processor-filter 2016-10-12 14:50:19 +01:00
Cameron Sparr b03c1d9691 Support ordering of processor plugins 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 ef885eda62 Change minmax aggregator to store float64 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