DX Infrastructure Manager

  • 1.  LUA scripting question

    Posted 05-10-2017 12:05 PM

    We are attempting to create a LUA script to enter data into custom_4 in the NAS pre-processing section.  The end result is that we want custom_4 = custom_3 hostname subsystem.  Those three items.  Custom_3 is created in a alarm_enrichment rule.  We attempted to fill custom_4 with an alarm_enrichment, but since the alarm hasn't been put into a database the subsystem value was coming out incorrectly some of the time.  We got random data for subsystem.


    So that left us to create a LUA script.  Can anyone help us with the syntax we would need?  




  • 2.  Re: LUA scripting question
    Best Answer

    Posted 05-11-2017 05:22 PM

    Hi Rod,


    First if you need some lua examples code (for other needs etc..) : 

    GitHub - UIM-Community/Lua-codebase: CA - UIM - Nas LUA Code base 


    Nas scripting (official API) : 

    The nas Extensions to Lua (All Versions) - CA Unified Infrastructure Management Probes - CA Technologies Documentation 


    Just create a pre-processing script with this code in : 


    event.custom_4 = event.custom_3;return event;


    Save your script and go to the "Pre-processing rules tabs". More informations here : 


    The nas Auto-Operator Tab - CA Unified Infrastructure Management Probes - CA Technologies Documentation 


    Best Regards,


  • 3.  Re: LUA scripting question

    Posted 05-15-2017 06:38 PM

    thanks for the reply.  I'll pass this info on the person who is doing the scripting.