commit | 8615954bb6953b7246ec466739f55e2d2d710bb9 | [log] [tgz] |
---|---|---|
author | Ildar Svetlov <isvetlov@mirantis.com> | Tue May 23 15:39:07 2023 +0400 |
committer | Ildar Svetlov <isvetlov@mirantis.com> | Tue May 23 16:35:16 2023 +0400 |
tree | 6f080bed150ce3278046cac1a5aecc4738eb7f36 | |
parent | 879f211cd4303b4ffbfc703d652b500b9e4e688c [diff] |
Bump flask with dependencies Related-To: PRODX-32585 Change-Id: Ic6845415903accb2ad2d802e0fad2759d169965f
Prometheus Alertmanager webhook receiver sending alert notification to Salesforce.
Install Python dependencies:
$ virtualenv venv -p python3 $ source venv/bin/activate (venv)$ source sf_notifier/vars/development (venv)$ pip install --upgrade pip (venv)$ pip install -e .
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)$ uwsgi --http 127.0.0.1:5000 --wsgi-file sf_notifier/server.py --callable app_dispatch
Check in browser:
http://127.0.0.1:5000/metrics