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

Add prometheus exporter to the gateway #359

Merged
merged 6 commits into from
Jan 16, 2024
Merged

Conversation

pcuzner
Copy link
Contributor

@pcuzner pcuzner commented Jan 10, 2024

This is a follow-up PR to #344 to introduce an embedded Prometheus exporter to the gateway.

Signed-off-by: Paul Cuzner pcuzner@ibm.com

@pcuzner pcuzner requested a review from epuertat January 10, 2024 03:45
Copy link
Member

@epuertat epuertat left a comment

Choose a reason for hiding this comment

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

Just a minor comment on the yield inside the lock context manager. Everything else looks good to me! Thanks for recovering this!

control/prometheus.py Show resolved Hide resolved
@pcuzner pcuzner marked this pull request as ready for review January 10, 2024 21:43
Copy link
Collaborator

@baum baum left a comment

Choose a reason for hiding this comment

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

lgtm 🖖

Signed-off-by: Paul Cuzner <pcuzner@ibm.com>
Signed-off-by: Paul Cuzner <pcuzner@ibm.com>

update lock

Signed-off-by: Paul Cuzner <pcuzner@ibm.com>
conf sample includes the settings available which
change the behavior of the embedded prometheus
exporter.

Signed-off-by: Paul Cuzner <pcuzner@ibm.com>
This module provides an embedded prometheus exporter
to provide metadata and stats to a prometheus server.

Signed-off-by: Paul Cuzner <pcuzner@ibm.com>
Main server module now optionally starts the embedded
prometheus exporter

Signed-off-by: Paul Cuzner <pcuzner@ibm.com>
Signed-off-by: Paul Cuzner <pcuzner@ibm.com>
@gbregman gbregman merged commit 86784d0 into ceph:devel Jan 16, 2024
15 checks passed
@gbregman
Copy link
Contributor

@pcuzner I noticed the following line in the log:

ceph-nvmeof-nvmeof-1  | ERROR:control.prometheus:Unable to start prometheus exporter - missing cert/key file(s)

How do we get such files?

@pcuzner
Copy link
Contributor Author

pcuzner commented Jan 20, 2024

hi @gbregman !

The default is to expect the ssl files to be in place. For testing, the easiest thing to do is switch to http mode with prometheus_exporter_ssl = False in the ceph-nvmeof.conf file.

Alternatively, you could create a crt and key file in the project folder and add them to the docker-compose.yml (around L121) so the container has access to them allowing the exporter to run in https mode.

@caroav
Copy link
Collaborator

caroav commented Jan 24, 2024

@pcuzner what is the expected behavior when deploying with cephadm? Do we expect the cephadm to created the crt and key file and update the path in the config file?

@pcuzner
Copy link
Contributor Author

pcuzner commented Jan 24, 2024

@epuertat wanted the exporter secure by default, so I assumed that deployment was already secure by default.

Changes will be needed in cephadm to a) add the exporter endpoint to the prometheus instance b) create and map the server crt/key and client crt/key too - if this is not already done.

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

Successfully merging this pull request may close these issues.

5 participants