This is an exporter for monitor status of AWS DMS replication tasks.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
This project requires installed in your machine the Python 3.7 and pip.
With that packages, you will need to install some libs for the project, to install then, use the follow command:
pip install -r requirements.txt
Now you have all the dependencies :)
To run locally, you need all prerequisites installed.
Before execute, create a yaml file, with all replication tasks id you want to monitor the status, you could modify or base your yaml in example.yml
.
This project uses three environment variables, which you need to create, the envs are:
- AWS_ACCESS_KEY (access key with dms read permissions)
- AWS_SECRET_KEY (secret key)
- AWS_REGION (Optional/May be declared in yaml file as
region
)
Now to execute the exporter, just run:
python exporter.py --file example.yml
Case you prefer run in docker, build the image and run the container:
docker build -t aws_dms_task_status_exporter .
docker run -itd --name exporter -p 9213:9213 -e AWS_ACCESS_KEY="<AWS_ACCESS_KEY>" -e AWS_SECRET_KEY="<AWS_SECRET_KEY>" -e REGION="<REGION>" aws_dms_task_status_exporter:latest
To see the metrics, you can access:
localhost:9213/metrics
- Python 3.7 - Programming Language
- Pip - Dependency Management
- boto3 - SDK for AWS
- prometheus_client - Prometheus instrumentation library for Python
- Guilherme Sponda - Initial work - g-sponda
See also the list of contributors who participated in this project.