Update readme
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Daan Boerlage 2023-04-06 14:12:04 +02:00
parent 95dc469e4b
commit 343845dbd5
Signed by: daan
GPG key ID: FCE070E1E4956606

View file

@ -2,12 +2,60 @@
# OSRS Prometheus Exporter
Exposes a prometheus `/metrics` endpoint with oldschool runescape word player count data.
Collects data about oldschool runescape from various source
## Runelite Endpoint
## Features
This leaches off of the following runlite endpoint:
* Track highscores rank per player
* Track xp gain per skill per player
* Track levels per skill per player
* Track how many player are logged in per world
## Endpoints
| uri | description |
|---------------|-------------------------|
| `/stats/:rsn` | Player metrics endpoint |
| `/worlds` | World metrics endpoint |
## Prometheus metrics
```promql
# Player metrics
osrs_player_level{skill="Hunter",player="rsn",profile="Standard"} 1
osrs_player_xp{skill="Hunter",player="rsn",profile="Standard"} 0
osrs_player_rank{skill="Hunter",player="rsn",profile="Standard"} 0
# World metrics
osrs_world_players{id="302",isMembers="true",location="UK"}
```
https://api.runelite.net/runelite-1.9.14-SNAPSHOT/worlds.js
## Prometheus Configuration
```yaml
scrape_configs:
- job_name: osrs-world-data
scrape_interval: 5m
metrics_path: /worlds
static_configs:
- targets:
- osrs-prometheus-exporter:3030
- job_name: osrs-player-runebaas
scrape_interval: 1h
metrics_path: /stats/runebaas
static_configs:
- targets:
- osrs-prometheus-exporter:3030
```
## Open Telemetry
This app includes support for Open Telemetry
It supports the following configuration options:
| Name | Default | Description |
|-------------------------------|-------------------------|---------------------|
| `OTEL_SERVICE_NAME` | `app` | Name of the app |
| `OTEL_EXPORTER_OTLP_ENDPOINT` | `http://localhost:4317` | Collection endpoint |
| `OTEL_EXPORTER_OTLP_PROTOCOL` | `grpc` | Collection protocol |