Skip to main content

Webhooks

Webhooks allow you to integrate with other applications and send signals from within Glasnostic to them. This could be a notification to your cloud provider, a paging service or your teams Slack rooms.

Setting up webhooks

Webhooks are set up per Environment, so make sure to select the right enviornment from the list in the Glasnostic console.

Image

To add a new webhook switch to the Webhooks tab and click "Add Webhook". For each webhook you will have to set up the URL where the event will be sent to. Additionally select the Domain and Event type. A preview of the event, which will be sent to the webhook URL is shown in the Preview window.

Image

View webhooks

If you select the Views domain the webhooks will send view related events to external systems. Refer to the View documentation to learn more about a View in Glasnostic.

Select the appropriate event type and specify if the trigger applies to any view or a specific view. Available event types are:

  • Limit reached
  • Threshold exceeded

Limit reached webhooks will trigger when the limit defined within a policy for the selected view has been reached. For Threshold exceeded you need to specify an additional Metric and the exact threshold. Only when the value set up has been exceeded the webhook will be triggered.

Use Limit based webhooks when you want to be notified that a service interaction you are controllling in Glasnostic is at the limit and Glasnostic is actively managing the communication.

Segmentation webhooks

If you select the Segmentation domain the webhooks will be triggered when interactions between services, controlled and segmented by Glasnostic, have been denied. You do not need to specify any other parameters and the webhook will be triggered every time a connection is denied.

Webhook event reference

Segmentation event

{
"type": "EVENT",
"time": "2021-07-20T07:25:27Z",
"environment": {
"id": "<network>",
"name": "Demo"
},
"webhook": {
"id": "1",
"url": "<url>",
"eventType": "LIMIT_REACHED",
"parameter": {
"domain": "SEGMENTATION"
}
},
"event": {
"type": "LIMIT_REACHED",
"time": "2021-07-20T07:25:27Z",
"domain": "SEGMENTATION",
"content": {
"metric": "requests",
"unit": "r/s",
"limit": 0
}
}
}

Limit event

{
"type": "EVENT",
"time": "2021-07-20T07:25:27Z",
"environment": {
"id": "<network>",
"name": "Demo"
},
"webhook": {
"id": "1",
"url": "<url>",
"eventType": "LIMIT_REACHED",
"parameter": {
"domain": "VIEWS",
"viewId": "*"
}
},
"event": {
"type": "LIMIT_REACHED",
"time": "2021-07-20T07:25:27Z",
"domain": "VIEWS",
"content": {
"metric": "requests",
"unit": "r/s",
"limit": 0
},
"view": {
"id": "*",
"name": "Any view"
}
}
}

Threshold event

{
"type": "EVENT",
"time": "2021-07-20T07:25:27Z",
"environment": {
"id": "<network>",
"name": "Demo"
},
"webhook": {
"id": "1",
"url": "<url>",
"eventType": "THRESHOLD_EXCEEDED",
"parameter": {
"domain": "VIEWS",
"viewId": "1",
"metric": "requests",
"threshold": 50
}
},
"event": {
"type": "THRESHOLD_EXCEEDED",
"time": "2021-07-20T07:25:27Z",
"domain": "VIEWS",
"content": {
"metric": "requests",
"threshold": 50,
"unit": "r/s",
"value": 0
},
"view": {
"id": "1",
"name": "RecommendationService"
}
}
}