Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dovecot regression in #9415 #9429

Merged
merged 1 commit into from Jun 24, 2021
Merged

Conversation

srebhan
Copy link
Contributor

@srebhan srebhan commented Jun 24, 2021

  • Updated associated README.md.
  • Wrote appropriate unit tests.

resolves #9415

This PR tries to resolve the regression above.

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Jun 24, 2021
@srebhan srebhan added the plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins label Jun 24, 2021
@popey
Copy link
Contributor

popey commented Jun 24, 2021

Thanks for the PR! This appears to fix the issue for me.

Before this patch:

2021-06-24T16:07:16Z E! [inputs.dovecot] Error in plugin: copying message failed for dovecot server '10.55.242.189:24242': read tcp 10.55.242.1:60994->10.55.242.189:24242: i/o timeout

After this patch:

> dovecot,host=ac,server=10.55.242.189,type=global auth_cache_hits=0i,auth_cache_misses=0i,auth_db_tempfails=0i,auth_failures=0i,auth_master_successes=0i,auth_successes=0i,clock_time=0,disk_input=0i,disk_output=0i,invol_cs=0i,mail_cache_hits=0i,mail_lookup_attr=0i,mail_lookup_path=0i,mail_read_bytes=0i,mail_read_count=0i,maj_faults=0i,min_faults=0i,num_cmds=0i,num_connected_sessions=0i,num_logins=0i,read_bytes=0i,read_count=0i,sys_cpu=0,user_cpu=0,vol_cs=0i,write_bytes=0i,write_count=0i 1624546810000000000

@srebhan srebhan marked this pull request as draft June 24, 2021 19:12
@popey
Copy link
Contributor

popey commented Jun 24, 2021

Here's the full output..

telegraf 1.18.3

$ ../telegraf-1.18.3/usr/bin/telegraf --debug --config etc/telegraf/telegraf.conf --test
2021-06-24T18:45:52Z I! Starting Telegraf 1.18.3
2021-06-24T18:45:52Z D! [agent] Initializing plugins
2021-06-24T18:45:52Z D! [agent] Starting service inputs
2021-06-24T18:45:57Z D! [agent] Stopping service inputs
2021-06-24T18:45:57Z D! [agent] Input channel closed
2021-06-24T18:45:57Z D! [agent] Stopped Successfully
> dovecot,host=ac,server=10.55.242.189,type=global auth_cache_hits=0i,auth_cache_misses=0i,auth_db_tempfails=0i,auth_failures=0i,auth_master_successes=0i,auth_successes=0i,clock_time=0,disk_input=0i,disk_output=0i,invol_cs=0i,mail_cache_hits=0i,mail_lookup_attr=0i,mail_lookup_path=0i,mail_read_bytes=0i,mail_read_count=0i,maj_faults=0i,min_faults=0i,num_cmds=0i,num_connected_sessions=0i,num_logins=0i,read_bytes=0i,read_count=0i,sys_cpu=0,user_cpu=0,vol_cs=0i,write_bytes=0i,write_count=0i 1624560357000000000

telegraf 1.19.0

$ usr/bin/telegraf --debug --config etc/telegraf/telegraf.conf --test
2021-06-24T18:40:00Z I! Starting Telegraf 1.19.0
2021-06-24T18:40:00Z D! [agent] Initializing plugins
2021-06-24T18:40:00Z D! [agent] Starting service inputs
2021-06-24T18:40:05Z E! [inputs.dovecot] Error in plugin: copying message failed for dovecot server '10.55.242.189:24242': read tcp 10.55.242.1:35066->10.55.242.189:24242: i/o timeout
2021-06-24T18:40:05Z D! [agent] Stopping service inputs
2021-06-24T18:40:05Z D! [agent] Input channel closed
2021-06-24T18:40:05Z D! [agent] Stopped Successfully
2021-06-24T18:40:05Z E! [telegraf] Error running agent: input plugins recorded 1 errors

This PR.

$ ../pr9429/telegraf-1.20.0/usr/bin/telegraf --debug --config etc/telegraf/telegraf.conf --test
2021-06-24T18:40:16Z I! Starting Telegraf 
2021-06-24T18:40:16Z D! [agent] Initializing plugins
2021-06-24T18:40:16Z D! [agent] Starting service inputs
copying message failed after 5.000958463s for dovecot server '10.55.242.189:24242': read tcp 10.55.242.1:35172->10.55.242.189:24242: i/o timeout  --> is net.Error (timeout=true)2021-06-24T18:40:21Z D! [agent] Stopping service inputs
2021-06-24T18:40:21Z D! [agent] Input channel closed
2021-06-24T18:40:21Z D! [agent] Stopped Successfully
> dovecot,host=ac,server=10.55.242.189,type=global auth_cache_hits=0i,auth_cache_misses=0i,auth_db_tempfails=0i,auth_failures=0i,auth_master_successes=0i,auth_successes=0i,clock_time=0,disk_input=0i,disk_output=0i,invol_cs=0i,mail_cache_hits=0i,mail_lookup_attr=0i,mail_lookup_path=0i,mail_read_bytes=0i,mail_read_count=0i,maj_faults=0i,min_faults=0i,num_cmds=0i,num_connected_sessions=0i,num_logins=0i,read_bytes=0i,read_count=0i,sys_cpu=0,user_cpu=0,vol_cs=0i,write_bytes=0i,write_count=0i 1624560022000000000

@srebhan srebhan marked this pull request as ready for review June 24, 2021 19:28
@popey
Copy link
Contributor

popey commented Jun 24, 2021

Latest update looks good.

$ ../pr9429v2/telegraf-1.20.0/usr/bin/telegraf --debug --config etc/telegraf/telegraf.conf --test
2021-06-24T19:50:16Z I! Starting Telegraf 
2021-06-24T19:50:16Z D! [agent] Initializing plugins
2021-06-24T19:50:16Z D! [agent] Starting service inputs
> dovecot,host=ac,server=10.55.242.189,type=global auth_cache_hits=0i,auth_cache_misses=0i,auth_db_tempfails=0i,auth_failures=0i,auth_master_successes=0i,auth_successes=0i,clock_time=0,disk_input=0i,disk_output=0i,invol_cs=0i,mail_cache_hits=0i,mail_lookup_attr=0i,mail_lookup_path=0i,mail_read_bytes=0i,mail_read_count=0i,maj_faults=0i,min_faults=0i,num_cmds=0i,num_connected_sessions=0i,num_logins=0i,read_bytes=0i,read_count=0i,sys_cpu=0,user_cpu=0,vol_cs=0i,write_bytes=0i,write_count=0i 1624564221000000000
2021-06-24T19:50:21Z D! [agent] Stopping service inputs
2021-06-24T19:50:21Z D! [agent] Input channel closed
2021-06-24T19:50:21Z D! [agent] Stopped Successfully

Copy link
Contributor

@reimda reimda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this PR works the same as before the linter change so we should take it to fix the regression.

We should investigate whether dovecot provides a newer metric api (this is called the "old" api in dovecot docs) that is easier to use and doesn't require ignoring the timeout

@reimda reimda merged commit e4bd01e into influxdata:master Jun 24, 2021
reimda pushed a commit that referenced this pull request Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dovecot input plugin] tcp read i/o timeout since telegraf 1.18.3 -> 1.19.0 update
4 participants