Sign inSign up

marco674/teamspeak-prometheus

By marco674

•Updated over 1 year ago

Updated version from https://github.com/TilmannF/teamspeak-prometheus

Image
Integration & delivery
Monitoring & observability
0

527

marco674/teamspeak-prometheus repository overview

⁠teamspeak-prometheus

Teamspeak metrics for Prometheus

⁠Description

The Python script starts an HTTP-server, which exposes the Prometheus metrics & queries a given TS3 server via Teamspeak's ServerQuery procotol at an interval. The metrics provided by Teamspeak aren't convertered and passed as they are.

⁠Usage

⁠Without Docker
⁠Requirements
  • Python 3
  • PIP
⁠Installation
  1. Clone this repository
  2. cd into the cloned repository
  3. Run pip install -r requirements.txt

Bonus points: use virtualenv

⁠Arguments

List all arguments with python -h

NameDescriptionDefault value
--ts3hostHostname or ip address of TS3 serverlocalhost
--ts3portPort of TS3 server10011
--ts3usernameServerQuery username of TS3 serverserveradmin
--ts3passwordServerQuery password of TS3 server
--metricsportPort on which this service exposes the metrics8000

Example: python app.py --ts3host example.com --ts3port 12345 --ts3username ExampleUser --ts3password SomePassword --metricsport 8080

⁠Requirements
  • Docker
⁠Installation

With docker: docker run -d -p 8000:8000 -e TEAMSPEAK_HOST='123.123.123.123' -e TEAMSPEAK_PASSWORD='example123' marco674/teamspeak-prometheus

With docker-compose:

services:
  teamspeak-prometheus:
    image: teamspeak-prometheus:latest
    environment:
      TEAMSPEAK_HOST: 123.123.123.123
      TEAMSPEAK_PASSWORD: example123
    ports:
      - 8000:8000
⁠Environment variables
NameDescriptionDefault value
TEAMSPEAK_HOSTHostname or ip address of TS3 serverlocalhost
TEAMSPEAK_PORTPort of TS3 server10011
TEAMSPEAK_USERNAMEServerQuery username of TS3 serverserveradmin
TEAMSPEAK_PASSWORDServerQuery password of TS3 server
⁠Prometheus configuration
  honor_timestamps: true
  scrape_interval: 15s
  scrape_timeout: 10s
  metrics_path: /metrics
  scheme: http
  static_configs:
  - targets:
    - example.com:8000

⁠Analytics & visualization

⁠Grafana dashboard

Import grafana-dashboard.json or Grafana dashboard ID 123 for a demonstration of some of the metrics.

Teamspeak is a registered trademark of Teamspeak Limited. This project is not endorsed by or affiliated with Teamspeak Limited in any way.

This project is licensed under the terms of the MIT license.

Tag summary

Content type

Image

Digest

sha256:4be5db188…

Size

30.3 MB

Last updated

over 1 year ago

docker pull marco674/teamspeak-prometheus