Skip to content

Commit b760d84

Browse files
authored
Merge pull request alexjustesen#93 from svenvg93/prometheus
feat: Add Prometheus
2 parents c1fa9be + aa92dd2 commit b760d84

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed
86.1 KB
Loading

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
* [Data Integrations](settings/data-platforms/README.md)
3333
* [InfluxDB v2](settings/data-platforms/influxdb2.md)
34+
* [Prometheus](settings/data-platforms/prometheus.md)
3435
* [Notifications](settings/notifications/README.md)
3536
* [Database](settings/notifications/database.md)
3637
* [Mail](settings/notifications/mail.md)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Prometheus
2+
3+
After each test, Speedtest Tracker exposes the metrics for Prometheus to scrape. For long term storage or custom visualizations.
4+
5+
### Authentication
6+
7+
To configure Speedtest Tracker to expose its metrics behind `basic auth`, apply the following settings
8+
9+
<table><thead><tr><th width="127.33333333333331">Name</th><th width="206">Default</th><th>Description</th></tr></thead><tbody><tr><td>Use Basic Authentication</td><td>false</td><td>Enable / Disable <code>Basic Auth</code></td></tr><tr><td>username</td><td><code>blank</code></td><td>username for authentication </td></tr><tr><td>password</td><td><code>blank</code></td><td>password for authentication</td></tr></tbody></table>
10+
11+
<figure><img src="../../.gitbook/assets/prometheus_settings.png" alt=""><figcaption></figcaption></figure>
12+
13+
### Data pattern
14+
15+
Speedtest Tracker exports data in two categories: labels and metrics. Labels are used for filtering, while metrics are used for displaying data.
16+
17+
<table><thead><tr><th>Name</th><th width="100"></th></tr></thead><tbody><tr><td><code>app_name</code></td><td><code>label</code></td></tr><tr><td><code>isp</code></td><td><code>label</code></td></tr><tr><td><code>server_id</code></td><td><code>label</code></td></tr><tr><td><code>server_name</code></td><td><code>label</code></td></tr><tr><td><code>server_country</code></td><td><code>label</code></td></tr><tr><td><code>server_location</code></td><td><code>label</code></td></tr><tr><td><code>healthy</code></td><td><code>label</code></td></tr><tr><td><code>status</code></td><td><code>label</code></td></tr><tr><td><code>scheduled</code></td><td><code>label</code></td></tr><tr><td><code>download_bytes</code></td><td><code>Metric</code></td></tr><tr><td><code>upload_bytes</code></td><td><code>Metric</code></td></tr><tr><td><code>ping</code></td><td><code>Metric</code></td></tr><tr><td><code>download_bits</code></td><td><code>Metric</code></td></tr><tr><td><code>upload_bits</code></td><td><code>Metric</code></td></tr><tr><td><code>download_jitter</code></td><td><code>Metric</code></td></tr><tr><td><code>upload_jitter</code></td><td><code>Metric</code></td></tr><tr><td><code>ping_jitter</code></td><td><code>Metric</code></td></tr><tr><td><code>download_latency_avg</code></td><td><code>Metric</code></td></tr><tr><td><code>download_latency_high</code></td><td><code>Metric</code></td></tr><tr><td><code>download_latency_low</code></td><td><code>Metric</code></td></tr><tr><td><code>upload_latency_avg</code></td><td><code>Metric</code></td></tr><tr><td><code>upload_latency_high</code></td><td><code>Metric</code></td></tr><tr><td><code>upload_latency_low</code></td><td><code>Metric</code></td></tr><tr><td><code>packet_loss</code></td><td><code>Metric</code></td></tr></tbody></table>
18+
19+
### Prometheus Scrape Config
20+
21+
Below is an example Prometheus scrape configuration:
22+
23+
```yaml
24+
scrape_configs:
25+
- job_name: 'speedtest-tracker'
26+
scrape_interval: 60s # Adjust to your set schedule
27+
scrape_timeout: 10s
28+
metrics_path: /prometheus
29+
static_configs:
30+
- targets: ['speedtest-tracker.local']
31+
```

0 commit comments

Comments
 (0)