Skip to content

Commit

Permalink
doc: added example queries
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Vriesman <[email protected]>
  • Loading branch information
glvr182 committed Jun 5, 2020
1 parent 68135bb commit 68c64f2
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,29 @@ scrape_configs:
scrape_interval: 5s
static_configs:
- targets: ['f2b-exporter:8080']
```
```

## Queries
You can get the metrics by calling f2b_banned_ip in prometheus.
This will return a general unfiltered list of data, which is already usable.

If however, you want to filer the data you can use one of the following filters:
* country
* currently_banned
* jail
* geohash

These are some example queries:

#### Total banned ips
```
sum(f2b_banned_ip)
```
#### Total currently banned ips
```
sum(f2b_banned_ip{currently_banned="true"})
```
### Total banned ips per country
```
sum(f2b_banned_ip) by (country)
```

0 comments on commit 68c64f2

Please sign in to comment.