Telegraf internal metrics query

Hello,
I am using Telegraf internal metrics to collect the input and output metrics and I have created a dashboard to track those in Grafana. I am getting input metrics from Kafka consumer where I have multiple brokers present and the output is InfluxDB.
My question is that why my output metrics are much higher than the input and internal metrics. As per my understanding, Output metrics should be equal to Input metrics +Internal metrics.

The first row shows metrics for last 24 hours and 2nd row shows metrics for last 1 hour.

My telegraf configuration looks like this:
[agent]
metric_batch_size = 16000
metric_buffer_limit = 300000
debug = false
precision= “1s”
interval = “1s”

Thanks for your help!

Are you sure there are no other metrics? Maybe post your exact queries to help investigate…


This is how my time -series graph looks like in InfluxDB.

As far as I have understood, metrics_gathered shows metrics being collected from kafka consumer into telegraf. And metrics written are the ones that are being written from Telegraf into InfluxDB.

Then why are metrics written much higher than metrics gathered?

Could you check what the values are in the metric internal_agent?

These are values for internal_agent for 2 setups:internal_5g_1 and internal_5g_2