Closed charlienegri closed 2 months ago
local test seems to expose the metrics at least
@magnarem this should not conflict with the catalog-rebuilder-flask metrics endpoint right? because dmci has its own container port (8000) as far as I understand, and that's where these /metrics will end up
I think it should be no problem. The k8s nginx in front of dmci, should handle request dmci.s-enda.k8s.met.no/metrics og catalog-rebuilder.s-enda.k8s.met.no/metrics to the right ones...If unsure, maybe the k8s people can give a better answer.
the path label can be used to discriminate the endpoint
I think we'll need to add annotations to the base/dmci/statefulset.yaml
in the tjeneste repo for the metrics to be actually scraped, as there are for catalog-rebuilder-flask
, basically identical lines but just with a changed port, should be 8000 if I read the code right
Yes, for promethues to see the metrics, you will have to add the right anotations.
The dmci pod did not start properly.
Here is the error from the dmci startup log:
ModuleNotFoundError: No module named 'prometheus_flask_exporter'
You will need to add the prometheus_flask_exporter
dependency to the setup.cfg
for the installer to install this module.
Add it under: install_requires =
🙃 I added it to the requirements file and forgot about that ... I will open a PR to fix this
Summary: extract metrics via prometheus_flask_exporter
Related issue:
220
Suggested reviewer(s):
Reviewer checklist:
The checklist is based on the S-ENDA conventions and definition of done (see General Conventions). The above points are not necessarily relevant to all contributions. In that case, please add a short explanation to help the reviewer.