A webhook is a user-defined HTTP request that is sent from a source site to a unique URL of an application when a particular event takes place. Webhooks allow applications to communicate between themselves and facilitate operations in a fast and effective way.
While APIs also enable communication between applications, a major difference between the two is the way they function.
With APIs, you need to poll every time you want to get information from the application; webhooks, on the other hand, are automated and notify you whenever a particular event occurs in your application.
By integrating webhooks in OpManager, you can send data to a specified webhook URL belonging to a third-party application. For instance, webhooks make it possible to integrate OpManager with Microsoft Teams and Telegram.
With webhooks, OpManager sends details of the alarm to a particular URL of the concerned third-party application. The owner of the app would then take suitable action based on the content of the data sent.
A useful aspect of webhook integration is that it enables apps to exchange information effortlessly when specific events occur. Collaboration with other apps is crucial for a network monitoring solution like OpManager to reduce downtime, boost performance, and resolve faults quickly.
OpManager constantly monitors the network for performance, availability, and fault identification. Webhooks enable OpManager to send alarm information to applications like PagerDuty, ServiceDesk Plus, ServiceNow, Slack, and more by leveraging its network monitoring capabilities.
So, whenever certain events (threshold violations) happen, alarm details are automatically sent to the specified applications immediately.
The alarm details sent from OpManager are converted into appropriate forms based on the application in which the data is used.
Let's say OpManager locates a hardware failure that requires immediate replacement. Webhooks come into play here, and once this event — device failure — occurs, the alarm raised for this issue will be escalated to ServiceDesk Plus as a ticket.
On the other hand, if this alarm detail is escalated to Slack, the alarm details will be converted into a message and will appear on the communication channel used.
Above all, webhook-OpManager integration leverages your IT infrastructure management and offers these advantages:
OpManager sends the alarm data to a particular URL as an HTTP request once the desired event takes place. In response, the app will send an HTTP callback to OpManager. You must get the webhook URL of the application to which the data is sent.
The content types of HTTP requests supported in OpManager are:
After every successful HTTP request, a success response code will be added in the OpManager logs. Similarly, for every failed execution, a failure response code will be added in the logs.
You can also define the timeout duration, which is the amount of time OpManager will wait for a response from the app. This ensures a prompt and timely response from the app.
You can specify the type of request made to the third-party application. The webhook URL method types supported by OpManager are:
Step 3: Applicable only if the Hook URL method type is not GET/HEAD/DELETE
Note: A browser's user agent (UA) string helps identify the browser in use, its version, and the operating system on which it is used.
In general, the mandatory fields that should be mentioned while configuring Webhooks are:
You can add any number of alarm variables and custom fields like IP Address, Device Type, Severity, Location, Contact Details, and more, so that whenever an event happens, these details will be sent as a parameter to the specified webhook URL.
The message that will be shared to the webhook URL in the above case is represented below:
IP Address: $DeviceField(ipAddress)
Device Type: $DeviceField(type)
Note: Proxy variables have been used in the above example. The actual values will be updated for the variables when the webhook is invoked from OpManager.
Unlike the form-data and form-urlencoded data types, choosing the raw data type gives you liberty to add a raw message not restricted by any parameters.