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

Prometheus metrics #144

Merged
merged 7 commits into from
Jun 11, 2024
Merged

Prometheus metrics #144

merged 7 commits into from
Jun 11, 2024

Conversation

staffoleo
Copy link
Contributor

This pr fix an issue with the local keystore and add health-checks and prometheus metrics

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mind enabling the management endpoints by default. Can it be split in a separate configuration? A specific spring profile may do it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Have you gave it a try with the current version in Master ?
Then only endpoints visible with current version of the Mag on the Master are:

PS C:\Windows\System32> curl http://localhost:9090/actuator
{"_links":{"self":{"href":"http://localhost:9090/actuator","templated":false},"health":{"href":"http://localhost:9090/actuator/health","templated":false},"health-path":{"href":"http://localhost:9090/actuator/health/{*path}","templated":true}}}

To have more you have to enable and expose, what we did is a proposal, because, none of the endpoints needed for Kubernetes are exposed by default, to the availability and the readiness.

If you noticed in the PR, maybe it should not be put like that, because you have too many endpoints exposed and that might not be desirable.

For Prometheus we draw your attention that an extra reference was needed in the POM, without that the endpoint will not appear, but how should we take this forward?

We can have a quick synch if that makes sense.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why a new keystore in main?

Copy link
Contributor

Choose a reason for hiding this comment

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

I modified it also in the last commit, to use the test keystore and not the one in main.

@@ -6,7 +6,7 @@ mag:
client-ssl:
enabled: true
key-store:
path: example-client-certificate.jks
path: src/main/resources/keystore.jks
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should it not use a test keystore?

@lfdesousa
Copy link
Contributor

Hi Quentin, first of all thank you for your time last Friday.
I did the requested changes in our Repo, and you have them below:
swisspost@71de057
Basically in the default profile I kept, the health endpoint with the addition of those for Kubernetes.
In the metrics profile, I created only the prometheus and metrics endpoints and exposed them.
To use it we need to explicitly set the needed profile.

… endpoints. Enabled in the default profile the kubernertes specific endpoints and removed all the other exposed endpoints.
@lfdesousa
Copy link
Contributor

Fyi, I just did a push in the branch where the changes were requested, can you please have a look at it ?

@qligier qligier merged commit f32febf into i4mi:master Jun 11, 2024
3 checks passed
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