How can I restart a probe 'On Interval'?

Document ID : KB000034349
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

How can I restart a probe on an interval?

Answer:

One method of restarting a probe on an interval involves the use of the nas probe with a script that is run on a scheduled interval.  The following steps outline how to perform this action using the nas.

Creating the script

  1. Open the nas GUI
  2. Click the Auto-Operator tab
  3. Click the Scripts sub-tab
  4. Right click in the file list window and and choose New -> Script
  5. Use the following code template, replacing "addr" and "probe" with actual values from your environment and save it.
addr = "/domain/hub/robot/controller"-- Build Nimsoft address for robot whose probe needs to be restarted
probe = "dashboard_engine"-- specify the probe to be restarted
local args = pds.create()-- create data structure to pass arguments to probe callbacks
pds.putString(args,"name",probe)
nimbus.request(addr,"probe_deactivate",args)
sleep(30000)-- 30 seconds delay b/w de-activating and activating the probe
nimbus.request(addr,"probe_activate",args)
pds.delete(args)


Creating the schedule

  1. Click the Scheduler sub-tab
  2. Right click in the schedule list window and choose New
  3. Set Mode to "By Recurring Event"
  4. Set Operation to "Execute Script"
  5. Set the Start at date to a date in the past
  6. Set the time section to a starting time that is applicable to your needs
  7. Set Pattern to an interval period that is applicable to your needs
  8. Choose your script from the Script dropdown
  9. Click OK
  10. Enter a name for the schedule
  11. Right click on the schedule and click Activate
  12. Click Apply and Yes to restart the nas probe