chess-exporter

Prometheus exporter for chess.com player data implemented via chess.com’s published data API and Prometheus Python Client

Example use cases:

Deployment into Kubernetes

Simply deploy the Kubernetes manifests in the manifests folder.
Have a look at kustomization.yaml first.
Ensure that namespace suits you, and optionally uncomment servicemonitor.yaml.

kubectl apply -k manifests

Available metrics

Metric name description values
chess_rapid_rating_current{playerName=”playerName”} Current chess.com rating of player playerName in rapid integer
chess_rapid_wins{playerName=”playerName”} Total number of wins of player playerName in rapid integer
chess_rapid_losses{playerName=”playerName”} Total number of losses of player playerName in rapid integer
chess_rapid_draws{playerName=”playerName”} Total number of draws of player playerName in rapid integer
chess_blitz_rating_current{playerName=”playerName”} Current chess.com rating of player playerName in blitz integer
chess_blitz_wins{playerName=”playerName”} Total number of wins of player playerName in blitz integer
chess_blitz_losses{playerName=”playerName”} Total number of losses of player playerName in blitz integer
chess_blitz_draws{playerName=”playerName”} Total number of draws of player playerName in blitz integer
chess_bullet_rating_current{playerName=”playerName”} Current chess.com rating of player playerName in bullet integer
chess_bullet_wins{playerName=”playerName”} Total number of wins of player playerName in bullet integer
chess_bullet_losses{playerName=”playerName”} Total number of losses of player playerName in bullet integer
chess_bullet_draws{playerName=”playerName”} Total number of draws of player playerName in bullet integer
chess_online{chess_online=”online”,playerName=”playerName”} online status of player playerName, currently not working 0 or 1
chess_online{chess_online=”offline”,playerName=”playerName”} online status of player playerName, currently not working 0 or 1
chess_online{chess_online=”unknown”,playerName=”playerName”} online status of player playerName, currently not working 0 or 1

Configuration

Chess-exporter is highly configurable via environment variables, and a configuration file.


Inspired by https://trstringer.com/quick-and-easy-prometheus-exporter/