Jasmin Mongo Logger
Log Jasmin SMS Gateway's MT/MO to MongoDB Cluster (can be a one-node cluster).
Table of Contents
Installation Instructions
PYPI
pip3 install -U jasmin-mongo-logger
From Source
git clone https://github.com/BlackOrder/jasmin_mongo_logger.git
cd jasmin_mongo_logger
pip3 install .
Docker
docker compose -f ./docker/docker-compose.yml up -d
Be sure to change the AMQP_BROKER_HOST and MONGO_CONNECTION_STRING in the docker-compose.yml file to your desired values. and also finish the setup of the MongoDB cluster before running the docker-compose file.
Setup MongoDB CLuster
To setup a MongoDB cluster with Docker, You can use this open source Docker Custom MongoDB Image
Usage Instructions
Jasmin Mongo Logger Logs all MT/MO from jasmin to MongoDB Cluster. All settings are read from OS ENV when run from console. if you want to import it in you code, you can supply the settings on initialization.
Data Structure
You have to supply a database and a collection name. The package will dump all data into the collection.
Start the service
There is multiple ways to setup the package from CLI.
-
By exporting ENV variables you can export the fallowing variables before execution
AMQP_BROKER_HOST = 127.0.0.1 AMQP_BROKER_PORT = 5672 MONGO_CONNECTION_STRING = **REQUIRED:NoDefault** MONGO_LOGGER_DATABASE = **REQUIRED:NoDefault** MONGO_LOGGER_COLLECTION = **REQUIRED:NoDefault** JASMIN_MONGO_LOGGER_LOG_PATH = /var/log/jasmin/ JASMIN_MONGO_LOGGER_LOG_LEVEL = INFO
Then execute:
jasminmongologd
-
You can pass arguments to the package on execution. execute
jasminmongologd -hto see all possible arguments. Then execute:jasminmongologd --connection-string $MONGO_CONNECTION_STRING --database $MONGO_LOGGER_DATABASE --collection $MONGO_LOGGER_COLLECTION
-
Mix the previous two methods. you can set the ENV variables and pass some arguments. for example:
AMQP_BROKER_HOST=127.0.0.1 jasminmongologd --connection-string $MONGO_CONNECTION_STRING --database $MONGO_LOGGER_DATABASE --collection $MONGO_LOGGER_COLLECTION
Metadata
Release files for jasmin-mongo-logger 0.1.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 | |
|---|---|---|---|
| jasmin_mongo_logger-0.1.1.tar.gz | 41.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jasmin_mongo_logger-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.0 kB
Release files / jasmin_mongo_logger-0.1.1.tar.gz
| Download URL | jasmin_mongo_logger-0.1.1.tar.gz |
|---|---|
| Size | 41.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1c78296deabdbc0de33172c55e954bec05e414c24f3c3adcfef1c39d42ec219
|
|
BLAKE2b-256 checksum How to use checksums |
231c5b23455e919e74bb12bd6f9fa637361f25864294cf456648b80cee7d3178
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / jasmin_mongo_logger-0.1.1-py3-none-any.whl
| Download URL | jasmin_mongo_logger-0.1.1-py3-none-any.whl |
|---|---|
| Size | 42.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e962616c3aa6f407d1accc2eb2cd0da82b967068d59b61c848721a9d2b17406f
|
|
BLAKE2b-256 checksum How to use checksums |
1f3e55829c9c5a370be86357f1084d813f603d526ef2644bfb560bbfb05b55de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|