From 4cec7edf17c62c2a0e0a45423a6e1fd21beeaacd Mon Sep 17 00:00:00 2001 From: Hunter Long Date: Thu, 12 Jul 2018 21:31:21 -0700 Subject: [PATCH] Updated Prometheus Exporter (markdown) --- Prometheus-Exporter.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/Prometheus-Exporter.md b/Prometheus-Exporter.md index c06daca..3e01791 100644 --- a/Prometheus-Exporter.md +++ b/Prometheus-Exporter.md @@ -1,5 +1,12 @@ Statup includes a prometheus exporter so you can have even more monitoring power with your services. The prometheus exporter can be seen on `/metrics`, simply create another exporter in your prometheus config. Use your Statup API Secret for the Authorization Bearer header, the `/metrics` URL is dedicated for Prometheus and requires the correct API Secret has `Authorization` header. +# Grafana Dashboard +Statup has a [Grafana Dashboard](https://grafana.com/dashboards/6950) that you can quickly implement if you've added your Statup service to Prometheus. Import Dashboard ID: `6950` into your Grafana dashboard and watch the metrics come in! + +

+ +## Basic Prometheus Exporter +If you have Statup and the Prometheus server in the same Docker network, you can use the yaml config below. ```yaml scrape_configs: - job_name: 'statup' @@ -9,10 +16,17 @@ scrape_configs: - targets: ['statup:8080'] ``` -# Grafana Dashboard -Statup has a [Grafana Dashboard](https://grafana.com/dashboards/6950) that you can quickly implement if you've added your Statup service to Prometheus. Import Dashboard ID: `6950` into your Grafana dashboard and watch the metrics come in! - -

+## Remote URL Prometheus Exporter +This exporter yaml below has `scheme: https`, which you can remove if you arn't using HTTPS. +```yaml +scrape_configs: + - job_name: 'statup' + scheme: https + scrape_interval: 30s + bearer_token: 'SECRET API KEY HERE' + static_configs: + - targets: ['status.mydomain.com'] +``` ### `/metrics` Output ```