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: Enable prometheus tendermint metrics #96

Merged
merged 3 commits into from
Sep 6, 2022
Merged

Conversation

DavidNix
Copy link
Contributor

@DavidNix DavidNix commented Sep 1, 2022

Closes #19

Copy link
Contributor Author

@DavidNix DavidNix left a comment

Choose a reason for hiding this comment

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

@nourspace With the federated monitoring, am I missing anything?

I've set the typical prometheus annotations for each pod. The pod already has a port mapping to 26660.

@DavidNix DavidNix marked this pull request as ready for review September 1, 2022 15:24
@DavidNix DavidNix requested review from a team, joeabbey, agouin and nourspace and removed request for a team and joeabbey September 1, 2022 15:24
@nourspace
Copy link
Member

nourspace commented Sep 1, 2022

@nourspace With the federated monitoring, am I missing anything?

I've set the typical prometheus annotations for each pod. The pod already has a port mapping to 26660.

The new Prometheus Operator uses resources like PodMonitor and ServiceMonitor where we define selectors for the pods or monitors we want to be monitored. These monitors can define paths and ports among other settings like job relabeling, which we might need to distinguish instances across clusters.

You can refer to the cosmos-node-pod-monitor.yaml which I'm adding as part of the sub-monitoring stack deployment. We could also manage that monitor by the operator.

I'm using PodMonitor because we don't define a Prometheus service that loadbalances between pods. There is a long discussion on the difference.
prometheus-operator/prometheus-operator#3119

TLDR from one comment

PodMonitor - no service
ServieMonitor - must has service

The end result is the same. The pod endpoints will be the ones scraped and each pod adds its ip as an instance label to the scrapped metric.

API reference
https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PodMonitor

Labels are no longer supported by the operator
prometheus-operator/kube-prometheus#16 (comment)

@DavidNix
Copy link
Contributor Author

DavidNix commented Sep 6, 2022

@nourspace thanks for the detail and background. I'll remove the annotations. The user can customize pod annotations if they want to use this style.

@DavidNix
Copy link
Contributor Author

DavidNix commented Sep 6, 2022

@nourspace or @agouin This is ready for review again. Small one.

@DavidNix DavidNix merged commit 89bca28 into main Sep 6, 2022
@DavidNix DavidNix deleted the nix/feat/prometheus branch September 6, 2022 18:57
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.

CosmosFullNode enables prometheus metrics
2 participants