uptime-kuma icon indicating copy to clipboard operation
uptime-kuma copied to clipboard

Add Dashboard ID to Prometheus Labels

Open bzon opened this issue 1 year ago • 1 comments

⚠️ Please verify that this feature request has NOT been suggested before.

  • [X] I checked and didn't find similar feature request

🏷️ Feature Request Type

API

🔖 Feature description

We are using the prometheus integration feature to make prometheus alertmanager send the alerts for us. The use case of having the ID as a prometheus label is we can use it to create a hyperlinked text in the alert message. E.g. https://uptime.example.com/dashboard/{{ .label.id }}

Existing label names can be found here https://github.com/louislam/uptime-kuma/wiki/Prometheus-Integration

✔️ Solution

Given I have a dashboard named Google with ID 23, I want to see the monitor_id in the the metric label.

monitor_status{monitor_name="Google",monitor_id="23"}

❓ Alternatives

N/A

📝 Additional Context

N/A

bzon avatar Sep 07 '22 12:09 bzon

+rep

51-PxC-51 avatar Sep 08 '22 12:09 51-PxC-51