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

feat: Add servicemonitor switch for metrics acquisition #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CoderTH
Copy link
Contributor

@CoderTH CoderTH commented Feb 20, 2024

The servicemonitor switch is added to collect indicators

@archlitchi
Copy link
Collaborator

could your provide a document regarding this feature?

@CoderTH
Copy link
Contributor Author

CoderTH commented Feb 22, 2024

could your provide a document regarding this feature?

OK, I will add some document content and open some other parameter settings for servicemonitor.

Copy link
Contributor

@chaunceyjiang chaunceyjiang left a comment

Choose a reason for hiding this comment

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

Good work, but I think introducing serviceMonitor will force the installation of corresponding CRD resources.

Therefore, I highly recommend using the following method to expose metrics.
Expose the corresponding metrics on annotations.

    prometheus.io/scrape: "true"
    prometheus.io/port: {{ .Values.device-plugin.prometheus.port | quote }}

@CoderTH
Copy link
Contributor Author

CoderTH commented Apr 10, 2024

干得好,但我认为引入serviceMonitor会强制安装相应的 CRD 资源。

因此,我强烈建议使用以下方法来公开指标。 在 上公开相应的指标annotations

    prometheus.io/scrape: "true"
    prometheus.io/port: {{ .Values.device-plugin.prometheus.port | quote }}

The advantage of using servicemonitor is that users can use servicemonitor to do some processing on metrics, such as replacing label, etc., but I'm not sure if I have this ability in this way of annotation.

@chaunceyjiang
Copy link
Contributor

chaunceyjiang commented Apr 10, 2024

such as replacing label,

Got you.

https://github.com/cilium/cilium/blob/main/install/kubernetes/cilium/values.yaml#L1024-L1054
Perhaps we can refer to some graduate projects to see how they are done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants