influxdata / influxdata/telegraf
inputs.consul: Connections to consul reach maximum allowed
@srebhan is already working on this.
Since Jun 9, 2026.
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Relevant telegraf.conf
```toml
[[inputs.consul]]
address = "127.0.0.1:8500"
namedrop = ["consul_health_checks"]
scheme = "http"
tagexclude = ["project_*"]
[inputs.consul.tags]
datacenter = "foo"
influxdb_database = "consul"
```
### Logs from Telegraf
```text
2022-10-31T14:17:38Z W! [inputs.consul] Use of deprecated configuration: 'metric_version = 1'; please update to 'metric_version = 2'
```
### System info
telegraf-1.24.2-1.x86_64 rpm on RHEL 7 & 8
### Docker
_No response_
### Steps to reproduce
1. `lsof -nP | grep 127.0.0.1:8500 | cut -d ' ' -f 1 | sort | uniq -c`
2. ``kill -HUP `/sbin/pidof /usr/bin/telegraf` ``
Repeat the above over an over.
### Expected behavior
The initial values should stay stable, like they do when no SIGHUP is being sent:
```
24 consul
12 telegraf
```
... re-running the lsof command shows no increase, even after hours or days.
### Actual behavior
After each SIGHUP, both counts grow after a few seconds:
```
36 consul
24 telegraf
```
```
48 consul
39 telegraf
```
```
60 consul
52 telegraf
```
```
72 consul
65 telegraf
```
### Additional info
This seems to have already been reported in #7554 but closed as having gone away. We have been seeing this behavior with various versions of consul (1.11, 1.12 and the latest 1.13) as well as with various versions of telegraf (1.22 and now 1.24 to check it was reproducible with the latest version).
The current consul default is to allow only 200 connections from the same IP address. Because SIGHUP is being sent to telegraf each day after rotating logs in our environment, we sometimes end up with consul no longer accepting any connections from 127.0.0.1, triggering our monitoring alerts and breaking some scripts. Restarting telegraf fixes the problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.