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

Statsd datadog #5791

Merged
merged 13 commits into from
May 14, 2019
Merged

Statsd datadog #5791

merged 13 commits into from
May 14, 2019

Conversation

docmerlin
Copy link
Contributor

@docmerlin docmerlin commented May 1, 2019

closes #5224

This adds Datadog events to the Statsd input plugin.

@glinton glinton added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin area/statsd labels May 6, 2019
@docmerlin docmerlin marked this pull request as ready for review May 6, 2019 17:23
@danielnelson danielnelson requested a review from goller May 7, 2019 01:22
Copy link
Contributor

@goller goller left a comment

Choose a reason for hiding this comment

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

Overall looks good to me! I have a bunch of minor points.

plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Show resolved Hide resolved
plugins/inputs/statsd/README.md Outdated Show resolved Hide resolved
plugins/inputs/statsd/README.md Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
etc/telegraf.conf Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
if rawMetadataFields[i][0] == '#' {
parseDataDogTags(m.tags, rawMetadataFields[i][1:])
} else {
log.Printf("W! [inputs.statsd] unknown metadata type: '%s'", rawMetadataFields[i])
Copy link
Contributor

Choose a reason for hiding this comment

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

I think if the message is malformed an error should be returned up from here and then logged. Doing a best effort parse doesn't make sense unless we find that the datadog agent regularly emits bad messages.

if message[i] == ',' {
if k == "" {
k = message[start:i]
tags[k] = ""
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it is allowed to have an empty tag value in InfluxDB, we just toss them at serialize time.

plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog_test.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/README.md Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
@docmerlin docmerlin requested a review from goller May 9, 2019 16:45
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/datadog.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
plugins/inputs/statsd/README.md Outdated Show resolved Hide resolved
plugins/inputs/statsd/README.md Outdated Show resolved Hide resolved
plugins/inputs/statsd/statsd.go Outdated Show resolved Hide resolved
@danielnelson danielnelson added this to the 1.11.0 milestone May 14, 2019
@danielnelson danielnelson merged commit 8f3ed45 into master May 14, 2019
@danielnelson danielnelson deleted the statsd-datadog branch May 14, 2019 23:20
hwaastad pushed a commit to hwaastad/telegraf that referenced this pull request Jun 13, 2019
bitcharmer pushed a commit to bitcharmer/telegraf that referenced this pull request Oct 18, 2019
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/statsd feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for dogstatsd events
4 participants