commit | 2820c666d699f0fec140498fe9b1cea4d8ea553c | [log] [tgz] |
---|---|---|
author | Mateusz Matuszkowiak <mmatuszkowiak@mirantis.com> | Wed Nov 21 12:07:25 2018 +0100 |
committer | Michal Kobus <mkobus@mirantis.com> | Mon Nov 26 12:21:12 2018 +0100 |
tree | 9c335e64f1cc0e7040c4966c6e997b1bfdad84bd | |
parent | 8930e4879a808a44f61932c495419fcc92e21397 [diff] |
Initial webhook receiver Change-Id: I4786b133f103a65a381e2b281224b0a9bc8d4182 Related-bug: PROD-24880 (PROD:24880)
Prometheus Alertmanager webhook receiver sending alert notification to Salesforce.
Install Python dependencies:
$ virtualenv venv $ venv/bin/pip install -e . $ source sf_notifier/vars/development
Add to settings/development.py
credentials for your Salesforce customer (not engineering) account:
SF_CONFIG = { 'AUTH_URL': 'xxx', 'USERNAME': 'xxx', 'PASSWORD': 'xxx', 'ORGANIZATION_ID': 'xxx', 'ENVIRONMENT_ID': 'xxx', 'SANDBOX_ENABLED': True }
You may also specify environment variables to override Python settings:
export SFDC_AUTH_URL="xxx" export SFDC_USERNAME="xxx" export SFDC_PASSWORD="xxx" export SFDC_ORGANIZATION_ID="xxx" export SFDC_ENVIRONMENT_ID="xxx" export SFDC_SANDBOX_ENABLED=true
Run server:
$ venv/bin/flask run
Check in browser:
http://127.0.0.1:5000/health