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

Replace 'retina-pods' scrape config with ServiceMonitor #847

Open
mereta opened this issue Oct 11, 2024 · 0 comments
Open

Replace 'retina-pods' scrape config with ServiceMonitor #847

mereta opened this issue Oct 11, 2024 · 0 comments

Comments

@mereta
Copy link
Contributor

mereta commented Oct 11, 2024

Current State
retina-agent pods are being scraped by an additional prometheus scrape config.

Image

ServiceMonitor support was added in this PR: #695
Using ServicMonitors should be the recommended way for adding scrape jobs

Proposed Update:
Replace 'retina-pod's job scrape with ServiceMonitor.

  • remove additional config
  • enable serviceMonitor
  • apply necessary relabelings to align with retina-pods job
  • update necessary manifests to enable ServiceMonitor

Image

github-merge-queue bot pushed a commit that referenced this issue Oct 15, 2024
# Description

Adding a ServiceMonitor for retina-operator
* parameterized & applied retina-operator name
* adding service & serviceMonitor CRD's for retina-operator
* applied appropriate relabeling & metric relabeling config to align
with retina-jobs additional scrape config

## Related Issue

retina-operator wasn't being scraped for metrics by prometheus.
Initially it was appearing in the 'retina-pods' job and failing as
reported in this issue:
#738 


Partial fix was merged to remove the operator pod from the list here:
#770

## Checklist

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [x] I have followed the project's style guidelines.
- [x] I have updated the documentation, if necessary.
- [x] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed


![image](https://github.com/user-attachments/assets/b1722546-d013-4ab3-8565-1c0357eea0da)

Operator specific metrics with job='retina-operator' selector:


![image](https://github.com/user-attachments/assets/821bc2ae-3d16-40a5-a527-4b36ecbb82e4)


## Additional Notes

Proposed next steps is to align the way we add scrap configs:
#847

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant