commit | 4104c10b575dbc9d3c0ad20ce4607ba42bc19a21 | [log] [tgz] |
---|---|---|
author | Michal Kobus <mkobus@mirantis.com> | Fri Feb 22 17:05:11 2019 +0100 |
committer | Michal Kobus <mkobus@mirantis.com> | Mon Feb 25 11:20:11 2019 +0100 |
tree | 2fd0bb990cbf6df47cd293569ddbc6e533bddf5c | |
parent | 27457d4a3ffedd5a5479a0a27c53bfb264f9afc1 [diff] |
Handle Connetion to SF timeouts on server level Change-Id: If5dd7594a6507ddef3ae401c14cbbc936d42bd23 Related-bug: PROD-27801 (PROD:27801)
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