Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lila-kuhlt/ns2-grafana
This project defines metrics for Prometheus from game data of the Game NS2 provided by ns2-stat-api from project NS2-Stat.
https://github.com/lila-kuhlt/ns2-grafana
Last synced: 13 days ago
JSON representation
This project defines metrics for Prometheus from game data of the Game NS2 provided by ns2-stat-api from project NS2-Stat.
- Host: GitHub
- URL: https://github.com/lila-kuhlt/ns2-grafana
- Owner: Lila-Kuhlt
- License: mit
- Created: 2022-04-08T16:41:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-11T00:18:52.000Z (12 months ago)
- Last Synced: 2024-11-05T16:28:58.892Z (2 months ago)
- Language: Python
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ns2-grafana
This project defines metrics for [Prometheus](https://prometheus.io/) from game data of the Game [NS2](https://store.steampowered.com/app/4920/Natural_Selection_2/) provided by `ns2-stat-api` from project [NS2-Stat](https://github.com/Lila-Kuhlt/ns2-stat).## Setup
* Run `pip install -r requirements.txt`
* Go into file `/src/util/config.py` and set config values
- `ns2_stats_api_url` is the location for the running `ns2-stat-api` instance form project [NS2-Stat](https://github.com/Lila-Kuhlt/ns2-stat)
- `server-port` is the hosting location where Prometheus can scrape the data## Run
Run `python src/__init__.py`## Metrics
You can find all defined metrics in the folder `src/metrics_handler/metrics/`. Every file is a single metric. You can read the descriptions defined in the files if you need more information.## Externals
### NS2-Stat
Note that you have to run [NS2-Stat](https://github.com/Lila-Kuhlt/ns2-stat) that provided the game data as api. Just go to the project and read their docu for help.### Prometheus Config
Add the following configuration in the `scrape_configs`-block into your `prometheus.yml` file. The `targets` port has to be the same as the `server-port` above.```YML
- job_name: "ns2"
static_configs:
- targets: ["localhost:8000"]
```### Grafana Dashboard
If you want to use [Grafana](https://grafana.com/) to virtualise the metrics, you can find a ready-made dashboard in `grafana/dashboard.json`