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

Monitoring of prometheus-adapter metrics #636

Open
matthewjstanford opened this issue Jan 18, 2024 · 2 comments
Open

Monitoring of prometheus-adapter metrics #636

matthewjstanford opened this issue Jan 18, 2024 · 2 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@matthewjstanford
Copy link

What happened?:

I've got a set of custom metrics defined in prometheus-adapter. I was refactoring the source metrics in Prometheus (modifying labels) and inadvertently broke one of the custom metric in prometheus-adapter.

This specific custom metric was used by an HPA, along with CPU & Memory. When the custom metric stopped responding (returning a 404) the HPA went into the weeds and scaled the deployment way up. I believe this is mostly a bug in how the HPA handles missing metrics, but this really begs the question, how can I monitor the health of custom metrics provided by prometheus-adapter?

What did you expect to happen?:

I expected the prometheus-adapter to emit prometheus metrics itself. Something along these lines:

example metrics
# TYPE prometheus_adapter_custom_request_status_total gauge
prometheus_adapter_custom_request_status_total{metric="my_custom_metric", status="200"} 1
prometheus_adapter_custom_request_status_total{metric="my_inalid_custom_metric", status="404"} 2

# TYPE prometheus_adapter_external_request_status_total gauge
prometheus_adapter_external_request_status_total{metric="my_external_metric", status="200"} 5
prometheus_adapter_external_request_status_total{metric="my_invalid_external_metric", status="404"} 6

But I don't believe prometheus-adapter emits any metrics (hopefully I'm wrong!).

Having info like this would enable the ability to actively monitor the availability of critical custom metrics, such as the ones discussed above.

@matthewjstanford matthewjstanford added the kind/bug Categorizes issue or PR as related to a bug. label Jan 18, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jan 18, 2024
@matthewjstanford
Copy link
Author

It looks like I can monitor the availability of the prometheus-adapter metrics via a Horizontal Pod Autoscaler metric, kube_horizontalpodautoscaler_status_target_metric.

This is a bit backwards, IMO, but it at least provides a mechanism to monitor the metrics.

@dgrisonnet
Copy link
Member

/triage accepted
/assign

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants