Commit Graph

5326 Commits

Author SHA1 Message Date
Sebastian Spaink c237989631
Use go-ping for "native" execution in Ping plugin (#8679)
* Use go-ping for "native" execution in Ping plugin

* Check for ipv6 and deadline out of go func

* ensure dns failure

* Move interval and timeout calc to init
Removed dns failure check, 3rd parties libary responsibility

* Rename timeout to avoid conflict

* Move native ping to interface
Update tests

* Check for zero length
2021-01-26 16:02:43 -06:00
Helen Weller d41569caed
Integration test audit (#8725) 2021-01-26 11:06:12 -07:00
viperstars eda1dbc4dc
fix x509 cert timeout issue (#8741) 2021-01-26 13:02:23 -05:00
A. Binzxxxxxx 358633bc4d
Add setting to enable caching in ipmitool (#8335) 2021-01-21 16:14:21 -07:00
dependabot[bot] eb42f11cd6
Bump github.com/nsqio/go-nsq from 1.0.7 to 1.0.8 (#8714)
Bumps [github.com/nsqio/go-nsq](https://github.com/nsqio/go-nsq) from 1.0.7 to 1.0.8.
- [Release notes](https://github.com/nsqio/go-nsq/releases)
- [Changelog](https://github.com/nsqio/go-nsq/blob/master/ChangeLog.md)
- [Commits](https://github.com/nsqio/go-nsq/compare/v1.0.7...v1.0.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-21 14:20:40 -05:00
dependabot[bot] 8d95d3b529
Bump github.com/Shopify/sarama from 1.27.1 to 1.27.2 (#8715)
Bumps [github.com/Shopify/sarama](https://github.com/Shopify/sarama) from 1.27.1 to 1.27.2.
- [Release notes](https://github.com/Shopify/sarama/releases)
- [Changelog](https://github.com/Shopify/sarama/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Shopify/sarama/compare/v1.27.1...v1.27.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-21 14:19:35 -05:00
Adrian Thurston 4462b172f3
fix: remove ambiguity on '\v' from line-protocol parser (#8720) 2021-01-20 18:33:59 -05:00
Dae-Ho Kim 54422f4f1d
add kafka connect example to jolokia2 input (#8709)
* feat: add kafka connect example to jolokia2 input

* docs: add kafka connect example link

* chore: polishing
2021-01-19 20:45:24 -06:00
dependabot[bot] 4387b8c2b8
Bump github.com/newrelic/newrelic-telemetry-sdk-go from 0.2.0 to 0.5.1 (#8712)
Bumps [github.com/newrelic/newrelic-telemetry-sdk-go](https://github.com/newrelic/newrelic-telemetry-sdk-go) from 0.2.0 to 0.5.1.
- [Release notes](https://github.com/newrelic/newrelic-telemetry-sdk-go/releases)
- [Changelog](https://github.com/newrelic/newrelic-telemetry-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/newrelic/newrelic-telemetry-sdk-go/compare/v0.2.0...v0.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-19 12:03:06 -05:00
Sebastian Spaink 149c2c2738
Create dependabot.yml (#8614)
Check weekly for dependency updates, will create a pull request if any are found.
2021-01-19 11:17:36 -05:00
David Bennett 1bf5a19582
Add Event Log support for Windows (#8616)
* Add event log support for windows when not running as a windows service.

* Add error message for initializing event logger.

* Add build windows flag.

* Only register event logger when running telegraf under windows.

* Update logger/event_logger.go

Co-authored-by: Steven Soroka <ssoroka@influxdata.com>

* Remove unnecessary 'fmt' import

* Remove unnecessary 'fmt' import

* Remove unnecessary error check

* use constants for eid levels.

Co-authored-by: Steven Soroka <ssoroka@influxdata.com>
2021-01-19 11:03:19 -05:00
Samantha Wang 6ed1431348
update readme: prometheus remote write (#8683) 2021-01-15 10:16:37 -08:00
Helen Weller 76c2201bbe
Fix Redis output field type inconsistencies (#8678) 2021-01-14 11:47:00 -05:00
David Bennett fbd54e84a2
GNMI plugin should not take off the first character of field keys when no 'alias path' exists. (#8659)
* GNMI plugin should not take off the first character of field keys when no 'alias path' exists.

* fix test method name

* fix test file formatting

* fix test file formatting

* Remove my unnecessary failing test
2021-01-13 15:48:21 -05:00
Sebastian Spaink 6bd5334f8b
Update template, remove CLA checkbox (#8680) 2021-01-13 09:51:07 -06:00
David Bennett d9f237759d
Use the 'measurement' json field from the particle webhook as the measurment name, or if it's blank, use the 'name' field of the event's json. (#8609) 2021-01-12 17:59:42 -05:00
David Bennett 70d2b1f790
Procstat input plugin should use the same timestamp in all metrics in the same Gather() cycle. (#8658) 2021-01-12 17:59:13 -05:00
Samantha Wang baa658a4bb
update data formats output docs (#8674) 2021-01-12 09:44:59 -08:00
Földi Tamás 0c99ae9e1d
Add timestamp column support to postgresql_extensible (#8602) 2021-01-11 13:53:44 -05:00
Helen Weller 3b87438dea
Added ability to define skip values in csv parser (#8627) 2021-01-11 13:53:06 -05:00
Sebastian Spaink 3531e9ddc6
Removing .lgtm.yml (#8664)
* Removed LGTM

* Empty build.py to remove false python alerts
2021-01-11 10:53:17 -06:00
Steven Soroka 9814d3d84d fix some annoying tests due to ports in use 2021-01-08 17:30:43 -05:00
Nathan Ferch f31203b4b2
Add Beat input plugin (#6653)
This plugin is known to work with Kafkabeat and Filebeat, and will
likely work with other Beat instances that have a similar HTTP API.

It is based on work done by @dmitryilyin.

Co-authored-by: Dmitry Ilyin <idv1985@gmail.com>
2021-01-08 13:06:59 -05:00
Steven Soroka 8b4fb2b75e add todo note about wavefront dependencies 2021-01-08 00:07:24 -05:00
Patrick Hemmer 910b726876
Optimize SeriesGrouper & aggregators.merge (#8391)
The previous implementation of SeriesGrouper required breaking a metric object apart into its constituents, converting tags and keys into unoptimized maps, only to have it put them back together into another metric object. This resulted in a significant performance overhead. This overhead was further compounded when the number of fields was large.

This change adds a new AddMetric method to SeriesGrouper which preserves the metric object and removes the back-and-forth conversion.

Additionlly the method used for calculating the metric's hash was switched to use maphash, which is optimized for this case.

----

Benchmarks

Before:

    BenchmarkMergeOne-16          106012	     11790 ns/op
    BenchmarkMergeTwo-16           48529	     24819 ns/op
    BenchmarkGroupID-16           780018	      1608 ns/op

After:

    BenchmarkMergeOne-16          907093	      1173 ns/op
    BenchmarkMergeTwo-16          508321	      2168 ns/op
    BenchmarkGroupID-16         11217788	      99.4 ns/op
2021-01-07 11:39:12 -05:00
Aladex 4b7d11385c
Using mime-type in prometheus parser to handle protocol-buffer responses (#8545) 2021-01-07 11:21:09 -05:00
Dušan Pajin 9ee6e034fb
Input SNMP plugin - upgrade gosnmp library to version 1.29.0 (#8588) 2021-01-07 08:44:33 -07:00
Sebastian Spaink ee76535a12
Provide test environment for kibana input plugin (#8629) 2021-01-06 16:23:40 -06:00
Sebastian Spaink c8584a7b3f
Upgrade circle-ci config to v2.1 (#8621)
* Upgrade to 2.1 circle-ci config

* new line
2021-01-06 16:23:29 -06:00
Helen Weller 4608620924
remove redundant reference to docs in data formats docs (#8652) 2021-01-05 14:47:13 -05:00
Samantha Wang e545167ba8
alphabetize external plugins list (#8647)
* alphabetize
2021-01-05 11:02:32 -08:00
Mariusz Brzeski 61c64cba1e
Open Hardware Monitor (#8646)
Co-authored-by: Mariano <marianob85@gmail.com>
2021-01-05 08:57:22 -08:00
Yuri Grigorov c319e63a5a
outputs/http: add option to control idle connection timeout (#8055)
Co-authored-by: Yuri Grigorov <jurijs.grigorovs@corp.mail.ru>
2020-12-30 12:59:58 -06:00
Sebastian Spaink 33d5ba49dc
Lgtm config (#8625)
* Hide python

* new line
2020-12-29 14:58:16 -06:00
Ted Timmons b75221e6c6
update influxdb_v2 config documentation in main (#8618)
[Per the v2 output readme](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/influxdb_v2/README.md) and trial/error the fields aren't arrays, and "org" is actually "organization".
2020-12-29 14:37:19 -05:00
Samantha Wang 3d30fd85c6
update intel powerstat readme (#8600) 2020-12-23 16:41:59 -05:00
Andreas Fuchs 3c9c013f4b
common/tls: Allow specifying SNI hostnames (#7897)
* tls_config: Allow specifying SNI hostnames

Add a new configration field `tls_server_name` that allows specifying
the server name that'll be sent in the ClientHello when telegraf makes
a request to TLS servers. This allows checking against load balancers
responding to specific hostnames that otherwise wouldn't resolve to
their addresses.

Add the setting to the documentation of common TLS options, as well as
to the http_response plugin.

Fixes #7598.

* Adjust the x509_cert to allow usage of tls_server_name

This plugin has been using ServerName previously, and will have to
deal with the new setting, too: Extract the server-name choosing into
a method & add a test to ensure we choose the right value (and error
under the right circumstances). Also document that the two settings
are mutually exclusive.

* Improve documentation on what we try to accomplish in the nil return

Also get rid of the TODO, as I am fairly certain this behavior is the
correct one.

* Remove unused struct field in tests
2020-12-23 13:39:43 -06:00
Germán Jaber 841e971ace
Fix spelling and clarify docs (#8164) 2020-12-23 10:43:21 -06:00
David Pryor ea4feb1a07
fixed formatting (+1 squashed commit) (#8541)
Squashed commits:
[c4e2bee2] Closes #8530: Extended the internal snmp wrapper to support AES192, AES192C, AES256, and AES256C.  Updated the example configuration with the new privProtocols.  Added the warning that those protocols are only supported if you have the appropriate tooling on your system.  Added test to ensure all 4 new privProtocols could be selected and properly encrypt the priv password.
2020-12-23 10:19:53 -06:00
Greg 7c17055178
Provide method to include core count when reporting cpu_usage in procstat input (#6165)
* Provide a non-irix reporting of cpu_usage in procstat input

* Update sample config to include cpu gathering mode

* cleanup readme from merge
2020-12-23 09:30:47 -06:00
JS1010111 ed72aac0be
Add support for an inclusive job list in Jenkins plugin (#8287)
* Add support for an inclusive job list

* Update jenkins plugin tests

* Update jenkins plugin docs

* Update jenkins plugin docs
2020-12-23 09:21:38 -06:00
Peng Xiao 2c61fad895
improve the error log message for snmp trap (#8552)
add OID value and source information into error log and make it easier for troubleshooting
2020-12-23 09:12:41 -06:00
Sam Lai 35a221018b
[http_listener_v2] Stop() succeeds even if fails to start (#8502)
* [http_listener_v2] Stop() succeeds even if fails to start

In cases where the http_listener_v2 plugin config is invalid, when the agent attempts to cleanup by stopping all the inputs, the Stop method here panics as it tries to call listener.Stop() when no listener has been set. This also masks the error message returned from the Start method.

```
> telegraf --test
2020-10-27T12:21:45Z I! Starting Telegraf 1.16.0
2020-10-27T12:21:45Z I! Using config file: /etc/telegraf/telegraf.conf
...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x1245130]

goroutine 45 [running]:
github.com/influxdata/telegraf/plugins/inputs/http_listener_v2.(*HTTPListenerV2).Stop(0xc00043e000)
        /go/src/github.com/influxdata/telegraf/plugins/inputs/http_listener_v2/http_listener_v2.go:178 +0x30
github.com/influxdata/telegraf/agent.stopServiceInputs(0xc00045e480, 0x5, 0x8)
        /go/src/github.com/influxdata/telegraf/agent/agent.go:445 +0x82
github.com/influxdata/telegraf/agent.(*Agent).testRunInputs(0xc000288080, 0x32be8c0, 0xc0000f1f00, 0x0, 0xc00000f480, 0x0, 0x0)
        /go/src/github.com/influxdata/telegraf/agent/agent.go:434 +0x1b7
github.com/influxdata/telegraf/agent.(*Agent).test.func4(0xc000057b70, 0xc000288080, 0x32be8c0, 0xc0000f1f00, 0x0, 0xc00000f480)
        /go/src/github.com/influxdata/telegraf/agent/agent.go:977 +0x8b
created by github.com/influxdata/telegraf/agent.(*Agent).test
        /go/src/github.com/influxdata/telegraf/agent/agent.go:975 +0x352
```

This fixes this issue by checking if the listener has been set before calling listener.Stop.

```
> ./telegraf --config test.conf --test
2020-10-27T12:43:25Z I! Starting Telegraf
2020-10-27T12:43:25Z E! [agent] Starting input inputs.http_listener_v2: listen tcp: address address_without_port: missing port in address
```

* retry CI
2020-12-23 09:09:42 -06:00
Aleksei Magusev 0731585d61
Unify comments style in the CPU input (#8605) 2020-12-21 15:44:51 -05:00
Helen Weller 9f31184e20
Fix readme link for line protocol in influx parser (#8610) 2020-12-21 14:37:50 -05:00
David Bennett dd09f46863
Add hex_key parameter for IPMI input plugin connection (#8524) 2020-12-21 11:45:58 -05:00
David Bennett c47fcf6626
Add configurable number of 'most recent' date-stamped indices to gather in Elasticsearch input (#8543)
Add configurable number of 'most recent' date-stamped indices to gather in the Elasticsearch input plugin, and allow wildcards to account for date-suffixed index names. Configuring '3' for num_most_recent_indices will only gather the 3 latest indices, based on the date or number they end with. Finding the date or number is dependent on the targeted indices being configured with wildcards at the end of their 'base' names.
2020-12-21 11:45:19 -05:00
Greg a7dff56dde
Add more verbose errors to influxdb output (#6061)
Looks like ear/959 has already been resolved, but these additional information for the errors still seems useful.
I just re-based the change and merging.
2020-12-21 10:14:10 -06:00
Steven Soroka f067b4b75a Update build version to 1.18.0 2020-12-18 18:32:33 -05:00
Steven Soroka 828fbbc4dc Update changelog
(cherry picked from commit 7de2ff7fff6c09d36f3b9e86092beed4634ea611)
2020-12-18 17:39:41 -05:00