commit | bad1051383846cd9a3d29d408399d53a2605a5ef | [log] [tgz] |
---|---|---|
author | MCP Jenkins <jenkins@ci.mcp.mirantis.net> | Fri Jul 07 01:30:07 2023 +0000 |
committer | MCP Jenkins <jenkins@ci.mcp.mirantis.net> | Fri Jul 07 01:30:07 2023 +0000 |
tree | 6f080bed150ce3278046cac1a5aecc4738eb7f36 | |
parent | 83e950667a4f0d3da15ea4c325dbd9be5ec62afc [diff] |
Rebuild Docker image Change-Id: I3ce7d57781fe2e1ceedea05f857b0b8b9036da9b
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