We are creating alarms using UIMAPI Swagger the POST call: /uimapi/alarms/create
the example "Request Body" seems to suggest it is possible to allow the definition of the probe and robot of the generated alarm:
"alarmToken": "string",
"assignedBy": "string",
"assignedTo": "string",
"ciName": "string",
"ciType": "string",
"custom1": "string",
"custom2": "string",
"custom3": "string",
"custom4": "string",
"custom5": "string",
"devId": "string",
"domain": "string",
"hostname": "string",
"hub": "string",
"id": "string",
"level": 0,
"message": "string",
"metId": "string",
"nas": "string",
"origin": "string",
"prevLevel": 0,
"prevSubsystem": "string",
"probe": "string",
"robot": "string",
"severity": "string",
"source": "string",
"subsystem": "string",
"subsystemId": "string",
"suppressionCount": 0,
"suppressionKey": "string",
"timeArrival": "2023-12-29T08:34:53.763Z",
"timeAssigned": "2023-12-29T08:34:53.763Z",
"timeLast": "2023-12-29T08:34:53.763Z",
"timeOrigin": "2023-12-29T08:34:53.763Z",
"userTag1": "string",
"userTag2": "string",
"vars": [
{
"description": "string",
"name": "string",
"status": 0,
"type": "string",
"value": "string"
}
],
"visible": true
}
However, when we use "robot" and "body", as in the example below, they do not work. The alarm generated does not have the robot and probe we defined. Why?
{
"hostname": "example_host",
"message": "example_message",
"probe": "example_probe",
"robot": "example_robot",
"severity": "Warning",
"suppressionKey": "example_supp"
}
UIM 2x.x.x
Working as Designed
Although the Request Body example includes "probe" and "robot", it is not possible to change the default robot and probe on the generated alarm.
The Robot on the alarm will always be the OC robot (where the uimapi is running) and probe will always be wasp (the probe that hosts uimapi).
The reason is that UIMAPI uses nimalarm to generate alarms. Nimalarm is an utility that is present in the Nimsoft/bin folder
Ninalarm does not allow to specify robot and probe.
Instead, source and hostname can be defined in the API POST Call.
The NAS only allows modification, as per design, of the following attributes:
message, level, sid, source, hostname, user_tag1, user_tag2, visible, custom_1 to custom_5, supp_key and origin
The below values in the alarm udata can be used for scripting but only the above list can be modified.
.source - source of the alarm (typically ip-address)
.hostname - resolved name (robotname or ip-address to name resolution)
.level - severity level (0-5)
.sid - subsystem identification.
.message - alarm message text.
.origin - origin of the alarm (stamped by nearest hub, or in some cases the robot.)
.domain - name of originating NimBUS domain.
.robot - name of the sending robot.
.hub - name of the nearest hub to the sending robot.
.prid - name of probe issuing the alarm.
.user_tag1 - user tag 1 (as set by robot).
.user_tag2 - user tag 2 (as set by robot).
.supp_key - suppression identification key.
.visible - flag for visibility (true = visible)