The REST API and the parameter description for generating alarms is given below:
https://[HOST]:[PORT]/AppManager/xml/generateAlert?apikey=[apikey]&resourceid=[Resourceid]&attributeid=[attributeid]&severity=[severity as number]&alarmMessage=[Cause for the alert]
Supported HTTP methods: GET
Allowed roles: Administrator
The common parameters involved in the API request are described below:
| Field | Description |
|---|---|
| resourceid * | Resource ID of monitor or MG to which alert should be generated |
| attributeid * | ID of the attribute to be affected |
| entity | Either above two values should be provided or entity should be provided in the format resourceid_attributeid |
| severity * | Severity of the alert to be generated [ 1 - Critical , 4 - Warning and 5 - clear] |
| alarmMessage * | Customized message (Cause for the alert) - Text CustomMessage. will be appended in front of provided message in order to find difference between alert generated by poll and alert generated by this API |
| actualAlarmMessage | If you don't want your RCA Message to be appended with the text CustomMessage, you can use this parameter instead of alarmMessage param. On providing both the params(alarmMessage and actualAlarmMessage), actualAlarmMessage will be given high priority. |
| eventParams | JSONObject - Params can be sent either as JSONObject or request params. (As of now SyncEventServlet is used for synching alerts and parameters are sent as JSONObject with the key eventParams. The same can be sent for this Rest API to sync alerts without any core change) |
Note: The parameters marked with an * are mandatory.
It allows us to track crucial metrics such as response times, resource utilization, error rates, and transaction performance. The real-time monitoring alerts promptly notify us of any issues or anomalies, enabling us to take immediate action.
Reviewer Role: Research and Development