Hi,
I am a colleague of Abhishek and we want to achieve the following.
We would like to receive alarms from external monitoring systems by using the UIM
Rest API. In order to create a high availability solution we have deployed two wasp UIMAPI services which are Load balanced with a Master Slave http setup.
The problem we observed is that when you create an alarm via the rest API the robot field is ignored since the service is using nimalarm and therefor it sets the robot name to the wasp computer name.
This complicates the alarm correlation since alarm events arrive with from two different wasp robots.
That is why we tried to change the robot name in the pre proc rule by setting the robot name equal to the source field.
We also tried to create a AO rule which would close the alarm and recreate a rawalarm with the robot name set to the source.
However closing the original alarm will prevent the AO to be triggered when a green alarm is send.
Not closing the alarm but creating a new alarm is working if the alarms are received from one wasp.
It would fail if there is an active alarm from wasp uimapi 1 and the slave would be active receiving the green alarm.
I hope you have a solution ?
Or do you think that the rest api should support the robot name as it implies in the documentation.
Best Regards,
Hans Neesen
Original Message:
Sent: 12-12-2019 09:37 AM
From: Gene HOWARD
Subject: Lua Pre-Processing
so the robot name can not be updated with pre-processing the hostname can. To update the robot field you would need to use alarm_enrichment.
this is the simple test script I created
print("Start of test")
print ("robotname1:"..event.robot)
event.robot = "test-robot"
print ("robotname2:"..event.robot)
print ("hostnamename1:"..event.robot)
event.hostname = "test_hostname" -- and so on for _3 through _5
print ("hostnamename2:"..event.robot)
return event
can you provide more insight into why you need to change the alarm on the individual alarm rather than at the robot level?
------------------------------
Gene Howard
Principal Support Engineer
Broadcom
Original Message:
Sent: 12-12-2019 09:20 AM
From: Abhishek Singh
Subject: Lua Pre-Processing
I'm not sure if this is right but when I set
event.robot="Test"
I do see in nas logs
Dec 12 15:17:17:414 [2916] 0 nas: SCRIPT: robot:Test
Dec 12 15:17:17:414 [2916] 0 nas: SCRIPT: hostname:10.3.203.69
But my message in IM still has the old robot name (UIM 9.20)
Original Message:
Sent: 12-12-2019 08:55 AM
From: Gene HOWARD
Subject: Lua Pre-Processing
Please see the below information on what can be modified in the pre-processing lua scripting:
http://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/it-operations-management/ca-unified-infrastructure-management-probes/GA/alphabetical-probe-articles/nas-alarm-server/the-nas-extensions-to-lua-all-versions/language-extensions.html
The event table is placed into the Lua context prior to executing the "custom" pre-processing rule. You may alter (launder) the event by setting these fields: message, level, sid, source, hostname, user_tag1, user_tag2, visible, custom_1 through _5, supp_key, and origin. The following fields are present for the script to use:
.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 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)
see the below KB article on changing fields in lua script:
https://ca-broadcom.wolkenservicedesk.com/external/article?articleId=34318
------------------------------
Gene Howard
Principal Support Engineer
Broadcom
Original Message:
Sent: 12-12-2019 08:31 AM
From: Abhishek Singh
Subject: Lua Pre-Processing
I would like to know if it is possible to update robot name via a Lua Script in a Pre-Processsing rule.
If this is the possible then are there any examples available