In Enterprise Alert you can create your own custom event providers allowing you to submit event data from backend systems via HTTP GET, HTTP POST or SOAP / .NET Web services. This is a very powerful way to integrate with proprietary tools and infrastructure.
The Web Services interface of Enterprise Alert offers a convenient way for testing / simulating events. Basically, the following four steps are required:
- Create your own event provider along with custom event parameters.
- Create a policy in Enterprise Alert for generating alerts out of events.
- Send test events from a Web page and track the resulting alerts in Enterprise Alert Web portal.
- Request the status for submitted events as well as for the generated alerts.
Below these steps are described more in detail:
At first you need to reach out the pages where the web services are hosted. Therefore use the following URL: “http://<your-server>/EAWebService/EventProviderAPI.aspx” or use the links that are shown in Enterprise Alert Web portal under endpoints:
Open the URL in your browser and you will see a page with the supported functions:
You can click on those function links to fill in its parameters and instantly call the respective function. As a start you might want to create your event provider, which is the Web Service interface including your custom parameters that can be called for raising an event. To create / register such an event provider, you can use the function “RegisterEventProvider” by clicking the regarding link. On the “RegisterEventProvider” page you can enter the parameters as shown below and then click “Invoke”:
As response the Web Service returns the provider ID, e.g. “Provider ID: 23”. You can then create an alert policy directly in Enterprise Alert and select the event provider you have just created. To test the event provider you can use the “RaiseEvent” function. Just click on the link and fill in the parameters like in the figure below:
Immediately after clicking “Invoke” you receive a new event ID, e.g. “EventID: 1234567”.
As alternative way to manually raise the event via the web form you can use a formatted HTTP GET URL like the following one:
http://<your-server>/EAWebService/EventProviderAPI.aspx?Handler=RaiseEvent&Username=Administrator&Password=test&ProviderName=NewProvider&AlertID=456&Description=This is a test alert.
Afterwards you can request the status by using the “GetEventStatus” with the associated EventID:
The mentioned EventID you need to enter here is the one you got back from calling “RaiseEvent”. As result you get all necessary information about the event and in case an alert has been created you get a “ReferenceID”. The result should look like in the example below:
EventID: 1234567
Status: ticket_created
StatusCode: 0
StatusText: Alert with ID 232323 was created by the event 1234567.
ReferenceID: 232323
You can use the ReferenceID to request the status of the generated alert by calling “GetAlertStatus”:
The above request provides you with information and status about the alert that has been created. See an example below:
AlertID: 232323
Status: acknowledged
StatusCode: 0
StatusText: I will be on premise to repair the device by 14:00.
That is it. Now you have a convenient way for sending and evaluating test events to Enterprise Alert without the need of any backend system. To get a description of all available functions of the Enterprise Alert Web Service interface please check the referring manual “Enterprise Alert 2016 HTTP / SOAP API and Connector SDK” which is shipped with the installation. Please note, the Web Service interface is not contained in all Editions of Enterprise Alert.