Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theobori/teeworlds-prometheus-exporter
♥️ Teeworlds Exporter for Prometheus
https://github.com/theobori/teeworlds-prometheus-exporter
exporter prometheus teeworlds
Last synced: 13 days ago
JSON representation
♥️ Teeworlds Exporter for Prometheus
- Host: GitHub
- URL: https://github.com/theobori/teeworlds-prometheus-exporter
- Owner: theobori
- License: mit
- Created: 2024-05-21T00:25:20.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-27T17:12:01.000Z (3 months ago)
- Last Synced: 2024-07-27T18:38:03.051Z (3 months ago)
- Topics: exporter, prometheus, teeworlds
- Language: Go
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Teeworlds Exporter for Prometheus
![golangci-lint](https://github.com/theobori/teeworlds-prometheus-exporter/actions/workflows/lint.yml/badge.svg) ![build](https://github.com/theobori/teeworlds-prometheus-exporter/actions/workflows/build.yml/badge.svg)
This is a server that scrapes Teeworlds master servers and econ servers, get stats and exports them via HTTP for Prometheus consumption.
## 📖 Build and run
For the build, you only need the following requirements:
- [Go](https://golang.org/doc/install) 1.22.3
Next to the Go application you could need the following requirements:
- [Teeworlds server](https://www.teeworlds.com/?page=downloads&id=14786) 0.7
- With a econ serverNow you can build and run the Go application, check the `-h` or `--help` flag if needed.
## 🔎 Metrics informations
The metrics are detailed below.
| Name | Description |
| -- | -- |
| `teeworlds_server_players` | Total number of players in a Teeworlds server. |
| `teeworlds_master_server_players` | Total number of players on a master server. |
| `teeworlds_master_server_servers` | Total number of servers registered on a master server. |
| `teeworlds_master_server_request_duration_seconds` | Request duration when refreshing a master server. From client request to full data server response. |
| `teeworlds_master_server_request_total` | Total number of master server requests. |
| `teeworlds_econ_event_total` | Total number of received econ events. |## 🤝 Contribute
If you want to help the project, you can follow the guidelines in [CONTRIBUTING.md](./CONTRIBUTING.md).
## ⚙️ YAML configuration
The YAML configuration is supposed to have the following format.
```yaml
servers:
econ:
- host: localhost
port: 7000
password: hello_worldmaster:
- protocol: http
url: "https://master1.ddnet.tw/ddnet/15/servers.json"
refresh_cooldown: 10- protocol: udp
host: "master1.teeworlds.com"
port: 8283
refresh_cooldown: 15
- protocol: udp
host: "master2.teeworlds.com"
port: 8283
refresh_cooldown: 15
- protocol: udp
host: "master3.teeworlds.com"
port: 8283
refresh_cooldown: 15- protocol: udp
host: "master4.teeworlds.com"
port: 8283
refresh_cooldown: 15```