This repository python module for monitoring following
- Redis server
- RabbitMQ broker
- Network
- Latency
- Jitter
- Bandwidth
-
Create a Virtual Environment
$ virtualenv -m venv venv
-
Activate Virtual Environment
$ . venv/bin/activate
-
Install the Dependencies
$ pip install -r requirements.txt
-
Install
monitoring
as python package for development:$ pip install -e .
This makes the
monitoring
binary available as a CLI
Run monitoring
binary using command line:
- -c configuration file path/name
$ monitoring -c config.yaml
Use the rabbitmqtt stack for the Message Broker
NOTE: The rabbitmqtt
stack needs an external docker network called iotstack
make sure to create one using docker network create iotstack
Use the redis stack for the Redis server
NOTE: The redis
stack needs an external docker network called iotstack
make sure to create one using docker network create iotstack
-
To build Docker Images locally use:
$ docker build -t monitoring:<version> .
-
To run the Application along with the RabbitMQ Broker and Redis Server connect the container with the
iotstack
network using:$ docker run --rm --network=iotstack -t monitoring:<version> -c config.yaml
INFO: Change the broker address in the
config.yaml
file torabbitmq
(name of the RabbitMQ Container in rabbitmqtt stack) and change redis server address in theconfig.yaml
file toredis
(name of the Redis Container in redis stack) -
To run the a custom configuration for the Container use:
$ docker run --rm -v $(pwd)/config.yaml:/monitoring/config.yaml --network=iotstack -t monitoring:<version> -c config.yaml