commit | 5dd8765f461cf65853883218cedb1962e7bf28d3 | [log] [tgz] |
---|---|---|
author | Michal Kobus <mkobus@mirantis.com> | Fri May 13 13:13:43 2022 +0200 |
committer | Michal Kobus <mkobus@mirantis.com> | Fri May 13 13:13:43 2022 +0200 |
tree | a0434779aab8ffb8347ffc27fcf39092793e8d52 | |
parent | a6da925105f9eb3d6b1ddab2ecb2f533237456f1 [diff] |
Bump baseimage and PyYAML to fix CVEs Change-Id: I6584860f11330bcba55be50251df83bcfe05d58a Related-PROD: PRODX-23021
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