You can install a webhook integration to send events from a webhook client to Moogsoft AIOps.
The integration allows you to POST JSON payloads to your instance via HTTP/HTTPS.
Before You Begin
Before you start to set up your webhook integration, ensure you have met the following requirements:
- If you are using an on-prem version of Moogsoft AIOps, you have configured it with a valid SSL certificate.
- Your webhook client can make requests to external endpoints over port 443.
- The integration client is able to submit a JSON payload and supports basic auth.
Configure the Integration
Configure the Webhook integration in Moogsoft AIOps as follows:
- Navigate to the Integrations tab.
- Click Webhook in the Monitoring section.
Follow the instructions to create an integration name.
Configure the Webhook
These instructions offer the basic information you need to configure a webhook integration. Different webhook clients may have different implementation options. Refer to the documentation of your webhook client for more information.
Enter the URL for this instance of Moogsoft AIOps:FieldValue
<your webhook integration URL>
Your basic authentication User ID and Password are:
Field Value User ID
Username generated in the Moogsoft AIOps UI
Password generated in the Moogsoft AIOps UI
Depending on the webhook client, you can either use these user credentials directly or use a base64 encoder to encode them in 'username:password' format.
Enter JSON as the body of the webhook event in the following format and edit the field values as appropriate:
Field Input Description signature String Used to identify the event. Usually source:class:type. source String Hostname or FQDN of the source machine that generated the event. source_id String Unique identifier for the source machine. external_id String Unique identifier for the event source. agent_location String Geographical location of the agent that created the event. severity Integer Severity level of the event from 0-5 (clear - critical). type String Level of classification for the event. Follows hierarchy class then type. manager String General identifier of the event generator or intermediary. class String Level of classification for the event. Follows hierarchy class then type. description String Text description of the event. agent_time String Timestamp of when the event occurred in Unix epoch time.
Add a header field with the content type. For the authorization type, enter 'Basic' followed by you basic auth User ID and Password in 'userid:password' format.
Use a base64 encoder to encode 'userid:password' if required by your webhook client. For example, for 'myuser:mypassword' the encoded result would be: 'dXNlcmlkOnBhc3N3b3JkDQo='.
- Connect the webhook as required in the client and turn it on.
Test the Webhook
You can run the following cURL command to send sample data to Moogsoft AIOps.
Make sure to replace <userid>:<password> and <url> with the values entered previously.
If successful, you should receive the following response:
See Configure the REST LAM for more information on webhook and its response codes.