Log Jasmin SMS Gateway's MT/MO to MongoDB
1.7K
Log Jasmin SMS Gateway's MT/MO to MongoDB Cluster (can be a one-node cluster).
pip3 install -U jasmin-mongo-logger
git clone https://github.com/BlackOrder/jasmin_mongo_logger.git
cd jasmin_mongo_logger
pip3 install .
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.
To setup a MongoDB cluster with Docker, You can use this open source Docker Custom MongoDB Image
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.
You have to supply a database and a collection name. The package will dump all data into the collection.
There is multiple ways to setup the package from CLI.
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
jasminmongologd -h to see all possible arguments. Then execute:jasminmongologd --connection-string $MONGO_CONNECTION_STRING --database $MONGO_LOGGER_DATABASE --collection $MONGO_LOGGER_COLLECTION
AMQP_BROKER_HOST=127.0.0.1 jasminmongologd --connection-string $MONGO_CONNECTION_STRING --database $MONGO_LOGGER_DATABASE --collection $MONGO_LOGGER_COLLECTION
Content type
Image
Digest
sha256:8fae44435…
Size
86.2 MB
Last updated
over 2 years ago
docker pull blackorder/jasmin-mongo-logger