Commit graph

2 commits

Author SHA1 Message Date
c13b8bd507
feat: add dynamic config for CryptPad exporter
Introduce support for configuring the CryptPad Prometheus exporter via environment variables and command line arguments. This enhancement moves away from the previous method that required direct modifications to the source code, offering a more flexible and user-friendly approach for setting the pins directory and server port. By enabling dynamic configuration, users can more easily adapt the exporter to various environments without altering the codebase. The update includes parsing arguments at runtime and prioritizing command line inputs over environment variables for greater control.

This change also encompasses improvements to code readability and structure, including better error handling and documentation within the exporter script.
2024-06-05 12:23:17 +02:00
dc6654d183
feat: Initialize CryptPad Prometheus Exporter
Initialized a new Prometheus exporter for CryptPad with foundational setup including the creation of a `.gitignore` file, adding the MIT License, and a descriptive `README.md`. Developed the main functionality in `exporter.py` to expose the count of registered users as a Prometheus metric. Also, a `requirements.txt` file was set up with the necessary Python package.

This initial setup lays the groundwork for future enhancements and metrics to be added, making it easier to monitor CryptPad's usage. The decision to count registered users by their data folders mirrors CryptPad's own administrative dashboard approach, ensuring consistency in reported metrics.

The inclusion of the `.gitignore` file ensures that development environments remain clean, and by choosing the MIT License, the project is kept open and permissive for broad use and contribution.
2024-06-04 21:06:10 +02:00