vRealize + Webhooks + ServiceNow

This post was originally published on this site

webhook-512

 

In my last post, I talked about all the awesome you can do with the webhook feature available in vRealize products today. In this post, I would like to drill into one of the possible integrations: ServiceNow. Read on to learn more!

 

 

Types of Integration

There are two possible types of integration available with the webhook shim today — though more could be added in the future:

  1. Fire and forgot. Like the name implies, this type of integration mimics the alerting behavior of vRealize products today. This is great for fire and forgot systems such as chat and development.
  2. Check, fire and forgot. This type of integration looks to see whether some state exists before firing. If yes, then an append occurs, if no, then a new fire and forgot is triggered. This is great for incident/ticket management systems where you are looking to reduce the noise.

ServiceNow

ServiceNow represents a check, fire and forgot system. If an open incident already exists due to a vRealize webhook and the same vRealize webhook is triggered again then we should not open a new incident, but instead append a comment to the existing open incident. In order to determine uniqueness, the webhook shim, which I covered in my last post, uses the vRealize webhook alert name — though this can be changed as desired.

So, how does one go about calling the ServiceNow webhook shim? Four quick steps:

  1. Deploy the webhook shim on some system (as covered here)
    virtualenv loginsightwebhookdemo
    cd loginsightwebhookdemo
    source bin/activate
    git clone pip https://github.com/vmware/loginsightwebhookdemo.git
    cd loginsightwebhookdemo/
    pip install -r requirements.txt
  2. Edit the loginsightwebhookdemo/servicenow.py shim and enter the required parameters
    # ServiceNow parameters
    SERVICENOWURL = ''
    SERVICENOWUSER = ''
    SERVICENOWPASS = ''
  3. Start the webhook shim with something like:
    $ ./runserver.py
  4. Configure a vRealize product to send a webhook to the ServiceNow endpoint (as discussed in my previous post)

That’s it! Want to confirm this is working? Hit the test button above and see what happens. Assuming you entered the parameters correctly and that network connectivity between the vRealize product, shim, and ServiceNow can be established, you will see a new incident in ServiceNow

li-snow-test1

For fun, hit the test button a second time to confirm that the shim adds a comment to the open incident instead of creating a new one

li-snow-test2

How cool is that?!? Note I am using test alerts in the above examples so you do not see any events — normally you would see events in the results as well.

You can follow the same process above to enable any of the integrations available in the shim today. You could also submit a pull request if you wish to contribute to the shim. Enjoy!

The post vRealize + Webhooks + ServiceNow appeared first on VMware Cloud Management.

Leave a Reply

Your email address will not be published. Required fields are marked *