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.exporter.snmp #954

Closed
ptodev opened this issue May 29, 2024 · 0 comments · Fixed by #969
Closed

Integration tests for prometheus.exporter.snmp #954

ptodev opened this issue May 29, 2024 · 0 comments · Fixed by #969
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ptodev
Copy link
Contributor

ptodev commented May 29, 2024

Request

It would be good to have SNMP integration tests in internal/cmd/integration-tests/tests/. The test would start an SNMP simulator, and check if metrics are received by Mimir. This is similar to other tests that we have like the Redis one.

There are also public SNMP endpoints which could be used for manual testing, but it wouldn't be a good practice to use them in a CI. For example, this config calls a public endpoint:

prometheus.exporter.snmp "snmp_metrics" {
  target "testing1" {
    address = "demo.pysnmp.com"
    module = "if_mib"
    auth = "public_v2"
  }
}

prometheus.scrape "snmp_metrics" {
  targets    = prometheus.exporter.snmp.snmp_metrics.targets
  forward_to = [prometheus.remote_write.snmp_metrics.receiver]
  scrape_interval = "5s"
  scrape_timeout = "500ms"
}

prometheus.remote_write "snmp_metrics" {
  ...
}

The config for prometheus.exporter.snmp could be as simple as possible. The main goal of this issue is to bootstrap the test framework. The simulator is in Python and AFAIK it doesn't come in Docker containers, so I'm not sure how we will run it in the Alloy CI.

Use case

Improving the test coverage :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants