Docker Automated buil

Sensu Drive

Sensu Drive offers easy way to subscribe for sensu events with integration to your team's slack.

along with the continuous delivery methodologies, while the demand of continuous delivery of monitoring in parallel to product delivery is covered by infrastructure as code such as puppet or chef configuring Sensu monitor. "Sensu Drive" was conceptualized to allow developers to subscribe and unsubscribe to notifications for monitors they or others deployed and to allow Devops/NOC team to recieve notifications for checks that are defining services that they want to wake up at night for.

the concept suggest that Sensu will decide which event to alert for and "Sensu Drive" will decide who and when to notify.

Quick start using docker-compose

git clone https://github.com/ilavender/sensu_drive.git /tmp/sensu_drive
cd /tmp/sensu_drive
# edit ext/docker-variables.env
mkdir /tmp/sensu_drive_nginx_conf
cp ext/nginx-sensu_drive.conf /tmp/sensu_drive_nginx_conf/
docker-compose -f ext/docker-compose.yml up -d
# wait few seconds until db startup complete
docker-compose -f ext/docker-compose.yml exec sensu_drive_frontend python3 manage.py migrate
docker-compose -f ext/docker-compose.yml exec sensu_drive_frontend python3 manage.py collectstatic --noinput
docker-compose -f ext/docker-compose.yml exec sensu_drive_frontend python3 manage.py createsuperuser
docker-compose -f ext/docker-compose.yml scale sensu_drive_worker=3
# navigate to http://127.0.0.1:8080/admin
# add contact email address for admin user http://127.0.0.1:8080/admin/auth/user/1/change/
# navigate to http://127.0.0.1:8080/

Requirements

python3

postgresql-9.5

redis-server

postgresql-server-dev-9.5

python-dev

python3-dev

python3-cryptography

pip install --upgrade -r requirements.txt

Slack team account (free) and token

you can use your test token but for real production deployment having a dedicated bot user is recommended.

https://api.slack.com/docs/oauth-test-tokens

https://api.slack.com/bot-users

for Twilio phone calls feature, the server must be accessible to the rest API callbacks

https://www.twilio.com/docs/api/rest/making-calls#url-parameter

Install/Configure

Running

Sensu Handler

Usage

Reverse Proxy

License