commit | a069a1a6586a0761dfb80ceb3d290092a5716626 | [log] [tgz] |
---|---|---|
author | Michal Kobus <mkobus@mirantis.com> | Thu Sep 23 18:05:27 2021 +0200 |
committer | Michal Kobus <mkobus@mirantis.com> | Tue Sep 28 15:50:07 2021 +0200 |
tree | 6bfbcc83ed454c399e79cf5c34ebf256e2ec7cc4 | |
parent | 2e85ef8a928ffb354abc6932a77134e9a1292e9a [diff] |
Add update for IsWatchDogAlert__c - plus add informational severity - let watchdog bypass feed_item flag Change-Id: I4946184b925f9783fcfe393b71c5ce4fe38bf8d2 Related-PROD: PRODX-18044
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