commit | 6349cdb82eebf29a34124753640f36ac804ee28c | [log] [tgz] |
---|---|---|
author | aahmadzada <aahmadzada@mirantis.com> | Mon Nov 13 09:57:03 2023 +0400 |
committer | aahmadzada <aahmadzada@mirantis.com> | Mon Nov 13 09:57:12 2023 +0400 |
tree | 59b5d6a42c8ea1bfe7824009db42dd7922ec1c56 | |
parent | b6ac3510e173bf7bf9310dedfdd1e9ccbeae6ab5 [diff] |
Rebuild Docker image Related-PRODX: PRODX-36645 Change-Id: Id014c7afe8663b1612640d68eb78c23a3b7ebd5e
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