2021-12-14 01:24:18 +01:00
|
|
|
## Usage
|
2022-06-18 18:42:41 +02:00
|
|
|
Gatus exposes Prometheus metrics at `/metrics` if the `metrics` configuration option is set to `true`.
|
|
|
|
|
|
|
|
To run this example, all you need to do is execute the following command:
|
2021-12-14 01:24:18 +01:00
|
|
|
```console
|
|
|
|
docker-compose up
|
|
|
|
```
|
|
|
|
Once you've done the above, you should be able to access the Grafana dashboard at `http://localhost:3000`.
|
|
|
|
|
2022-06-18 18:42:41 +02:00
|
|
|
![Gatus Grafana dashboard](../../.github/assets/grafana-dashboard.png)
|
|
|
|
|
|
|
|
|
2021-12-14 01:24:18 +01:00
|
|
|
## Queries
|
2022-06-18 18:42:41 +02:00
|
|
|
By default, this example has a Grafana dashboard with some panels, but for the sake of verbosity, you'll find
|
|
|
|
a list of simple queries below. Those make use of the `key` parameter, which is a concatenation of the endpoint's
|
|
|
|
group and name.
|
|
|
|
|
|
|
|
### Success rate
|
|
|
|
```
|
|
|
|
sum(rate(gatus_results_total{success="true"}[30s])) by (key) / sum(rate(gatus_results_total[30s])) by (key)
|
|
|
|
```
|
2021-12-14 01:24:18 +01:00
|
|
|
|
2022-06-18 18:42:41 +02:00
|
|
|
### Response time
|
|
|
|
```
|
|
|
|
gatus_results_duration_seconds
|
|
|
|
```
|
|
|
|
|
|
|
|
### Total results per minute
|
2021-12-14 01:24:18 +01:00
|
|
|
```
|
|
|
|
sum(rate(gatus_results_total[5m])*60) by (key)
|
|
|
|
```
|
|
|
|
|
2022-06-18 18:42:41 +02:00
|
|
|
### Total successful results per minute
|
2021-12-14 01:24:18 +01:00
|
|
|
```
|
|
|
|
sum(rate(gatus_results_total{success="true"}[5m])*60) by (key)
|
|
|
|
```
|
|
|
|
|
2022-06-18 18:42:41 +02:00
|
|
|
### Total unsuccessful results per minute
|
|
|
|
```
|
|
|
|
sum(rate(gatus_results_total{success="false"}[5m])*60) by (key)
|
2021-12-14 01:24:18 +01:00
|
|
|
```
|