commit | af771fc6ab4813f44b37a93f53eee96ce68cd3b4 | [log] [tgz] |
---|---|---|
author | Michal Kobus <mkobus@mirantis.com> | Wed Apr 29 15:57:16 2020 +0200 |
committer | Michal Kobus <mkobus@mirantis.com> | Wed Apr 29 15:57:16 2020 +0200 |
tree | abdb32476a5985981a467ff198f024fd423855a8 | |
parent | f8d7415481767f2c7fcb88b557b62a261439cf36 [diff] |
Add ClusterId__c extracted from alert labels Change-Id: I5bf731bbba25c863cadf9427226e02d51dabf4b3 Related-PROD: PRODX-4628
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