commit | f8d7415481767f2c7fcb88b557b62a261439cf36 | [log] [tgz] |
---|---|---|
author | Michal Kobus <mkobus@mirantis.com> | Wed Apr 22 12:56:23 2020 +0200 |
committer | Michal Kobus <mkobus@mirantis.com> | Wed Apr 22 13:02:49 2020 +0200 |
tree | 3d067c4f6b97b0ed1e9d7c758b84a875adf5c8ae | |
parent | 1479a875f94d1cc8f21b6a980c6ba09ed206e1a9 [diff] |
Upgrade sf-notifier requirements - urllib - requests - pytest Change-Id: I547d17df03efc987123e2cabc962c6c418da8c7f Related-bug: PRODX-4330
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/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