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

Telegraf 1.19 - statsd plugin stops processing after receiving malformed stats #9422

Closed
blamarvt opened this issue Jun 23, 2021 · 0 comments · Fixed by #9423
Closed

Telegraf 1.19 - statsd plugin stops processing after receiving malformed stats #9422

blamarvt opened this issue Jun 23, 2021 · 0 comments · Fixed by #9423
Labels
area/statsd bug unexpected problem or unintended behavior regression something that used to work, but is now broken

Comments

@blamarvt
Copy link
Contributor

blamarvt commented Jun 23, 2021

Relevant telegraf.conf:

[[inputs.statsd]]
# Anything 

System info:

Ubuntu 18.04 LTS
telegraf - 1.19.0-1

Docker

Not applicable

Steps to reproduce:

  1. Start telegraf using a statsd input.
  2. Send malformed stats to port 8125
#!/bin/bash
echo "test.service.stat.missing_value:|h" | nc -w 1 -u telegraf.server.local 8125

Expected behavior:

In previous versions of telegraf this error would happen:

2021-06-23T14:34:05Z E! [inputs.statsd] Parsing value to float64, unable to parse metric: test.service.stat.missing_value:|h

Actual behavior:

2021-06-23T14:40:15Z E! [inputs.statsd] Parsing value to float64, unable to parse metric: test.service.stat.missing_value:|h
2021-06-23T14:40:15Z E! [inputs.statsd] Error in plugin: error parsing statsd line
2021-06-23T14:40:15Z E! [inputs.statsd] Parsing value to float64, unable to parse metric: test.service.stat.missing_value:|h
2021-06-23T14:40:15Z E! [inputs.statsd] Error in plugin: error parsing statsd line
2021-06-23T14:40:15Z E! [inputs.statsd] Parsing value to float64, unable to parse metric: test.service.stat.missing_value:|h
2021-06-23T14:40:15Z E! [inputs.statsd] Error in plugin: error parsing statsd line
2021-06-23T14:40:25Z E! [inputs.statsd] Parsing value to float64, unable to parse metric: test.service.stat.missing_value:|h
2021-06-23T14:40:25Z E! [inputs.statsd] Error in plugin: error parsing statsd line
2021-06-23T14:40:25Z E! [inputs.statsd] Parsing value to float64, unable to parse metric: test.service.stat.missing_value:|h
2021-06-23T14:40:25Z E! [inputs.statsd] Error in plugin: error parsing statsd line
2021-06-23T14:42:47Z E! [inputs.statsd] Statsd message queue full. We have dropped 1 messages so far. You may want to increase allowed_pending_messages in the config

Additional info:

This section of code was added as part of PR #8992:

This causes the parser goroutine loop...

for i := 1; i <= parserGoRoutines; i++ {
// Start the line parser
s.wg.Add(1)
go func() {
defer s.wg.Done()
if err := s.parser(); err != nil {
ac.AddError(err)
}
}()
}

... to exit which causes the input channel to fill up (as no statsd stats will be processed until the service gets restarted).

@blamarvt blamarvt added the bug unexpected problem or unintended behavior label Jun 23, 2021
@reimda reimda added the regression something that used to work, but is now broken label Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/statsd bug unexpected problem or unintended behavior regression something that used to work, but is now broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants