We would like to get the nimid of a new alarm which we generat with another script. So we can check if the new alarm is creating a ticket in the SDM which it will write in the UIM database and if the ticket was created then the alarm should be acknowledged if not it should send an SMS or an email and to acknowldge the alarm we need the nimid otherwise we can not close the alarm with the function action.close(nimid)
We already fail to get the nimid because we're not familiar with the lua scripting language. We already managed to connect to our MSSQL database and do the SQL SELECT statment.
Check this article for alarm.get() supposed to be used with an AO profile
and the data structure listed in this page:
an example in previous post
I think pre-processing rules doesnt have the NimID in the context (and think like action.close etc are not available).
For AO scripts, we have few examples here :
GitHub - UIM-Community/Lua-codebase: CA - UIM - Nas LUA Code base
If i remember well alarm.get() without id return the current alarm (not sure). Anyware look at these :
If I understand correctly you want to check nimid in alarms outside current profile or rule.
Actually you don't need to connect to SLM database, instead you can connect to nas internal databaase
and query table NAS_TRANSACTION_LOG or NAS_TRANSACTION_SUMMARY with filters in the where clause for nimid you need
Hope this helps
LWIE hi there, i am moving this thread to the CA Unified Infrastructure Management community, please be sure to head on over to that community and follow.