UIM - How would you enable or disable a probe profile based on the receipt of an alarm?
search cancel

UIM - How would you enable or disable a probe profile based on the receipt of an alarm?

book

Article ID: 34305

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

How would you enable or disable a probe profile based on the receipt of an alarm?

 

Environment

Any UIM version/Nas version

Resolution

In general, probe callbacks can be used to automate what is available in a probe's Configure GUI and requires manual intervention.  This example will use a nas script to enable an Auto-Operator Profile and a Pre-Processing rule based on the receipt of an alarm.

1- Create a script in nas -> Auto-Operator -> Scripts section:

probe = "nas"

-- Enable Profile

local args = pds.create()

pds.putString(args,"name",probe)

pds.putString(args,"section",<profile>)

pds.putString(args,"key","active")

pds.putString(args,"value","yes")

pds.putString(args,"lockid","")

pds.putString(args,"robot",<robot>)

nimbus.request(robot,"probe_config_set",args)

pds.delete(args) 

 

--Enable Pre-processing rule

local args = pds.create()

pds.putString(args,"name",probe)

pds.putString(args,"section",<preprocessing>)

pds.putString(args,"key","active")

pds.putString(args,"value","yes")

pds.putString(args,"lockid","")

pds.putString(args,"robot",<robot>)

nimbus.request(robot,"probe_config_set",args)

pds.delete(args)

where 

<robot> = "/domain/hub/robot"   -- UIM address of the robot against which to run the script
<profile> = "/auto_operator/definitions/assign_crit"  -- nas Auto-Operator Profile name , "assign_crit" in this example
<preprocessing> = "/filters/exclude/del_test"  -- nas Auto- Operator Pre-Processing rule, an exclude filter "del_test" in this example


2- Create an Auto-Operator Profile matching the alarm condition based on which profile(s)/pre-processing rule(s) that need to be enabled.  Choose" Action type "  as "script" and select the newly created script

3- Save the profile and restart nas

4- Now, when a new alarm comes in matching the nas Auto-Operator Profile, it will run the script and enable the required probe profiles.