Configure webhook in Grafana
Configure webhook endpoint in Grafana so that SR Ops can communicate with Grafana using the endpoint.
Antes de Iniciar
Ensure you have done the following actions:
- Created a webhook endpoint in SR Ops. For more information, see Create a webhook endpoint in SR Ops.
- Created an account in Grafana.
Role required: evt_mgmt_integration
Procedimento
- Log in to the Grafana console.
-
In the left navigation pane, click the Bell icon (
) and then click Alerting > Notification channels.
The Alerting page appears and the Notification channels tab is selected by default. -
Click New channel.
The New notification channel form appears.
- To create a webhook, scroll down to the Webhooks section and click New.
-
On the form, fill the fields.
Field Description Name Name of the notification channel. Type Type of the notification channel. Nota:You need to select the type as webhook.Url Enter that webhook url that you have already created. Optional Webhook settings Http Method The protocol to enable communication. Nota:You need to select POST.Username User name for the ServiceNow user who has the evt_mgmt_integration role. Password Password for the ServiceNow user. Notification settings Options to manage your notifications. - To verify your configuration, click Test.
- Click Save.
-
In the left navigation pane, click the Dashboards icon (
) and then click Manage.
- Click an existing dashboard where you want to add the alert rules and conditions.
- Right-click on the required panel and click Edit.
- Click the Create Alert tab and click the Create Alert button.
- Provide the rules and conditions for the alert.
- In the Notification section, under Send to, click the + sign and add the notification channel which you have created.
-
In the Tags section, add the following tags:
- severity: (Optional) Severity with which alert has to be created.
- count: (This tag is mandatory, otherwise the alerts won't close automatically in ServiceNow.) The number of devices, hosts, or servers monitored by this alert rule.
-
Click Save.
Alert rule is created. To access your alert rule, in the left navigation pane, click the Bell icon (
) and then click Alerting > Alert Rules.
Nota:You may see extra clear events coming into ServiceNow which are not bound to an alert. Ignore them as they are created to overcome the issue of Grafana not sending information in the clear notification.