commit | 1d78794cae106e71fd1a37bf0a91d1f4797a1e7e | [log] [tgz] |
---|---|---|
author | Michal Kobus <mkobus@mirantis.com> | Wed Mar 15 14:58:50 2023 +0100 |
committer | Michal Kobus <mkobus@mirantis.com> | Thu Mar 16 13:02:27 2023 +0100 |
tree | 9aed5c0edeea2c9b18552087c57122ff568d9290 | |
parent | ff09b8396cb7434f8ea457e6106001812cd613c1 [diff] |
Bump dependencies: - werkzeug - cryptography - markupsafe (for werkzeug) Change-Id: I6b6736251fb697db62037772fe729b4bfbc33f36 Related-PROD: PRODX-31045
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