DX Unified Infrastructure Management

 View Only
  • 1.  How to get nimid with Luascript?

    Posted Jan 18, 2018 04:17 AM


    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.

  • 2.  Re: How to get nimid with Luascript?

  • 3.  Re: How to get nimid with Luascript?

    Posted Jan 19, 2018 02:12 PM



    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 : 






    Best Regards,


  • 4.  Re: How to get nimid with Luascript?

    Broadcom Employee
    Posted Jan 26, 2018 03:30 AM

    Hi LWIE,


    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



  • 5.  Re: How to get nimid with Luascript?

    Posted Feb 09, 2018 09:59 AM

    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.