Skip to content

How to send API Event

How to send event to EMS2.0

Summary

EMS2.0 provides multiple ways to ingest events/alerts, including webhooks(emsv1), Grafana Alert, Prometheus AlertManager, Thousandeyes, Splunk, SNMP traps, Email etc. This document will cover the details of each method and provide guides for configuration.

Authentication

EMS2.0 use API key for authentication, you need to create an API key first.

Get the API Key

  1. Login into EMS2.0 with admin role.
  2. Go to Settings -> API Keys -> Create API Key.
  3. Input the Name and Description, then click Create.
  4. Copy the API Key and save it for later use.

Or contact EMS admin to create API key for you.

Use the API Key

The API key need be included in the request header X-API-KEY.
Example:

X-API-KEY: your_api_key_here
Or use basic auth with username as x-api-key and password as your actual API key.

Webhook (emsv1)

EMS2.0 support webhook with emsv1 format. Most of the wehooks can be configured to send alerts with emsv1 format body.
You can send single event or bulk events to https://<ems_domain>/v2/alerts/event/emsv1 and add the header X-API-KEY with your actual API key.
Details please refer to Emsv1 Provider document.

Grafana Alert

EMS2.0 support Grafana Alert webhook. You can configure the EMS endpoint in Grafana alerting channel.
1. Go to Alerting -> Notification channels -> New channel.
2. Select Webhook as Type.
3. Input the Name and Url, the URL format is https://<ems_domain>/v2/alerts/event/grafana.
4. Add the header X-API-KEY with your actual API key.
5. Save the channel and use it in your alert rules.

Prometheus AlertManager

EMS2.0 support Prometheus AlertManager webhook.
You can configure the EMS endpoint in LMA contact point as https://<ems_domain>/v2/alerts/event/prometheus and add the header X-API-KEY with your actual API key.

Thousandeyes

EMS2.0 support Thousandeyes webhook.
You can configure the EMS endpoint in Thousandeyes alerting settings as https://<ems_domain>/v2/alerts/event/thousandeyes and add the header X-API-KEY with your actual API key.

Splunk

EMS2.0 support Splunk webhook.
You can configure the EMS endpoint in Splunk alerting settings as https://<ems_domain>/v2/alerts/event/splunk and add the header X-API-KEY with your actual API key.

SNMP Trap

EMS2.0 support SNMP trap. Refer to SNMP Provider document for details.

Email

EMS2.0 support consume email and convert as alerts/events. You can just simply send email to pmcalarms.gen@cisco.com(prod) or emsbts.gen@cisco.com(bts).
The subject and body must follow the required format, refer to How to send Email Alert document for details.