robert.j.deangelo

Lua Script help needed.

Discussion created by robert.j.deangelo on Mar 15, 2012
Latest reply on Mar 15, 2012 by 1_keithk

Currently running shell script to activate probe profiles based on a logmon action, need to change to use nas to run a lua script to do the same thing.  Not sure how the lua script should look. Any help would be appreciated.

 Below is sample of shell script:

#!/bin/sh

/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/controller probe_config_set "dirscan" "watchers/NMSITT_NMSQAS_SCADA_TAGS" "active" "yes" "" "inbqlnms3"
/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/controller probe_config_set "dirscan" "watchers/NMSITT_NMSQAS_OMS_STATUSES" "active" "yes" "" "inbqlnms3"
/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/controller probe_config_set "dirscan" "watchers/NMSITT_NMSQAS_DEVICE_ATT" "active" "yes" "" "inbqlnms3"
#Command to reset dirscan probe configuration
/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/controller probe_config_set  "cdm" "disk/alarm/fixed/#app#Interfaces" "active" "yes" "" "inbqlnms3"
/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/controller probe_config_set  "cdm" "disk/alarm/fixed/#app#oracle" "active" "yes" "" "inbqlnms3" 
/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/controller probe_config_set  "cdm" "disk/alarm/fixed/#app#weblogic" "active" "yes" "" "inbqlnms3"
/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/controller probe_config_set  "cdm" "disk/alarm/fixed/#opt#oms" "active" "yes" "" "inbqlnms3"
/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/controller probe_config_set  "cdm" "disk/alarm/fixed/#users#backup" "active" "yes" "" "inbqlnms3"
/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/controller probe_config_set  "cdm" "disk/alarm/fixed/#users#nmsqas" "active" "yes" "" "inbqlnms3"
/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/controller probe_config_set  "cdm" "disk/alarm/fixed/#users#nmsqas#data" "active" "yes" "" "inbqlnms3"
#Command to reset cdm probe configuration

sleep 1

/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/dirscan _restart
/opt/nimbus/bin/pu -u administrator -p XXXXXXX /Dominion/Innsbrook1/inbqlnms3/cdm _restart
#Command to restart the probe so changes will take affect.

Outcomes