Telegraf-Interval issue

Hi All,

I have added more than 50 devices in Inputs.SNMP plugin, but there is almost 1-2 hours delay to push the data to InfluxDB. I dont see any issues on the time zone as it was setup accurately.
Could one of you please confirm if I need to modify anything within Telegraf plugin?
Here is my current configuration of Telegraf for Inputs.snmp

round_interval = true
metric_batch_size = 10000
metric_buffer_limit = 100000
interval = “30s”
flush_interval = “1m”

Can you please check with telegraf ... --test to see if this is an issue with batching the outputs!?

Thank you Srebhan for your response. I did executed the telegraf…–test for specific conf file, however the data still shows almost an hour delay in InfluxDB.

Considering 50+ servers in same telegraf plugin, associated with lot of mib files, not sure if this causing an issue in executing all mib files.

I don’t think the amount is an issue as we have people querying hundreds of servers with one instance. Anyhow, are you sure it is a delay or can it be a timezone or clock issue? In InfluxDB the times are stored as UTC. Is the clock of the telegraf machine set correctly?

However it is surely not recommended to add 50 agents in 1 snmp input plugin, advised is to split that over multiple input configs. See also Telegraf Best Practices: SNMP Plugin | InfluxData.

What do you get if you convert the timestamp from one of your results in the --test output on a website like www.unixtimestamp.com? Does it say a few seconds ago?

Thank you @Hipska for your response, even I am planning to spilt the agents based on the region wise. I will keep you an update once I validate the output. Thanks

Did you already check with a unix timestamp converter?

May I know where I can validate the unix timestamp converter within Telegraf.

Today I tried to split the files, there are 4 files added and each file has 10 agents with following interval configuration. But still I am getting same error.

interval = “60s”
metric_batch_size = 50000
flush_interval = “20s”

Error: [inputs.snmp] Collection took longer than expected; not complete after interval of 1m0s

Simple: If you run telegraf with --test you will see the metrics it collected. The last part is the timestamp, copy that and paste it into www.unixtimestamp.com and click convert. Look what is in the section “Relative”.

About your snmp error; It means that one of those 10 devices are not responding in time.
Some tips:

  • You don’t need to split the configs over multiple files, it can be all in one file.
  • Add an descriptive alias to each input, then you can see in the error which one exactly is having issues.

As per Telegraf Best Practices, I have split the SNMP agents into multiple files, and now each telegraf.conf file has 10 agents in inputs.snmp.

I did extended the interval time upto 150sec but still getting same error from all 4 files.

telegraf: 2023-03-29T10:46:00Z W! [inputs.snmp] Collection took longer than expected; not complete after interval of 2m0s
telegraf: 2023-03-29T10:46:00Z W! [inputs.snmp] Collection took longer than expected; not complete after interval of 2m0s
telegraf: 2023-03-29T10:46:00Z W! [inputs.snmp] Collection took longer than expected; not complete after interval of 2m0s
telegraf: 2023-03-29T10:46:00Z W! [inputs.snmp] Collection took longer than expected; not complete after interval of 2m0s

Yeah, if they all have 1 problematic device, then there’s no way to find out until you split them or disable device one by one.

I tested by adding individual agent in the input.snmp, but getting same error for all 10 agent. Please advise me further on this. Thanks

metric_batch_size = 50000
metric_buffer_limit = 100000
collection_jitter = “0s”^M
flush_interval = “60s”
flush_jitter = “50s”^M
timeout = “25s”
retries = 1
interval = “90s”

Can you please paste the exact config in code blocks please?

@Hipska I have updated the details in code blocks of entire configuration, but after few min it got removed automatically, and currently it shows Akismet has temporarily hidden your post.

Please let me know if I can share the configuration details in same post

I can’t open the link you provided, but only the relevant part of the config is needed.

Please put it in code blocks, it is unreadable like this.

@Hipska I uploaded the configuration in the portal. please check and let me know further details.

Please I did uninstalled the existing version and installed the latest version of 1.26 but issue remains same.

What portal are you talking about? The link you provided doesn’t work.

previously you have told me to paste the exact config in code blocks, when I click that link it is opened Select the programming language used in code blocks - users - Discourse Meta URL.

Please let me know where exactly you want me to share the configuration details. Since I already shared in the same community earlier.

That was just a link explaining how code blocks work. Of course we want you to share the config in code blocks in this thread here on influxdata community.