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

Integration tests for Prometheus Remote Write #9166

Closed
14 of 17 tasks
jessingrass opened this issue Apr 21, 2021 · 2 comments
Closed
14 of 17 tasks

Integration tests for Prometheus Remote Write #9166

jessingrass opened this issue Apr 21, 2021 · 2 comments
Assignees
Labels
area/prometheus feature request Requests for new plugin and for new features to existing plugins

Comments

@jessingrass
Copy link
Contributor

jessingrass commented Apr 21, 2021

Prometheus remote write compliance test cases:

Test output:

=== CONT  TestRemoteWrite/telegraf/Invalid
    up.go:39: 
                Error Trace:    up.go:39
                                                        main_test.go:94
                                                        main_test.go:62
                Error:          Should be true
                Test:           TestRemoteWrite/telegraf/Invalid
                Messages:       found zero samples for up{job="test"}
=== CONT  TestRemoteWrite/telegraf/Staleness
    staleness.go:43: 
                Error Trace:    staleness.go:43
                                                        main_test.go:94
                                                        main_test.go:62
                Error:          Should be true
                Test:           TestRemoteWrite/telegraf/Staleness
                Messages:       found no staleness markers for stale{job="test"}
=== CONT  TestRemoteWrite/telegraf/Up
    up.go:23: 
                Error Trace:    up.go:23
                                                        main_test.go:94
                                                        main_test.go:62
                Error:          Should be true
                Test:           TestRemoteWrite/telegraf/Up
                Messages:       found zero samples for up{job="test"}
@jessingrass jessingrass added the feature request Requests for new plugin and for new features to existing plugins label Apr 21, 2021
@helenosheaa helenosheaa self-assigned this Apr 22, 2021
@ssoroka
Copy link
Contributor

ssoroka commented Apr 22, 2021

So I don't understand how Telegraf could ever reasonably generate Staleness markers. We could do this on a time-delay basis, but this doesn't provide any actual information about whether the metric has gone away or is just missing from the reported data. Telegraf is merely relaying data from elsewhere and knows nothing about the underlying data in a metric.

A Telegraf prometheus output would not now when a scrape fails, nor would it know about the collection interval, so it has no reasonable way to interleave staleness markers. It's also not reasonable for a Prometheus input to generate the staleness markers, as these would end up going to all outputs, even non-prometheus ones, where they have dubious value and meaning.

@helenosheaa
Copy link
Member

Closing as we have fixed the tests that are in line with how Telegraf works. If more work to be done on this can reopen this or open a new separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prometheus feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

3 participants