python3-cyberfusion-rabbitmq-consumer-log-server
Log server for RabbitMQ consumer.
Use the RabbitMQ consumer? The log server gives you an overview of RPC requests/responses - from all your RabbitMQ consumers - in one place.
Install
PyPI
Run the following command to install the package from PyPI:
pip3 install python3-cyberfusion-rabbitmq-consumer-log-server
Debian
Run the following commands to build a Debian package:
mk-build-deps -i -t 'apt -o Debug::pkgProblemResolver=yes --no-install-recommends -y'
dpkg-buildpackage -us -uc
Configure
The log server consists of two parts: a web-based GUI, and an API.
API
The RabbitMQ consumer writes RPC requests/responses to the API. To let the consumer ship logs to the log server, see the consumer's README.
In the consumer, an API token must be set. Set it in /etc/rabbitmq-consumer-log-server/api_token (regular text file).
You can generate a random API token using openssl: openssl rand -hex 32
You don't need to keep the API token confidential: it's only used by the RabbitMQ consumer to write logs. Therefore, abuse would be a nuisance at the worst, not a data breach.
GUI
Use the web-based GUI to view RPC requests/responses.
The web GUI uses basic authentication. Set a password in /etc/rabbitmq-consumer-log-server/gui_password (regular text file).
You can generate a random password using openssl: openssl rand -hex 32
You can use any basic authentication username - it's ignored.
Retention
By default, logs are kept for 45 days. To override this, set the environment variable KEEP_DAYS to the number of days.
Periodic tasks
Using the Debian package? You don't have to do anything - periodic tasks are automatically executed using cron.
Otherwise, run the following commands periodically:
rabbitmq-consumer-log-server-purge-logs(every 24 hours)
Usage
Run
Manually
- Run migrations:
alembic upgrade head - Run the app using an ASGI server such as Uvicorn.
systemd
The server runs on :::4194.
systemctl start rabbitmq-consumer-log-server.service
Web GUI
Once the server is started, access the web GUI on /rpc-requests.
SSL
Use a proxy that terminates SSL. E.g. HAProxy.
When using a reverse proxy, 127.0.0.1 is trusted by default. To override this, set the FORWARDED_ALLOW_IPS environment variable.
For more information, see the Uvicorn documentation (look for --proxy-headers and --forwarded-allow-ips).
⚠️ Development
Developing the RabbitMQ consumer? Access the API documentation on /redoc (Redoc) and /docs (Swagger).
Developing the log server? After installing it, and running migrations, seed your database with example data:
python3 seed_example_data.py
You can run the seeder multiple times to fill up your database with more data.
Metadata
Release files for python3-cyberfusion-rabbitmq-consumer-log-server 2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python3_cyberfusion_rabbitmq_consumer_log_server-2.1.tar.gz | 9.7 kB | Without provenance | Details for python3_cyberfusion_rabbitmq_consumer_log_server-2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python3_cyberfusion_rabbitmq_consumer_log_server-2.1-py3-none-any.whl | Python 3 | none | any | Details for python3_cyberfusion_rabbitmq_consumer_log_server-2.1-py3-none-any.whl |
Total release size: 21.4 kB
Release files / python3_cyberfusion_rabbitmq_consumer_log_server-2.1.tar.gz
| Download URL | python3_cyberfusion_rabbitmq_consumer_log_server-2.1.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16d296e086c89ad72a5c4b723b2f5baa6128a5526ab072f9b71a5965344afff5
|
|
BLAKE2b-256 checksum How to use checksums |
53a732f8af032850639b1e2090586368d31b67f6b6c35da439a1a641b0f5ac0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / python3_cyberfusion_rabbitmq_consumer_log_server-2.1-py3-none-any.whl
| Download URL | python3_cyberfusion_rabbitmq_consumer_log_server-2.1-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0b489da7eac0ebc263ff0425117781c91de6c3df3c5e04dd3bd7326acafeec9
|
|
BLAKE2b-256 checksum How to use checksums |
c28a9fd73aea59cec54eba45597f9fd1636b2973bb09dfce241d07fc8987134b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Security for python3-cyberfusion-rabbitmq-consumer-log-server 2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.