darrylcauldwell / webhook-shims

Shims for Log Insight 3.3+ and vRealize Operations Manager 6.0+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status https://coveralls.io/repos/github/vmw-loginsight/webhook-shims/badge.svg?branch=master

Translation Shims for Log Insight and/or vRealize Operations Manager Webhooks

Translate webhooks from Log Insight 3.3+ and vRealize Operations Manager 6.0+ (recommended 6.2+) to other services. Get alerts in your team chatroom, open an incident ticket or kick off a remediation workflow.

Log Insight and vRealize Operations Manager send alert notifications as HTTP POST with a JSON body. However, most third-party solutions expect incoming webhooks to be in a proprietary format. If the receiving system lacks native support for the webhook format, a shim between them can translate the webhook format as needed. This repository provides several example shims design to work with Python 2.7+.

Installation

Three installation methods exist. Please select the one you are most comfortable with.

docker run -it -p 5001:5001 vmware/webhook-shims
tdnf install wget -y
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install virtualenv
tdnf install git -y
virtualenv loginsightwebhookdemo
cd loginsightwebhookdemo
source bin/activate
git clone https://github.com/vmw-loginsight/webhook-shims.git
cd webhook-shims/
pip install -r requirements.txt
tdnf install wget python2 python2-xml -y
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install virtualenv
tdnf install git -y
virtualenv loginsightwebhookdemo
cd loginsightwebhookdemo
source bin/activate
git clone https://github.com/vmw-loginsight/webhook-shims.git
cd webhook-shims/
pip install -r requirements.txt
iptables -A INPUT -p tcp --dport 5001 -j ACCEPT

Manual

virtualenv loginsightwebhookdemo
cd loginsightwebhookdemo
source bin/activate
git clone https://github.com/vmw-loginsight/webhook-shims.git
cd webhook-shims/
pip install -r requirements.txt

Modify and run the shim:

  • Some services require credentials or URLs. Edit individual services under loginsightwebhookdemo/ to modify constants as needed. (Note: For basic auth, ~/.netrc will take prescendence.)
  • Run python runserver.py [port] - the Flask webserver starts and reports listening - default http://0.0.0.0:5001/
  • Open your browser pointed to the Flask webserver for a list of available URLs.

Documentation

Documentation for this shim can be found under the Installation section above. Once the shim is running, documentation for all endpoint can be found at the root path. With the shim running, you need to configure sources to point to the shim. Configuration information for Log Insight and vRealize Operations Manager are listed below.

Log Insight webhook configuration

There are two places in LI where webhooks can be configured:

  1. System notification: under the General page in the Administration section
  2. User alerts: while creating a new user alert or by editing an existing user alert

vRealize Operations Manager webhook configuration

REST plugin: under Administration > Outbound Settings

Developing and Contributing

We’d love to get contributions from you! Once you are up and running, take a look at the Contribution Document to see how to get your changes merged in.

Licensing

Provided under Apache License 2.0. For more information, see the LICENSE file.

Support

Please report problems via GitHub issues.

About

Shims for Log Insight 3.3+ and vRealize Operations Manager 6.0+

License:Apache License 2.0


Languages

Language:Python 100.0%