- 8 minutes to read

Managing the Webhook Alarm Plugin

Get your business-users aware, by sending them a notification based on the Nodinite monitoring alert

The Webhook Alarm Plugin sends an HTTP Request with the alert data to your Webhook (with your logic) when the status of Resources in one or more Monitor Views changes their state (all according to user-defined configurations).

This feature, enables you to easily integrate Nodinite monitoring with Freshdesk or any other Customer Support Software of your choice. You can automate your incident process, and tag the tickets with the Custom Meta Data properties set using the Nodinite Repository Model.

graph LR alert(fa:fa-bolt Alert)--> webhook{WebHook with Your Own Logic} webhook -->|Office hours| mail[fa:fa-envelope Mail] webhook -->|Statistics| DB[fa:fa-database Data Warehouse] webhook -->|Critical| ticketSystem[fa:fa-ticket-alt Jira/Freshdesk/ServiceNow/...]

The HTTP Webhook Alarm Plugin comes pre-installed with the Nodinite Core Services.

Example templates

Webhooks are user-defined HTTP callbacks and an event is triggered by the Nodinite Monitoring Service when rules and settings from Nodinite alarm plugins apply. When that event occurs the Nodinite HTTP Webhook plugin makes an HTTP request to the configured URL. You can use these events to invoke behaviour on another system with any appropriate action. A common use case is to trigger your incident process.

Configuring the Webhook Alarm Plugin

There are two ways of configuring the Alarm Plugin:

  1. Global configuration
  2. Specific Settings in Monitor Views

Global configuration

You can configure the Alarm Plugin using Nodinite's Web Client by navigating to "Administration", "Settings", "Alarm Plugins" and choose "HTTP Webhook", review the Add or manage Alarm Plugin for generic details.

HTTP Webhook Plugin Configuration

The following properties can be configured for this plugin:

Property Description
Web Client URL The URL for end-users back to your Nodinite Web Client instance
URL The address of the Webhook to send alert to
Compress Body Whether the body of the request should be compressed. The compression is GZIP. Important Note: When implementing a solution that retrieves the call needs to decompress the body to read the JSON payload.
Test URL Nodinite provides a way for you to verify that the plugin works using the Execute Alarm Test or Restore Alarm Test. The Test URL property is the destination URL for these two test executions

Specific Settings from within Monitor Views

From a Monitor View, you can override the following global (default) settings with a 'Specific' setting:
SpecificSettings

  • Trigger on changed Resource state - Trigger alarms when a Resource changes state, default is to trigger alarm when the Monitor View changes state
  • Override default URL - The URL to the Webhook to send alerts to from this Monitor View. Leave this field empty to use the default value.
  • Override Compress Body - When checked, the body for the alert is sent in compressed format. This setting is honoured if the 'Override default URL' property is also set.
  • Enable Recurrence - Configure the recurrence for redistributing alarms

What does the payload look like?

The payload sent to the Webhook looks different if it's being sent compressed or not.

Uncompressed

If the Compress body check box is not checked the payload will be sent uncompressed with the following structure (actual data vary with each alert):

{
  "MonitorViews": [
    {
      "MonitorViewId": 1,
      "Name": "Test View",
      "Description": "Simple unit testing view.",
      "WebSite": null,
      "StatusCode": {
        "StatusCode": 0,
        "Name": "OK"
      },
      "NumberOfMonitoredResources": 2,
      "Integrations": [
        {
          "IntegrationId": 1,
          "Name": "INT001 - Orders to first company",
          "Description": "",
          "WebSite": "http://www.nodinite.com",
          "CustomFields": [
            {
              "CustomFieldId": 1,
              "Name": "SLA",
              "Description": "",
              "WebSite": null,
              "ValueType": {
                "CustomFieldTypeId": 1,
                "Name": "Text",
                "Description": null,
                "WebSite": null
              },
              "CustomValues": [
                {
                  "CustomValueId": 1,
                  "Value": "Gold",
                  "Description": "Act fast!!",
                  "WebSite": "http://www.nodinite.com",
                  "ValueType": {
                    "CustomFieldTypeId": 1,
                    "Name": "Text",
                    "Description": null,
                    "WebSite": null
                  }
                }
              ]
            }
          ],
          "CustomMetaDatas": [
            {
              "CustomMetaDataId": 1,
              "Name": "Summary",
              "Description": "My integration is the perfect one",
              "WebSite": "http://www.nodinite.com",
              "DataType": 1,
              "CustomValues": [
                {
                  "CustomValueId": 1,
                  "Value": "My integration is the perfect one",
                  "Description": "Act fast!!",
                  "WebSite": "http://www.nodinite.com",
                  "ValueType": null
                }
              ]
            }
          ]
        }
      ],
      "ChangedResources": [
        {
          "ResourceId": 1,
          "Name": "First Resource - Send Port",
          "Description": null,
          "WebSite": "http://www.nodinite.com/resource/send-port",
          "Source": {
            "SourceId": 1,
            "Name": "Test Source",
            "Description": "Simple source for testing purposes only.",
            "Server": null,
            "Environment": null,
            "Version": null,
            "WebSite": "http://www.nodinite.com/"
          },
          "Category": {
            "CategoryId": 1,
            "Name": "Send Ports",
            "Description": "Send ports category.",
            "WebSite": null
          },
          "Application": {
            "ApplicationId": 1,
            "Name": "BizTalk System",
            "Description": "Default biztalk application",
            "WebSite": "http://www.nodinite.com/application/biztalk-system"
          },
          "StatusCode": {
            "StatusCode": 0,
            "Name": "OK"
          },
          "LogText": "All OK! \r\nTest\t - \r - \n"
        },
        {
          "ResourceId": 2,
          "Name": "Second Resource - Receive Port",
          "Description": null,
          "WebSite": null,
          "Source": {
            "SourceId": 1,
            "Name": "Test Source",
            "Description": "Simple source for testing purposes only.",
            "Server": null,
            "Environment": null,
            "Version": null,
            "WebSite": "http://www.nodinite.com/"
          },
          "Category": {
            "CategoryId": 2,
            "Name": "Receive Ports",
            "Description": "Receive ports category.",
            "WebSite": "http://www.nodinite.com/category/receive-ports"
          },
          "Application": {
            "ApplicationId": 1,
            "Name": "BizTalk System",
            "Description": "Default biztalk application",
            "WebSite": "http://www.nodinite.com/application/biztalk-system"
          },
          "StatusCode": {
            "StatusCode": 0,
            "Name": "OK"
          },
          "LogText": "All OK!"
        }
      ],
      "Users": [
        {
          "UserId": 1,
          "Name": "\\IBSS\\imsvc",
          "Description": null,
          "MailAddress": "andreas.cider@nodinite.com"
        },
        {
          "UserId": 2,
          "Name": "\\IBSS\\imsvc",
          "Description": null,
          "MailAddress": "robert.mayer@nodinite.com"
        }
      ]
    },
    {
      "MonitorViewId": 2,
      "Name": "Second View",
      "Description": "Simple test view (second).",
      "WebSite": null,
      "StatusCode": {
        "StatusCode": 2,
        "Name": "ERROR"
      },
      "NumberOfMonitoredResources": 2,
      "Integrations": [],
      "ChangedResources": [
        {
          "ResourceId": 10,
          "Name": "LogAPI Queue",
          "Description": "Queue for Nodinite's LogAPI.",
          "WebSite": null,
          "Source": {
            "SourceId": 2,
            "Name": "MSMQ",
            "Description": "Source to monitor MSMQ queues.",
            "Server": "IBSS-DEV01",
            "Environment": "Production",
            "Version": "1.0",
            "WebSite": null
          },
          "Category": {
            "CategoryId": 10,
            "Name": "MSMQ Queue",
            "Description": "MSMQ Queues category",
            "WebSite": "https://msdn.microsoft.com/en-us/library/ms711472%28v=vs.85%29.aspx"
          },
          "Application": null,
          "StatusCode": {
            "StatusCode": 2,
            "Name": "ERROR"
          },
          "LogText": "Number of messages in queue exceeded error limit."
        },
        {
          "ResourceId": 11,
          "Name": "LogAPI Test Queue",
          "Description": "",
          "WebSite": null,
          "Source": {
            "SourceId": 2,
            "Name": "MSMQ",
            "Description": "Source to monitor MSMQ queues.",
            "Server": "IBSS-DEV01",
            "Environment": "Production",
            "Version": "1.0",
            "WebSite": null
          },
          "Category": {
            "CategoryId": 10,
            "Name": "MSMQ Queue",
            "Description": "MSMQ Queues category",
            "WebSite": "https://msdn.microsoft.com/en-us/library/ms711472%28v=vs.85%29.aspx"
          },
          "Application": null,
          "StatusCode": {
            "StatusCode": 1,
            "Name": "WARNING"
          },
          "LogText": "Number of messages in queue exceeded warning limit,but not error limit."
        }
      ],
      "Users": [
        {
          "UserId": 1,
          "Name": "\\IBSS\\imsvc",
          "Description": null,
          "MailAddress": "andreas.cider@nodinite.com"
        }
      ]
    }
  ],
  "Version": "1.0.0.0",
  "Environment": "Test",
  "Customer": "UnitTest",
  "Created": "2019-02-06T13:06:00.0604707Z",
  "WebClientUrl": "http://localhost/IM-Dev/WebClient/",
  "ProductStatus": {
    "IsTrial": false,
    "ExpirationDate": null
  }
}

Example payload with some Custom Meta Data

Compressed

Below is an example of a compressed JSON alert object:

Ew0AAB+LCAAAAAAABADtVWtv2zYU/SscgWIdYMuS6jaJgQLz7HQwstip5aZAHx9o6dolKpEaSdlJg/z3XuphS5ZbNAEKDNu+SZe8r3PP4b2jl1JwI9U1h62mg/d3dcMkogOvQ6csATqgC9CGWDPt0DHoUPHUcCnwJOBJGgPJ0JEYvMXFmmzwImHxlt1qMrtw0OctLANuMJLI4rhDA8NMpkcyQstd48/dpZxd0Hv8yZIlqNmqrAyiOWiZqRCwYL9DJ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