No description
Find a file
Kumi 488aea5d3b
Quite a few changes:
Use single gauge
Added a README
Added a lot of comments
Get more specific message for HTTP errors on startup
Add command line arguments
Get rid of default metrics
Add error messages to assertions
Make importable by adding main function
2023-03-15 08:42:50 +00:00
.gitignore Current status - seems to be working well enough 2022-10-24 14:19:17 +00:00
allkeyshop.py Quite a few changes: 2023-03-15 08:42:50 +00:00
LICENSE Current status - seems to be working well enough 2022-10-24 14:19:17 +00:00
README.md Quite a few changes: 2023-03-15 08:42:50 +00:00
requirements.txt Current status - seems to be working well enough 2022-10-24 14:19:17 +00:00
settings.dist.ini Current status - seems to be working well enough 2022-10-24 14:19:17 +00:00

Prometheus Exporter for allkeyshop.com

This is a simple exporter for allkeyshop.com. It exports the lowest price for a given game.

Prerequisites

  • Python >= 3.8
  • prometheus-client (pip install prometheus-client)

Configuration

The exporter is configured using settings.ini. The provided settings.dist.ini is a template for the configuration file.

To add a new game/product, add a new section to the configuration file. The section name can be either the product ID from allkeyshop.com or the product name.

Usage

To run the exporter, simply execute the allkeyshop.py script. The exporter will listen on port 8090 by default.

To get a list of all available command line options, run the following command:

./allkeyshop.py --help

A sample output of the exporter looks like this:

# HELP allkeyshop_best_price Best price for a product on allkeyshop.com
# TYPE allkeyshop_best_price gauge
allkeyshop_best_price{currency="eur",product_name="Persona 5 Royal"} 49.99
allkeyshop_best_price{currency="eur",product_name="Cyberpunk 2077"} 49.48

License

This project is licensed under the MIT License - see the LICENSE file