====== Custom alarm sender ======
With this plugin, you will be able to send all alarms to an endpoint via POST requests.
===== Configuration =====
^ Parameter ^ Description ^
| Active | Plugin state |
| Name | The plugin name |
| Alarms url | The URL for the alarms API |
| Headers | The headers to associate with each request |
| Payload | Define the payload will be send to Alarms url |
| User | The user if Basic authentication is required |
| Password | The associated password |
| Chunk size | The max number of alarms to send per request |
===== Headers =====
* The plugin automatically sets ''Content-Type'' and ''Accept'' headers.
* You cannot overwrite those headers.
===== Chunk size =====
* Specify the limit on the number of alarms sent per API call
* If the limit exceeds 1, the payload will be structured as a JSON table.
* If the limit is exactly 1, the payload will consist of a single JSON element.
* Set a limit of 1 when interfacing with an API that can only handle one alarm per call.
===== Payload =====
Below, the list of all variables available to customize the payload
===== Variables =====
==== Alarm variables ====
^ Variable ^ Type ^ Description ^
^ %ALARM% | Structure | Replaced by all native alarm fields |
^ %ALARM_TAGS% | Structure | Replaced by alarm's tags field |
^ %ALARM_TAGS.[PROPERTY]% | Atomic field | Replaced by property value in tags alarm |
^ %URI% | Atomic field | Replaced by alarm's uri field |
^ %MODULE% | Atomic field | Replaced by alarm's module field|
^ %METRIC_NAME% | Atomic field | Replaced by alarm's metric name field |
^ %HOST% | Atomic field | Replaced by alarm's host field|
^ %CON_ID% | Atomic field | Replaced by alarm's connector id field|
^ %JOB_ID% | Atomic field | Replaced by alarm's monitor id field|
^ %ID% | Atomic field | Replaced by alarm's id field|
^ %ALARM_ID% | Atomic field | Replaced by alarm's alarm_id field|
^ %SEVERITY% | Atomic field | Replaced by alarm's severity field |
^ %MESSAGE% | Atomic field | Replaced by alarm's message field|
^ %TO_CLEAR% | Atomic field | Replaced by alarm's to_clear field|
^ %RAISE_TIME% | Atomic field | Replaced by alarm's raise time field (Date format : yyyy-MM-dd HH:mm:ss zzz)|
^ %RAISE_TIME_UNIX% | Atomic field (Unix Timestamp) | Replaced by alarm's raise time field|
^ %RECEIVE_TIME% | Atomic field | Replaced by alarm's receive time field (Date format : yyyy-MM-dd HH:mm:ss zzz)|
^ %RECEIVE_TIME_UNIX% | Atomic field (Unix Timestamp) | Replaced by alarm's receive time field|
^ %JOB_NAME% | Atomic field | Replaced by monitor name |
==== Organization variables ====
^ Variable ^ Type ^ Description ^
^ %ORGANIZATION% | Structure | Replaced by all native organization fields |
^ %ORGANIZATION.ID% | Atomic field | Replaced by organization's id field|
^ %ORGANIZATION.URI% | Atomic field | Replaced by organization's uri field|
^ %ORGANIZATION.NAME% | Atomic field | Replaced by organization's name field|
^ %ORGANIZATION.SHORT_NAME% | Atomic field | Replaced by organization's short name field|
^ %ORGANIZATION.PROPERTIES% | Structure | Replaced by organization's properties structure |
^ %ORGANIZATION.PROPERTIES.[PROPERTY]% | Atomic field | Replaced by specific organization's property|
==== Group variables ====
^ Variable ^ Type ^ Description ^
^ %GROUP% | Structure | Replaced by all native group fields of connector|
^ %GROUP.ID% | Atomic field | Replaced by group's id field|
^ %GROUP.URI% | Atomic field | Replaced by group's uri field|
^ %GROUP.NAME% | Atomic field | Replaced by group's name field|
^ %GROUP.SHORT_NAME% | Atomic field | Replaced by group's short name field|
^ %GROUP.PROPERTIES% | Structure | Replaced by group's properties structure |
^ %GROUP.PROPERTIES.[PROPERTY]% | Atomic field | Replaced by specific group's property|
==== System variables ====
^ Variable ^ Type ^ Description ^
^ %SYSTEM% | Structure | Replaced by all native system fields |
^ %SYSTEM.ID% | Atomic field | Replaced by system's id field|
^ %SYSTEM.URI% | Atomic field | Replaced by system's uri field|
^ %SYSTEM.NAME% | Atomic field | Replaced by system's name field|
^ %SYSTEM.SHORT_NAME% | Atomic field | Replaced by system's short name field|
^ %SYSTEM.SID% | Atomic field | Replaced by system's SID field |
^ %SYSTEM.ROLE% | Atomic field | Replaced by system's role field|
^ %SYSTEM.ENV% | Atomic field | Replaced by system's enviromnent field |
^ %SYSTEM.PROPERTIES% | Structure | Replaced by system's properties structure|
^ %SYSTEM.PROPERTIES.[PROPERTY]% | Atomic field | Replaced by specific system's property|
==== Connector variables ====
^ Variable ^ Type ^ Description ^
^ %CONNECTOR% | Structure | Replaced by all native connector fields |
^ %CONNECTOR.ID% | Atomic field | Replaced by connector's id field|
^ %CONNECTOR.NAME% | Atomic field | Replaced by connector's name field|
^ %CONNECTOR.PROPERTIES% | Atomic field | Replaced by connector's name field|
^ %CONNECTOR.PROPERTIES.[PROPERTY]% | Atomic field | Replaced by specific connector's property|
==== Properties variables ====
The properties variable contains the inherited connector's properties
^ Variable ^ Type ^ Description ^
^ %PROPERTIES% | Structure | Replaced by all properties structure |
^ %PROPERTIES.[PROPERTY]% | Atomic field | Replaced by specific property |
===== Examples =====
==== Native alarm ====
**Payload :
**
%ALARM%
**Result :**
{
"id": "21164794-8007-422a-8015-a3c1ed75c926",
"alarmId": "50_-10",
"severity": 2,
"message": "Alarm from monitor System Checker",
"toClear": false,
"raiseTime": 1710772087896,
"receiveTime": 1710772091667,
"tenantId": "d624aaf8-5559-4494-8efc-f3e7e6ac275f",
"uri": "/agl/prd/psm/db/syb",
"tags": {
"sid": "PSM",
"host": "sybabase_test",
"stack": "SYBASE",
"module": "SAP_SYSTEM",
"alarm_tag": "",
"agl_company": "AGL"
},
"host": "sybabase_test",
"connectorId": "466d0b30-6958-4ed1-9257-9b121c94b0fe",
"jobId": -10
}
==== Message and severity alarm, and module value from alarm tags ====
**Payload :**
{
"message" : "%MESSAGE%",
"severity" : "%SEVERITY%",
"module" : "%ALARM_TAGS.module%"
}
**Result :**
{
"message": "Alarm from monitor System Checker",
"severity": 2,
"module": "SAP_SYSTEM"
}
==== Native alarm and all system properties ====
**Payload :**
{
"alarm" : %ALARM%
"system_properties" : %SYSTEM.PROPERTIES%
}
**Result :**
{
"alarm" : {
"id": "21164794-8007-422a-8015-a3c1ed75c926",
"alarmId": "50_-10",
"severity": 2,
"message": "Alarm from monitor System Checker",
"toClear": false,
"raiseTime": 1710772087896,
"receiveTime": 1710772091667,
"tenantId": "d624aaf8-5559-4494-8efc-f3e7e6ac275f",
"uri": "/agl/prd/psm/db/syb",
"tags": {
"sid": "PSM",
"host": "sybabase_test",
"stack": "SYBASE",
"module": "SAP_SYSTEM",
"alarm_tag": "",
"agl_company": "AGL"
},
"host": "sybabase_test",
"connectorId": "466d0b30-6958-4ed1-9257-9b121c94b0fe",
"jobId": -10
},
"system_properties" : {
"ex_prop_1": "prop 1",
"ex_prop_2": "prop 2",
}
}
===== Full example =====
{
// Native alarm
"alarm": %ALARM%,
// structure tags in alarm
"alarm_tags": %ALARM_TAGS%,
// sid, company, host, module value in structure tags in alarm
"alarm_tags_sid": "%ALARM_TAGS.sid%",
"alarm_tag_company": "%ALARM_TAGS.agl_company%",
"alarm_tag_host": "%ALARM_TAGS.host%",
"alarm_tag_module": "%ALARM_TAGS.module%",
// Individual alarm property
"uri": "%URI%",
"module": "%MODULE%",
"metric_name": "%METRIC_NAME%",
"host": "%HOST%",
"con_id": "%CON_ID%",
"job_id": "%JOB_ID%",
"id": "%ID%",
"alarm_id": "%ALARM_ID%",
"severity": "%SEVERITY%",
"message": "%MESSAGE%",
"to_clear": "%TO_CLEAR%",
"raise_time": "%RAISE_TIME%",
"receive_time": "%RECEIVE_TIME%",
"job_name": "%JOB_NAME%",
// Organization structure
"org": %ORGANIZATION%,
// Individual organization property
"org_id": "%ORGANIZATION.ID%",
"org_uri": "%ORGANIZATION.URI%",
"org_name": "%ORGANIZATION.NAME%",
"org_short_name": "%ORGANIZATION.SHORT_NAME%",
"org_properties": %ORGANIZATION.PROPERTIES%,
// Group structure
"group": %GROUP%,
// Individual Group property
"group_id": "%GROUP.ID%",
"group_uri": "%GROUP.URI%",
"group_name": "%GROUP.NAME%",
"group_short_name": "%GROUP.SHORT_NAME%",
"group_properties": %GROUP.PROPERTIES%,
// System structure
"sys": %SYSTEM%,
// Individual System property
"sys_id": "%SYSTEM.ID%",
"sys_uri": "%SYSTEM.URI%",
"sys_name": "%SYSTEM.NAME%",
"sys_short_name": "%SYSTEM.SHORT_NAME%",
"sys_sid": "%SYSTEM.SID%",
"sys_role": "%SYSTEM.ROLE%",
"sys_env": "%SYSTEM.ENV%",
"sys_properties": %SYSTEM.PROPERTIES%,
"sys_prop_1": "%SYSTEM.PROPERTIES.Prop_1%"
}
=== Result ===
{
"alarm": {
"id": "21164794-8007-422a-8015-a3c1ed75c926",
"alarmId": "50_-10",
"severity": 2,
"message": "Alarm from monitor System Checker",
"toClear": false,
"raiseTime": 1710772087896,
"receiveTime": 1710772091667,
"tenantId": "d624aaf8-5559-4494-8efc-f3e7e6ac275f",
"uri": "/agl/prd/psm/db/syb",
"tags": {
"sid": "PSM",
"host": "sybabase_test",
"stack": "SYBASE",
"module": "SAP_SYSTEM",
"alarm_tag": "",
"agl_company": "AGL"
},
"host": "sybabase_test",
"connectorId": "466d0b30-6958-4ed1-9257-9b121c94b0fe",
"jobId": -10
},
"alarm_tags": {
"sid": "PSM",
"host": "sybabase_test",
"stack": "SYBASE",
"module": "SAP_SYSTEM",
"alarm_tag": "",
"agl_company": "AGL"
},
"alarm_tags_sid": "PSM",
"alarm_tag_company": "AGL",
"alarm_tag_host": "sybabase_test",
"alarm_tag_module": "SAP_SYSTEM",
"uri": "/agl/prd/psm/db/syb",
"module": "null",
"metric_name": "null",
"host": "sybabase_test",
"con_id": "466d0b30-6958-4ed1-9257-9b121c94b0fe",
"job_id": "-10",
"id": "21164794-8007-422a-8015-a3c1ed75c926",
"alarm_id": "50_-10",
"severity": "2",
"message": "Alarm from monitor System Checker",
"to_clear": "false",
"raise_time": "1710772087896",
"receive_time": "1710772091667",
"job_name": "%JOB_NAME%",
"org": {
"shortName": "AGL",
"uri": "/agl",
"childsUri": [],
"childsUUID": [
"aeae8750-41ea-4d05-ab59-a038c3ad6302",
"8dac7cbf-1eb0-4ae9-b9d7-d92f78b89844"
],
"tags": [],
"properties": {},
"id": "40568f35-4361-499f-a6bb-2984b29e25b5",
"name": "AGL",
"creationDate": 1650364414556,
"updateDate": 1709029294162,
"updatedBy": "31ce6dc7-ceb4-4b98-9500-64083ff42146"
},
"org_id": "40568f35-4361-499f-a6bb-2984b29e25b5",
"org_uri": "/agl",
"org_name": "AGL",
"org_short_name": "AGL",
"org_properties": {},
"group": {
"shortName": "PRD",
"uri": "/agl/prd",
"parentUUID": "40568f35-4361-499f-a6bb-2984b29e25b5",
"childsUri": [],
"childsUUID": [
"8fe9f758-8831-42da-a238-c781d5496bae",
"53743e59-b12e-45f0-bcab-1efa1c2ff8d2",
"76b5fce1-0613-43dc-a31f-3107da1daf72",
"5074f558-08f9-493c-b1ed-0e16885c2316"
],
"tags": [],
"properties": {},
"id": "8dac7cbf-1eb0-4ae9-b9d7-d92f78b89844",
"intId": 8577137,
"name": "Agentil_PROD",
"creationDate": 1650364414556
},
"group_id": "8dac7cbf-1eb0-4ae9-b9d7-d92f78b89844",
"group_uri": "/agl/prd",
"group_name": "Agentil_PROD",
"group_short_name": "PRD",
"group_properties": {},
"sys": {
"shortName": "PSM",
"sid": "PSM",
"type": "NETWEAVER",
"systemProperties": {},
"role": "DEVELOPMENT",
"environment": "BW4",
"uri": "/agl/prd/psm",
"parentUUID": "8dac7cbf-1eb0-4ae9-b9d7-d92f78b89844",
"childsUri": [],
"childsUUID": [
"3d8df04f-0f97-4649-bc27-bffee628bc21",
"5a023df1-691e-4b04-a315-282d711e1261",
"466d0b30-6958-4ed1-9257-9b121c94b0fe"
],
"tags": [],
"properties": {
"Prop_1": "value 1"
},
"id": "8fe9f758-8831-42da-a238-c781d5496bae",
"intId": 18,
"name": "PSM",
"description": "PSM System",
"creationDate": 1650364414557,
"updateDate": 1711038533036,
"updatedBy": "31ce6dc7-ceb4-4b98-9500-64083ff42146"
},
"sys_id": "8fe9f758-8831-42da-a238-c781d5496bae",
"sys_uri": "/agl/prd/psm",
"sys_name": "PSM",
"sys_short_name": "PSM",
"sys_sid": "PSM",
"sys_role": "DEVELOPMENT",
"sys_env": "BW4",
"sys_properties": {
"Prop_1": "value 1"
},
"sys_prop_1": "value 1"
}