Add Event API

 
Purpose: To generate events in OpManager.
Prerequisite: Device should be already added.
Request URL:  http://<opmanager-server:port>/api/xml/events/addEvent?apiKey=APIKEY&source=DEVICE-NAME
&severity=SEVERITY-ID&message=EVENT-MESSAGE&alarmCode=ALARM-CODE&entity=ENTITY&eventType=EVENT-TYPE 

Request Parameters:

Parameter
Description
apiKey* API Key to access your OpManager server.
deviceName*
Name of the source device of the event.
severity*
The severity of the event. Following are the severity levels and its ID:
Critical - 1
Trouble - 2
Attention - 3
Service Down - 4
message*
The message that is displayed when the event is generated.
alarmCode
Unique string used to trigger the event notification. Eg:-Threshold-DOWN
entity
Uniquely identifies the failure object within the source.Events will be correlated into alarms according to the entity field. Multiple events with the same entity will be grouped as a single alarm.
eventType
Description of the event type
* - Mandatory parameters

Sample Form (Post Method):
<form method="POST" action="http://opman-vm-win7-2/api/xml/events/addEvent?apiKey=[APIKEY]">
<input type="hidden" name="source" value="[DEVICE-NAME]">
<input type="hidden" name="severity" value="[SEVERITY-ID]">
<input type="hidden" name="message" value="[EVENT-MESSAGE]">
<input type="hidden" name="alarmCode" value="[ALARM-CODE]">
<input type="hidden" name="entity" value="[ENTITY]">
<input type="hidden" name="eventType" value="[EVENT-TYPE]">
<input type="submit" value="Add Event" name="submit">
</form>

Example:

Copyright © 2012, ZOHO Corp. All Rights Reserved.
Network Monitoring Software from ManageEngine