Commit Graph

5285 Commits

Author SHA1 Message Date
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
Sebastian Spaink 50265d9023
Allow globs (wildcards) in config for tags/fields in enum processor (#8598)
* Allow glob in enum processor config

* change assert to require
2020-12-18 15:41:39 -06:00
Paweł Żak 7bf8cdb8e3
[ethtool] interface_up field added (#8590)
Co-authored-by: Pawel Zak <Pawel Zak>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
2020-12-18 12:04:02 -05:00
Helen Weller 04e62e3d23
changed TestThreadStats acc to wait for 2 and added warning comment (#8592) 2020-12-17 19:32:49 -05:00
Helen Weller 94eb8f2e42
Add wildcard tags json parser support (#8579) 2020-12-17 19:32:25 -05:00
Samantha Wang ee91b4856b
update inputs.influxdb readme (#8569)
* update inputs.influxdb readme

* remove duplicate
2020-12-17 08:21:45 -08: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
Steven Soroka 73f7e7da18 Update changelog
(cherry picked from commit d7cc715c15f2421eba8b56b0fec4c6d930cd250c)
2020-12-16 16:21:03 -05:00
Steven Soroka a27ded6d95
fix potential issue with race condition (#8577) 2020-12-16 15:39:12 -05:00
Steven Soroka e39208d60a
fix issue with mqtt concurrent map write (#8562) 2020-12-16 15:38:33 -05:00
Sebastian Spaink b858eb962a
Added Glob pattern matching for "Windows Services" plugin (#8575)
* Allow glob patterns in config

* Update README

* Move creating filter to init

* Need to explictly call init

Co-authored-by: Bas <3441183+BattleBas@users.noreply.github.com>
2020-12-16 14:32:29 -06:00
Anthony Arnaud 045c3c18b8
Add prometheus remote write serializer (#8360) 2020-12-16 14:11:05 -05:00
Kush 945b556330
Typo in INPUTS.md (#8573) 2020-12-16 13:23:50 -05:00
Vyacheslav Stepanov b64c38bb00
Remove duplicated field "revision" from ecs_task because it's already defined as a tag there (#8574) 2020-12-16 13:23:31 -05:00
vhqtvn 8e08da1889
fix crash when socket_listener receiving invalid data (#8551)
Co-authored-by: Hoa Nguyen Van <vanhoa@vhn.vn>
2020-12-15 13:52:48 -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
Oleksandr 21253ecae1
Add per user metrics to mysql input (#6132) 2020-12-15 08:59:52 -07:00
Harsh Seth ca7e3ff322
Fix typo in CONTRIBUTING.md (#8528) 2020-12-14 15:36:05 -07:00
Vyacheslav Stepanov 0fe2386494
Fixing issue with missing metrics when pod has only pending containers (#8472)
Also added Pod Phase and Pod Reason fields
fixes #8347

Co-authored-by: Vyacheslav-Stepanov <Vyacheslav_Stepanov@epam.com>
2020-12-11 09:08:30 -05:00
Joshua Gross a063f9d7f7
fix edge case in aerospike plugin where an expected hex string was converted to integer if all digits (#8542) 2020-12-10 17:38:21 -05:00
Steven Soroka 7d3b7fc2f9 Update changelog
(cherry picked from commit f88373afa465bd7e4e4cd9030115238582166b80)
2020-12-10 17:25:08 -05:00
Sven Rebhan 34151c47a6
[inputs.github] Add query of pull-request statistics (#8500) 2020-12-10 15:23:57 -05:00
MaciejMis 9166a16577
New Intel PowerStat input plugin (#8488) 2020-12-10 13:23:27 -07:00
Joe Wang 99287d89e0
Update string parsing of allocatable cpu cores in kube_inventory (#8512) 2020-12-10 12:38:01 -07:00
Steven Soroka d79a2464d3 docs update 2020-12-10 13:21:58 -05:00
Steven Soroka a96c8b49e4 disable flakey grok test for now 2020-12-10 13:20:37 -05:00
Pontus Rydin 6062265f94
Fixed misspelled check for datacenter (#8505) 2020-12-10 12:02:36 -05:00
alespour d3031a467d
feat: add build number field to jenkins_job measurement (#8038) 2020-12-10 12:02:07 -05:00
Frank Riley 97de3981bd
Add percentiles to the ping plugin (#7345) 2020-12-09 10:54:51 -07:00
bhsu-ms 752a4b77e1
Added tags for monitoring readable secondaries for Azure SQL MI (#8369) 2020-12-08 15:42:31 -05:00
Avinash Nigam e687cd7a5f
SQL Server HA/DR Availability Group queries (#8379) 2020-12-08 15:40:11 -05:00
Sven Rebhan d712bd13d6
Add initialization example to mock-plugin. (#8520) 2020-12-07 17:43:15 -05:00
Wiard van Rij 139498937a
Add support to convert snmp hex strings to integers (#8426) 2020-12-07 14:45:06 -07:00
Joe Wang 97469f6d85
Update kube_inventory readme (#8510) 2020-12-07 13:59:32 -05:00
reimda 73986acc87
Update circleci mac golang version (#8516) 2020-12-04 16:53:57 -07:00
David Bennett f7950be107
Adding support for new lines in influx line protocol fields. (#8499) 2020-12-04 16:47:58 -05:00
David Bennett 2187baceea
Add configurable Max TTL duration for statsd input plugin entries (#8509)
* Adding max TTL duration for all metric caches in the statsd input plugin

* Update README.md

was missing type in readme
2020-12-04 14:39:00 -05:00
Paweł Żak 7c5754ef8d
Fix carbon2 tests (#8254) 2020-12-04 12:37:18 -05:00
Helen Weller ef6ce2c9d9
fixed network test (#8498) 2020-12-04 12:08:11 -05:00
Stephanie Engel 7f3773e8e7
Add configurable timeout to bind input plugin http call (#8508) 2020-12-03 13:42:50 -06:00