Repository navigation
Closed
Labels
bugunexpected problem or unintended behavior
Description
Relevant telegraf.conf
[agent]
omit_hostname = true
[[inputs.kapacitor]]
urls = [
"http://localhost:9094/kapacitor/v1/debug/vars",
"http://localhost:9095/kapacitor/v1/debug/vars",
]
[[outputs.file]]
files = ["stdout"]Logs from Telegraf
$ telegraf --config kapacitor-test.conf --debug --once
2026-03-31T20:04:28Z W! Strict environment variable handling will be the new default starting with v1.38.0! If your configuration works with strict handling or you don't use environment variables it is safe to ignore this warning. Otherwise please explicitly add the --non-strict-env-handling flag!
2026-03-31T20:04:28Z I! Loading config: kapacitor-test.conf
2026-03-31T20:04:28Z I! Starting Telegraf 1.37.0 brought to you by InfluxData the makers of InfluxDB
2026-03-31T20:04:28Z I! Available plugins: 243 inputs, 9 aggregators, 35 processors, 26 parsers, 67 outputs, 8 secret-stores
2026-03-31T20:04:28Z I! Loaded inputs: kapacitor
2026-03-31T20:04:28Z I! Loaded aggregators:
2026-03-31T20:04:28Z I! Loaded processors:
2026-03-31T20:04:28Z I! Loaded secretstores:
2026-03-31T20:04:28Z I! Loaded outputs: file
2026-03-31T20:04:28Z I! Tags enabled:
2026-03-31T20:04:28Z W! [agent] The default value of 'skip_processors_after_aggregators' will change to 'true' with Telegraf v1.40.0! If you need the current default behavior, please explicitly set the option to 'false'!
2026-03-31T20:04:28Z D! [agent] Initializing plugins
2026-03-31T20:04:28Z D! [agent] Connecting outputs
2026-03-31T20:04:28Z D! [agent] Attempting connection to [outputs.file]
2026-03-31T20:04:28Z D! [agent] Successfully connected to outputs.file
2026-03-31T20:04:28Z D! [agent] Starting service inputs
2026-03-31T20:04:28Z D! [agent] Stopping service inputs
2026-03-31T20:04:28Z D! [agent] Input channel closed
2026-03-31T20:04:28Z I! [agent] Hang on, flushing any cached metrics before shutdown
kapacitor_memstats,kap_version=1.7.6,url=http://localhost:9094/kapacitor/v1/debug/vars heap_idle_bytes=2605056i,heap_released_bytes=2482176i,lookups=0i,total_alloc_bytes=40580320i,mcache_in_use_bytes=14400i,other_sys_bytes=2365823i,stack_in_use_bytes=983040i,sys_bytes=50156808i,alloc_bytes=33686376i,buck_hash_sys_bytes=1469249i,gc_cpu_fraction=0.03901761404026907,heap_in_use_bytes=38338560i,heap_objects=139466i,mallocs=249736i,mcache_sys_bytes=15600i,next_gc_ns=57431920i,frees=110270i,heap_sys_bytes=40943616i,last_gc_ns=1774987461984352445i,mspan_in_use_bytes=440160i,mspan_sys_bytes=440640i,num_gc=4i,pause_total_ns=956550i,stack_sys_bytes=983040i,gc_sys_bytes=3938840i,heap_alloc_bytes=33686376i 1774987468000000000
kapacitor,kap_version=1.7.6,url=http://localhost:9094/kapacitor/v1/debug/vars num_tasks=0i,num_enabled_tasks=0i,num_subscriptions=0i 1774987468000000000
kapacitor_edges,child=stream,parent=write_points,task=task_master:main,type=stream emitted=0,collected=0 1774987468000000000
kapacitor_load errors=0 1774987468000000000
kapacitor_edges,child=stream,parent=stats,task=task_master:main,type=stream emitted=0,collected=0 1774987468000000000
kapacitor_memstats,kap_version=1.7.6,url=http://localhost:9095/kapacitor/v1/debug/vars mspan_in_use_bytes=423360i,other_sys_bytes=2007183i,stack_sys_bytes=950272i,frees=67175i,heap_alloc_bytes=35262576i,heap_released_bytes=2441216i,stack_in_use_bytes=950272i,sys_bytes=49632520i,alloc_bytes=35262576i,gc_cpu_fraction=0.033350419655571915,gc_sys_bytes=3790832i,heap_sys_bytes=40976384i,mcache_sys_bytes=15600i,next_gc_ns=57362240i,num_gc=4i,pause_total_ns=386646i,heap_idle_bytes=2539520i,heap_in_use_bytes=38436864i,heap_objects=182622i,last_gc_ns=1774987463989927524i,mspan_sys_bytes=424320i,total_alloc_bytes=40575216i,buck_hash_sys_bytes=1467929i,lookups=0i,mallocs=249797i,mcache_in_use_bytes=14400i 1774987468000000000
kapacitor,kap_version=1.7.6,url=http://localhost:9095/kapacitor/v1/debug/vars num_enabled_tasks=0i,num_subscriptions=0i,num_tasks=0i 1774987468000000000
kapacitor_edges,child=stream,parent=write_points,task=task_master:main,type=stream collected=0,emitted=0 1774987468000000000
kapacitor_load errors=0 1774987468000000000
kapacitor_edges,child=stream,parent=stats,task=task_master:main,type=stream collected=0,emitted=0 1774987468000000000
2026-03-31T20:04:28Z D! [outputs.file] Wrote batch of 10 metrics in 125.223µs
2026-03-31T20:04:28Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2026-03-31T20:04:28Z I! [agent] Stopping running outputs
2026-03-31T20:04:28Z D! [agent] Stopped Successfully
System info
Telegraf 1.37.0, Ubuntu 22.04, Kapacitor 1.7.6
Docker
No response
Steps to reproduce
- Start two or more Kapacitor instances
- Run Telegraf with a single Kapacitor input plugin configured to gather metrics from these Kapacitor instances
Expected behavior
All generated metrics should be tagged with the corresponding Kapacitor instance url.
Actual behavior
Only some of the generated metrics are tagged with the corresponding Kapacitor instance url. Metrics such as kapacitor_ingress are missing the url tag and cannot be identified to an instance.
Additional info
Docker Kapacitor config file used to test:
hostname = "localhost"
data_dir = "/var/lib/kapacitor"
[[influxdb]]
enabled = false
[storage]
boltdb = "/var/lib/kapacitor/kapacitor.db"
[replay]
dir = "/var/lib/kapacitor/replay"Docker commands to run two Kapacitor instances:
$ docker run -p 9095:9092 -v ./conf:/etc/kapacitor -d kapacitor
$ docker run -p 9094:9092 -v ./conf:/etc/kapacitor -d kapacitorWorkaround:
Use a single [[inputs.kapacitor]] block per Kapacitor instance with hardcoded tags
[[inputs.kapacitor]]
urls = [
"http://localhost:9094/kapacitor/v1/debug/vars",
]
[inputs.kapacitor.tags]
url = "http://localhost:9094/kapacitor/v1/debug/vars"
[[inputs.kapacitor]]
urls = [
"http://localhost:9095/kapacitor/v1/debug/vars",
]
[inputs.kapacitor.tags]
url = "http://localhost:9095/kapacitor/v1/debug/vars"Metadata
Metadata
Assignees
Labels
bugunexpected problem or unintended behavior
Activity
inputs/kapacitor: always tag nested metrics with the source URL