This is a Slack bot written in Python to talk to you Dynatrace dashboards via the Dynatrace REST API. This is very much a work in progress with some horrible code within. Check the comments in the code to see what I'm talking about.
- Create a dashboards.py file in the root (check the examples dir)
- Set the required environment variables (check start.sh in the examples dir for an idea):
- DYNATRACE_USER
- DYNATRACE_PASSWORD
- DYNATRACE_URL
- SLACK_BOT_TOKEN
- BOT_ID
- Create a python virtualenv:
virtual .
- Switch to your virtualenv:
source bin/activate
- Install dependencies:
pip install -r requirements.txt
- Run the script:
./dynabot.py
The code here leans heavily on this post on fullstackpython including some shameless copy/paste.