commit | 3861b93666181d7294913f8f8233dd7597382aea | [log] [tgz] |
---|---|---|
author | Ksawery Dziekoński <kdziekonski@mirantis.com> | Thu May 27 14:01:44 2021 +0200 |
committer | Ksawery Dziekoński <kdziekonski@mirantis.com> | Wed Jun 02 11:50:36 2021 +0200 |
tree | 1157e04cf520b07fcfc16d5531f7a14ab0e4a89e | |
parent | fb1c4341d28659b735bd5ec11baa6e3e8c48237e [diff] |
Allow logger configuration ingestion from environment Related-PROD: PRODX-11433 Change-Id: Ib7b9940d097cf5a6d1c774fa5b6c51feb684d660
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