From 0ad12fb2e1960d0cfd96657a2576847826219ab0 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Tue, 27 Jul 2021 23:01:40 +0800 Subject: [PATCH] Created [WIP] Prometheus Integration (markdown) --- [WIP]-Prometheus-Integration.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 [WIP]-Prometheus-Integration.md diff --git a/[WIP]-Prometheus-Integration.md b/[WIP]-Prometheus-Integration.md new file mode 100644 index 0000000..1808f85 --- /dev/null +++ b/[WIP]-Prometheus-Integration.md @@ -0,0 +1,26 @@ +# Passing metrics to other platforms + +If you already use [Prometheus.io](https://prometheus.io) or a platform that supports Prometheus exporter format, you can get the metrics about each monitoring target from `http://:/metrics`. + +Labels to filter by include: + +| Label Name | Description | ++------------+-------------+ +|monitor_name| The "Friendly Name" of the monitor | +|monitor_type| The type (HTTP, keyword, TCP) of monitoring check | +|monitor_url | The URL to be monitored (HTTP, keyword) +|monitor_hostname | The Hostname to be monitored (TCP) | +|monitor_port | The port to be monitored (TCP) | + +## Example PromQL queries + +Assuming we have HTTP monitors in place for bbc.co.uk and google.com: + +``` +# Show all response rates gouped by site +sum(monitor_response_time) by (monitor_name) +# Show only the response time for BBC.co.uk +sum(monitor_reponse_time{monitor_url="https://www.bbc.co.uk/"}) +# Show the current status of Google.com +monitor_status{monitor_name="Google"} +``` \ No newline at end of file