Commit Graph

389 Commits

Author SHA1 Message Date
Sebastian Spaink 66da86017f
chore: json_v2 read testdata dir for tests (#9906) 2021-10-12 15:04:36 -06:00
Sebastian Spaink da5727e34c
fix: duplicate line_protocol when using object and fields (#9872) 2021-10-07 15:45:02 -05:00
Patrick Hemmer 128ed8849b
fix: memory leak in influx parser (#9787) 2021-10-07 15:35:44 -05:00
Yuji Kawamoto d2a25456d5
feat(prometheus): add ignore_timestamp option (#9740) 2021-10-05 15:11:46 -06:00
Sebastian Spaink df5c19c17e
feat (parser.json_v2): Support defining field/tag tables within an object table (#9449) 2021-10-04 13:19:06 -05:00
Eng Zer Jun 6a3b27126a
refactor: move from io/ioutil to io and os package (#9811) 2021-09-28 15:16:32 -06:00
Sven Rebhan c076398440
fix: Fix panic for non-existing metric names (#9757) 2021-09-15 11:58:40 -06:00
Sebastian Spaink 3a7d9b6d98
fix: support 1.17 & 1.16.7 Go versions (#9642) 2021-08-23 15:37:44 -05:00
Dominik Rosiek 348c18db75
feat(http_listener_v2): allows multiple paths and add path_tag (#9529) 2021-07-27 16:10:50 -05:00
Sebastian Spaink d6b7d4da2c
Simplify how nesting is handled (#9504) 2021-07-22 19:09:01 -05:00
Alexander Krantz 2eb0ee2e1e
Add support for large uint64 and int64 numbers (#9520) 2021-07-19 22:23:12 -05:00
Sebastian Spaink 1b20680e37
Fix json_v2 parser to handle nested objects in arrays properly (#9479) 2021-07-08 13:05:41 -05:00
Sven Rebhan 25413b2b6d
XPath parser extension to allow parsing of JSON, MessagePack and Protocol-buffers (#9277) 2021-07-01 16:48:16 -04:00
Mya 8638a41724
tags no longer required in included_keys (#9406) 2021-06-22 11:48:29 -05:00
Sebastian Spaink daec1040c6
Update json_v2 parser to handle null types (#9368) 2021-06-15 16:50:20 -06:00
Sebastian Spaink 885252d388
New JSON Parser (#9246) 2021-06-10 13:22:18 -06:00
Helen Weller 940fea9135
fix spelling of receive (#9269) 2021-05-13 15:28:14 -04:00
Julien Riou 4336dae3b5
Make JSON format compatible with nulls (#9110) 2021-04-20 17:47:14 -04:00
David Bennett 842a788022
Remove error return type from metric.New method (#9116)
* Remove error return type from metric.New method.

* Formatting changes for linter + gofmt

* Additional linter fixes.

* More linter fixes.

* Linter fix.

* address comments
2021-04-13 14:40:03 -04:00
Samantha Wang 411df7d763
update promremotewrite readme
make influxdb 1.x alignment a header
2021-04-13 08:04:10 -07:00
Helen Weller 885bf273a9
Starlark script for renaming prometheus remote write metrics (#9074) 2021-03-31 15:08:34 -04:00
Samantha Wang f26084acf1
add xpath testers to xml readme (#9049)
* add xpath testers to xml readme

* fix linking
2021-03-25 13:15:33 -07:00
Paweł Żak 099ccda3f9
Linter fixes - gosimple (#9046) 2021-03-25 13:57:01 -04:00
Patryk Małek e96955d1bb
Bump prometheus dependency to v2.21.0 (#8795)
* Bump prometheus dependency to v2.21.0

* Make golangci-lint happy
2021-03-25 11:18:50 -05:00
Paweł Żak 5de640b855
Linter fixes - unconvert, revive:empty-lines, revive:var-naming, revive:unused-parameter (#9036)
Co-authored-by: Pawel Zak <Pawel Zak>
2021-03-24 11:27:46 -04:00
Paweł Żak 74a1acd814
Linter fixes - revive:unused-parameter, unparam, varcheck and unused (#8984)
* Linter fixes - revive:unused-parameter and unparam

* Linter fixes - revive:unused-parameter and unparam

* Linter fixes - revive:unused-parameter and unparam

* "nolint"'s removed

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

Co-authored-by: Pawel Zak <Pawel Zak>
2021-03-22 12:21:36 -05:00
Helen Weller 67f588cbce
New prometheus remote write parser (#8967) 2021-03-18 11:33:58 -04:00
Sven Rebhan 808b7c1ba5
Improve xml parser's handling of missing values (#8971) 2021-03-16 16:15:18 -04:00
Paweł Żak 38c61c07ef
Revive fixes - part 4: (#8981)
empty-lines

Co-authored-by: Pawel Zak <Pawel Zak>
2021-03-12 14:21:51 -06:00
David Bennett c905116ade
Add 'field name' config option to customize field name when using Value parser. (#8979) 2021-03-11 21:53:32 -05:00
reimda 431d06acc0
Add XML parser using XPath queries (#8931) 2021-03-03 13:26:09 -07:00
Paweł Żak 17efd172b7
Clearing LGTM alerts and warnings (#8923) 2021-03-03 14:56:31 -05:00
Paweł Żak 8a6907a186
Revive fixes - part 3 (#8872)
* * Revive fixes regarding following set of rules: [rule.var-naming]
2021-03-01 16:04:35 -05:00
Paweł Żak d9736d543f
Revive fixes - part 2 (#8835)
* Revive fixes regarding following set of rules:
[rule.if-return]
[rule.increment-decrement]
[rule.var-declaration]
[rule.package-comments]
[rule.receiver-naming]
[rule.unexported-return]
2021-02-16 18:19:50 -05:00
Paweł Żak ba66d4facb
Revive fixes - part 1 (#8797)
* Revive fixes regarding following set of rules:
[rule.blank-imports]
[rule.context-as-argument]
[rule.context-keys-type]
[rule.dot-imports]
[rule.error-return]
[rule.error-strings]
[rule.indent-error-flow]
[rule.errorf]
2021-02-08 11:18:40 -05:00
Adrian Thurston 4462b172f3
fix: remove ambiguity on '\v' from line-protocol parser (#8720) 2021-01-20 18:33:59 -05:00
Helen Weller 3b87438dea
Added ability to define skip values in csv parser (#8627) 2021-01-11 13:53:06 -05:00
Aladex 4b7d11385c
Using mime-type in prometheus parser to handle protocol-buffer responses (#8545) 2021-01-07 11:21:09 -05:00
Helen Weller 9f31184e20
Fix readme link for line protocol in influx parser (#8610) 2020-12-21 14:37:50 -05:00
Helen Weller 94eb8f2e42
Add wildcard tags json parser support (#8579) 2020-12-17 19:32:25 -05:00
Steven Soroka 7ff96a7424 Revert "Update grok package to support for field names containing '-' and '.' (#8276)"
This reverts commit a5f3121f6d.

(cherry picked from commit 5c826e8a3254dc509012d018638a2e5f41a110f2)
2020-12-16 17:29:41 -05:00
Steven Soroka 717d329af8 Revert "disable flakey grok test for now"
This reverts commit a96c8b49e4.

(cherry picked from commit 115e25ea36b854d4e5f941596dfb965d103c1376)
2020-12-16 17:29:10 -05:00
Hítalo Silva f6e2d451cd
Graphite tags parser (#8564) 2020-12-15 13:41:51 -05:00
Samantha Wang d9d6a194b1
Update json parser readme (#8532) 2020-12-15 10:09:11 -07:00
Steven Soroka a96c8b49e4 disable flakey grok test for now 2020-12-10 13:20:37 -05:00
Dmitry Senin 0ccb134ae4
Add a parser plugin for prometheus (#7778) 2020-12-02 12:48:44 -07:00
Hong a5f3121f6d
Update grok package to support for field names containing '-' and '.' (#8276) 2020-12-02 13:11:35 -05:00
Stephanie Engel 247230c5c9
keep field name as is for csv timestamp column (#8440) 2020-11-20 09:52:07 -06:00
Sven Rebhan 049daf7892
Fix parsing of multiple files with different headers (#6318). (#8400) 2020-11-13 10:36:08 -05:00
Russ Savage dabea48a90
Fix minor typos in readmes (#8370) 2020-11-12 10:20:50 -07:00
Roger Peppe 9ee87ab7c3
fix: plugins/parsers/influx: avoid ParseError.Error panic (#8177) 2020-09-30 13:26:00 -04:00
Russ Savage 75e701c288
fix(readmes): adding code block annotations (#7963) 2020-08-10 15:50:48 -04:00
Stephen Solka 6580c6a597
prefer testify error funcs over nil checks (#7857) 2020-07-20 10:34:46 -04:00
Daniel Nelson be77fbab31
Support utf-16 in file and tail inputs (#7792) 2020-07-07 12:43:32 -07:00
Daniel Nelson 72e3ff04bd
Link to GJSON playground in json parser documentation (#7698) 2020-06-17 12:15:43 -07:00
Haidlir Naqvi adbc425961
Add timezone configuration to csv data format (#7619) 2020-06-08 14:52:46 -07:00
Steven Soroka 7ba226a00b
fix issue with stream parser blocking when data is in buffer (#7631) 2020-06-05 18:30:25 -04:00
Steven Soroka a438678d5b
make sure parse error includes offending text (#7561) 2020-05-27 14:58:58 -04:00
Harshit Bansal 092059c066
Exclude csv_timestamp_column and csv_measurement_column from fields (#7572) 2020-05-26 14:16:48 -07:00
Josh Soref bf1eb291f2
Fix assorted spelling mistakes (#7507) 2020-05-15 15:43:32 -07:00
Josh Soref 2c56d6de81
Fix spelling errors in comments and documentation (#7492) 2020-05-14 00:41:58 -07:00
presslab-us e1b2ebe06d
Use same timestamp for all objects in arrays in the json parser (#7412) 2020-04-29 11:32:19 -07:00
Daniel Nelson cf3d48bb68
Allow CR and FF inside of string fields and fix parser panic (#7427) 2020-04-28 14:42:37 -07:00
Steven Soroka 6c72c645a2
add another grok example for custom timestamps (#7367) 2020-04-20 13:18:12 -04:00
Daniel Nelson d8b66b69d5
Mention metric filtering in csv parser docs 2020-03-13 14:30:27 -07:00
reimda a0276385b1
Refactor InfluxDB listener (#6974)
Use streaming parser in InfluxDB listener
2020-03-04 11:13:44 -07:00
Daniel Nelson c6519c7793
Hook up json_strict option with default of true (#6909) 2020-01-21 10:10:02 -08:00
Daniel Speichert 98585a1853 Set TrimLeadingSpace when TrimSpace is on in csv parser (#6773) 2019-12-11 11:25:35 -08:00
Daniel Nelson 48f9f22f33
Document that json tag_keys are not saved as fields. 2019-12-03 16:43:05 -08:00
Daniel Nelson 03de92b962
Remove trailing underscore trimming from json flattener (#6744) 2019-12-03 11:46:29 -08:00
Daniel Nelson 1b25a9c910
Remove debug print statement 2019-12-02 20:03:25 -08:00
David McKay a9a0d4048a Add strict mode to JSON parser (#6536) 2019-10-23 14:06:39 -07:00
pierwill c8f4215ac5 Document data types should be specified in column order (#6526) 2019-10-14 15:29:41 -07:00
Rajiv Kushwaha b9a4ef7484 Add millisecond unix time support to grok parser (#6476) 2019-10-04 17:38:48 -07:00
Kai Groner f080b58834 Use prefix base detection for ints in grok parser (#6434) 2019-09-23 10:26:17 -07:00
Daniel Nelson 8d96dd71c7
Allow graphite parser to create Inf and NaN values (#6420) 2019-09-19 20:03:10 -07:00
Daniel Nelson 6dc61be6eb
Fix detection of layout timestamps (#6390) 2019-09-16 16:32:14 -07:00
Greg df288a0bb4 Keep boolean when listed in json_string_fields (#6400) 2019-09-16 16:30:34 -07:00
Daniel Nelson 9463b894f2
Fix links in changelog 2019-09-03 10:58:37 -07:00
Daniel Nelson 558c825478
Link to specific gjson version we are using 2019-08-28 18:11:38 -07:00
Daniel Nelson e576048e02
Treat empty array as successful parse (#6130) 2019-07-17 15:03:09 -07:00
Daniel Nelson 41176dd1f1
Support string field glob matching in json parser (#6102) 2019-07-15 16:48:19 -07:00
Daniel Nelson 9b338410cb
Rename formdata parser to form_urlencoded 2019-06-17 14:50:58 -07:00
Boris Yonchev fd9abd2166 Add formdata parser (#5749) 2019-06-17 13:34:54 -07:00
Charlie Vieth b35beb2fba Reduce the cpu/memory used by the graphite parser (#5841) 2019-06-14 12:45:07 -07:00
Marc Venturini 4b6e791908 Fix sensor read error stops reporting of all sensors in temp input (#5941) 2019-06-14 11:27:24 -07:00
Daniel Nelson d260437318
Add example output from the collectd parser 2019-06-13 13:34:12 -07:00
Daniel Nelson e52f7056ba
Fix parse of unix timestamp with more than ns precision (#5826) 2019-05-14 11:29:44 -07:00
Pontus Rydin f32b064d6a Fix race condition in the Wavefront parser (#5764) 2019-04-25 12:22:48 -07:00
Greg 286eeb117e Remove unused config option from logfmt parser docs (#5669) 2019-04-02 13:06:44 -07:00
Daniel Nelson c283e5992a
Fix tags applied to wrong metric on parse error (#5650) 2019-04-02 11:14:56 -07:00
scier 60027cf902 Add support for multiple line text and perfdata to nagios parser (#5601) 2019-03-25 16:24:42 -07:00
Daniel Nelson e793a69533
Fix grammar 2019-03-25 12:11:59 -07:00
Daniel Nelson 888d847a05
Add link to vjeantet/grok to grok parser docs 2019-03-25 12:09:04 -07:00
Daniel Nelson 72d4f00082
Remove string trimming from grok parser (#5608) 2019-03-22 14:02:15 -07:00
Greg 45b1247d9b Use valid measurement names in csv parser (#5577)
If an empty column is present in parsed csv data, a `recordFields` is
set to the key of "". If no `MeasurementColumn` is defined, this empty
value was being used as the measurement name. By only setting the
measurementName if the value is not empty, we avoid this error.

Since an empty column is a valid column, skip values must account for
them.
2019-03-12 19:49:19 -07:00
Daniel Nelson a0527db037
Allow grok to produce metrics with no fields (#5533) 2019-03-05 11:07:39 -08:00
Daniel Nelson c023ffe0a5
Add unique_timestamp option from grok parser to logparser grok 2019-02-26 18:05:04 -08:00
Greg 85617887c4 Add option to disable timestamp adjustment in grok parser (#5488) 2019-02-26 17:35:57 -08:00
Daniel Nelson 04f3c4321c
Fix several influx parser issues (#5484)
- Add line/column position
- Allow handlers to return errors
- Fix tag value escaping
- Allow newline in string fields
2019-02-26 10:48:41 -08:00
Douglas Drinka 1886676e14 Support configuring a default timezone in JSON parser (#5472) 2019-02-25 11:30:33 -08:00
Pierre Tessier 5f1bc9e49f Accept values with a negative exponent in wavefront parser (#5462) 2019-02-21 14:49:52 -08:00
Daniel Nelson f54da4d748
Update changelog/csv parser docs 2019-02-05 17:45:44 -08:00
Greg 10ac030502 Unify time parsing in json/csv parsers (#5382) 2019-02-05 17:43:35 -08:00
Daniel Nelson b6cc324d10
Add note on performance to grok parser documentation (#5291) 2019-01-17 12:00:07 -08:00
Daniel Nelson 84139cf890
Use gofmt from Go 1.11 (#5259) 2019-01-07 17:14:07 -08:00
j2gg0s 9800779e64 Fix err in graphite parser_test (#5257) 2019-01-07 11:30:48 -08:00
Daniel Nelson 4e35732279
Fix toml option names in parser processor (#5218) 2019-01-02 13:55:59 -08:00
svenwiltink df6fbdb1e8 Fix unittests for new year (#5213) 2019-01-02 11:12:04 -08:00
Daniel Nelson 5027a516c7
Even more fix link in grok documentation 2018-12-19 16:25:06 -08:00
Daniel Nelson 76f8d294e4
Even more fix link in grok documentation 2018-12-19 16:24:00 -08:00
Daniel Nelson 2c3fa0907e
Even more fix link in grok documentation 2018-12-19 16:22:43 -08:00
Daniel Nelson d043da1976
Fix link in grok documentation 2018-12-19 16:17:17 -08:00
Adrián López 7caa5d20af Fix invalid JSON in readme (#5158) 2018-12-18 12:21:36 -08:00
Greg 6ef331efeb Add micro and nanosecond unix timestamp support to JSON parser (#5149) 2018-12-14 14:38:01 -08:00
Robert Fisher 04dfa430ef Allow delta metrics in wavefront parser (#5115) 2018-12-10 16:42:25 -08:00
Greg 83bc3d1277 Improve docs to clarify common issues (#5054) 2018-12-10 16:14:20 -08:00
Daniel Nelson a26aaa5e03
Add support for unix_ms timestamps in csv parser. 2018-11-28 16:19:53 -08:00
Felipe Dutra Tine e Silva f9113b63b7 Add csv parser unix timestamp support (#5047) 2018-11-28 16:07:25 -08:00
Greg 9c9511bde9 Be specific about required csv header definition (#5007) 2018-11-19 11:27:21 -08:00
Daniel Nelson 0e07bbb877
Fix option names in json parser docs 2018-11-05 17:15:07 -08:00
Daniel Nelson ad320ac1e0
Remove the time_key from the field values in JSON parser (#4951) 2018-11-02 17:53:45 -07:00
Daniel Nelson 9fcd279b7e
Run gofmt with Go 1.10 2018-10-29 16:12:37 -07:00
Daniel Nelson f38da90329
Run `make fmt` with Go 1.11 2018-10-29 16:00:54 -07:00
Trevor Pounds ee056278f5 Enable gofmt code simplification (#4887) 2018-10-19 13:32:54 -07:00
Trevor Pounds 17360f079c Fix spelling mistakes (#4888) 2018-10-19 11:12:01 -07:00
Rudy a1f9f63463 Add new config for csv column explicit type conversion (#4781) 2018-10-03 18:19:44 -07:00
Daniel Nelson 4898edbb2d
Increment timestamp by one second in multi metric tests
This avoids accidentally triggering tsMod time adjustments in certain
timezones.
2018-10-03 15:11:59 -07:00
Daniel Nelson c3bab78ea8 Fix case of timezone/grok_timezone options. (#4799) 2018-10-03 13:58:21 -06:00
Greg 4c9c31c34f Fix panic if JSONNameKey is not found (#4735) 2018-09-21 15:47:41 -07:00
Greg e08c975fbd Fix rune conversion in csv parser (#4728) 2018-09-21 12:39:05 -07:00
Daniel Nelson b5299f4cc4
Fix cleanup of csv parser options, use per file parser (#4712) 2018-09-18 09:23:45 -07:00
Greg 1d76343422 Enhance performance data for nagios parser (#4691) 2018-09-18 09:08:46 -07:00
Daniel Nelson 41d528c8ce
Split parser/serializer docs (#4690) 2018-09-17 11:45:08 -07:00
Greg e9eeda555e
Reset/flush saved contents from bad metric (#4646) 2018-09-06 18:45:40 -06:00
David Reniz cd4c4e7fbd Added Unix epoch timestamp support for JSON parser (#4633) 2018-09-06 18:44:33 -06:00
Gunnar f70d6519e7 Add Azure Monitor output plugin (#4089) 2018-09-05 14:50:32 -07:00
Ayrdrie 5420e13f14 Fix divide by zero in logparser input (#4338) 2018-08-29 19:11:13 -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
Ayrdrie e893dc38a2 Add logfmt parser (#4539) 2018-08-22 13:55:41 -07:00
maxunt 9e0eb0c0e0 Add ability to set measurement from matched text in grok parser (#4433) 2018-08-17 13:45:22 -07:00
Pierre Tessier 6454319062 Add Wavefront parser (#4402) 2018-08-13 17:37:06 -06:00
Daniel Nelson 035e6a6f78
Skip lines that do not match in grok parser 2018-08-10 18:11:32 -07:00
Daniel Nelson 14d25af4d4
Remove DS_Store files 2018-07-13 23:23:47 -07: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 8482c40a91 Fix selection of tags under nested objects in the JSON parser (#4284) 2018-06-14 13:17:32 -07:00
Daniel Nelson 0af40a8a5d
Fix dropwizard parsing error for metrics that need escaped (#4142)
If the dropwizard parser cannot convert the metric name into a valid
line protocol series then we will accept the name as is.
2018-05-14 11:00:03 -07:00
Daniel Meiners 9647ea88ea Ignore UTF8 BOM in JSON parser (#4099) 2018-05-03 11:40:28 -07:00
Daniel Nelson a3500cc33a
Fix handling of floats with multiple leading zeroes (#4065) 2018-04-23 13:29:49 -07:00
Daniel Nelson fe4d3cd117
Fix ints being capped at 32-bits on 32-bit archs (#4054) 2018-04-20 14:56:28 -07:00
Daniel Nelson e4f8a82ee6
Fix newline escaping in line protocol (#3992) 2018-04-09 15:29:52 -07:00
Daniel Nelson bcaaeda49c
Fix precision truncation when no timestamp included (#3961) 2018-04-02 14:32:33 -07:00
Daniel Nelson 64b239663c
Add mutex to influx parser 2018-04-02 12:52:23 -07:00
Daniel Nelson 38ec968b0b
Move Handler interface into machine where it is used 2018-03-30 11:11:12 -07:00
Daniel Nelson b99cd14129
Add influx uint support as a runtime option (#3948) 2018-03-29 13:31:43 -07:00
Matt a320f91516 Add line protocol uint64 support (#3946) 2018-03-28 16:43:25 -07:00
Daniel Nelson 1c0f63a90d
Add new line protocol parser and serializer, influxdb output (#3924) 2018-03-27 17:30:51 -07:00
Noah Crowley 87830a1c38 Ignore empty lines in Graphite plaintext (#3684) 2018-01-16 13:44:56 -08:00
atzoum d188b78d9e Add string and boolean support to dropwizard; fix escaping of tags/fields (#3664) 2018-01-16 12:12:14 -08:00
atzoum 317de40ac4 Add support for dropwizard input format (#2846) 2018-01-08 15:11:36 -08:00
Daniel Nelson 4f42d8a298
Add benchmark test for single metric 2017-12-08 13:23:08 -08:00
faye-sama a411306fba Fail metrics parsing on unescaped quotes (#3409)
Before this change Fields() method on a metric parsed from a line with
unescaped quotes could panic. This change makes such line unparseable.

Fixes #3326
2017-11-13 15:06:47 -08:00
Daniel Nelson 4243403432 Remove warning when JSON contains null value (#3359) 2017-10-19 16:25:58 -07:00
Daniel Nelson 22a9ffbb9d Allow JSON data format to contain zero metrics (#3268) 2017-09-26 15:58:33 -07:00
Daniel Nelson 2c98e5ae66 Add collectd parser (#2654) 2017-04-12 10:41:26 -07:00
Daniel Nelson 62b5c1f7e7 Add support for precision in http_listener (#2644) 2017-04-10 16:39:40 -07:00
Leandro Piccilli 5da40d56ad
Check if tag value is empty before allocation
closes #2390
closes #2404
2017-02-16 23:07:27 +00:00
Cameron Sparr 54cfbb5b87
metric: Fix negative number handling
closes #2324
2017-02-01 10:07:31 +00:00
Cameron Sparr 22340ad984
Add newline to influx line-protocol if not present
closes #2297
2017-01-23 13:52:20 -08:00
Matt O'Hara 1392e73125 Add clusterstats to elasticsearch plugin (#1979)
* add clusterstats to elasticsearch input plugin

* add clusterstats to elasticsearch input plugin

* add clusterstats to elasticsearch input plugin

* add clusterstats to elasticsearch input plugin

* add clusterstats to elasticsearch input plugin

* responses to requested changes

* remove unnecessary recommendation
2016-12-20 16:30:03 +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 5c32521a07 Add benchmarks for metric parsing and creating 2016-11-23 17:23:08 +00:00
Pieter Slabbert 196509cc53 Trim null characters in Value data format (#2049)
* Trim null characters in Value data format

Some producers (such as the paho embedded c mqtt client) add a null
character "\x00" to the end of a message.  The Value parser would fail on
any message from such a producer.

* Trim whitespace and null in all Value data formats

* No unnecessary reassignments in Value data format parser

* Update change log for Value data format fix
2016-11-16 13:13:31 +00:00
John Engelman 94ce67cc67 Add support to parse JSON array. (#1965) 2016-11-15 13:02:55 -05: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 9540a6532f Update influxdb dependency for new models.Tags 2016-10-12 14:50:19 +01:00
Cameron Sparr e96f7a9b12 graphite parser, handle multiple templates empty filter
Previously, the graphite parser would simply overwrite any template that
had an identical filter to a previous template. This included the empty
filter.

Now we will still overwrite, but first we will sort to make sure that
the most "specific" template always matches.

closes #1731
2016-10-11 15:22:51 +01:00
Daniele Gozzi 9ea3dbeee8 Allow numeric and non-string values for tag_keys. (#1782)
* Allow numeric and non-string values for tag_keys.

According to the go documentation the JSON deserializer only produces these
base types in output:
- string
- bool
- float64
- nil
With this patch bool, float64 and nil values get converted to a string when
their field key is specified in tag_keys. Previously the field was simply
discarded.

* Updated handling of nil for passing tests.

The automated tests are less than trivial to reproduece locally for me,
so I hope CircleCI wonn't mind...

* Updated changelog entries with PR and issue links.
2016-09-21 18:07:35 +01:00
Cameron Sparr 9144f9630b graphite parser: support multiple tag keys
closes #1272
2016-05-25 17:11:28 +01:00
Cameron Sparr f2b0ea6722 value parser: doc & string handling 2016-05-02 12:17:20 -06:00
Thibault Cohen 8f09aadfdf Add nagios parser for exec input plugin
closes #762
2016-03-21 13:34:47 -06:00
Chris H (CruftMaster) 20b4e8c779 GREEDY field templates for the graphite parser, and support for multiple specific field names
closes #789
2016-03-21 13:32:51 -06:00
Cameron Sparr 5c1b635229 Value parser, for parsing a single value into a metric
closes #849
2016-03-17 20:08:21 -06:00
Cameron Sparr a9c135488e Add Serializer plugins, and 'file' output plugin 2016-02-12 14:13:49 -07:00
Cameron Sparr 8d0f50a6fd MQTT Consumer Input plugin 2016-02-12 11:13:32 -07:00
Cameron Sparr e619493ece Implementing generic parser plugins and documentation
This constitutes a large change in how we will parse different data
formats going forward (for the plugins that support it)

This is working off @henrypfhu's changes.
2016-02-08 21:08:44 -07:00