This commit is contained in:
parent
95dc469e4b
commit
343845dbd5
1 changed files with 52 additions and 4 deletions
56
readme.md
56
readme.md
|
@ -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 |
|
||||
|
|
Loading…
Reference in a new issue