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

Robust testing for prometheus metrics in Agent and Controller #799

Closed
2 of 5 tasks
srikartati opened this issue Jun 4, 2020 · 5 comments · Fixed by #916 or #999
Closed
2 of 5 tasks

Robust testing for prometheus metrics in Agent and Controller #799

srikartati opened this issue Jun 4, 2020 · 5 comments · Fixed by #916 or #999
Assignees
Labels
area/test/e2e Issues or PRs related to Antrea specific end-to-end testing. area/test Issues or PRs related to unit and integration tests. enhancement New feature or request lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@srikartati
Copy link
Member

srikartati commented Jun 4, 2020

Describe the problem/challenge you have
Extend the existing e2e test or add new unit/integration tests if possible to check on the accuracy of metrics values.

Describe the solution you'd like
Currently, prometheus metrics are relying on manual tests. E2e test covers only whether metrics are available in output or not. The values of metrics should be checked for accuracy.
One possibility: testSetup in Prometheus e2e test can be extended to deploy/delete pods, create/delete network policies etc. At least metrics such as network policy, pod count can be covered. In addition, we may also antctl (tests/e2e/antctl_test) to get the expected values from the agent/controller to compare with metrics gathered by API.

Antrea agent metrics

  • pod count, ovs flow count
  • network policy count, rule count
  • ovs ops count

Antrea Controller Metrics

  • OpsAppliedToGroupProcessed, OpsAddressGroupProcessed, OpsInternalNetworkPolicyProcessed
  • LengthAppliedToGroupQueue, LengthAddressGroupQueue, LengthInternalNetworkPolicyQueue

Anything else you would like to add?
Testing is necessary to get the code right and will be easily maintainable if there are any future changes in existing code; it can be in non-metrics code as well that metrics depend on.
Preference is to add these as integration/unit tests, but not as a new e2e test.

@srikartati srikartati added enhancement New feature or request area/test Issues or PRs related to unit and integration tests. area/test/e2e Issues or PRs related to Antrea specific end-to-end testing. labels Jun 4, 2020
@antoninbas
Copy link
Contributor

Can this be tested with unit tests / integration tests so that we keep the number of e2e tests under control?

@srikartati
Copy link
Member Author

srikartati commented Jun 5, 2020

Can this be tested with unit tests / integration tests so that we keep the number of e2e tests under control?

Sure, Antonin. I updated the description with a note.

@srikartati
Copy link
Member Author

Assigning this to Yuki as he was planning to add tests for the metrics he worked on. Please let me know if that doesn't work for you @yktsubo

@yktsubo
Copy link
Contributor

yktsubo commented Jul 17, 2020

Thank you, I'll add tests for newly added agents metrics.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test/e2e Issues or PRs related to Antrea specific end-to-end testing. area/test Issues or PRs related to unit and integration tests. enhancement New feature or request lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
3 participants