[![status-badge](https://woodpecker.boerlage.me/api/badges/daan/osrs-prometheus-exporter/status.svg)](https://woodpecker.boerlage.me/daan/osrs-prometheus-exporter) # OSRS Prometheus Exporter Collects data about oldschool runescape from various source ## Features * 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"} ``` ## 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 |