Probe Management - Probe Busy

Hawkeye supports the ability for a custom script on an endpoint to determine when the probe is busy and therefore unavailable for tests. The Hawkeye Server in Probe Management indicates when an endpoint is down or up. This feature introduces a third state of busy for the endpoint. When a probe becomes busy, the state will be reflected in Probe Management in blue for that probe and it will not be available to run tests. All scheduled tests will remain in a queued state until endpoint leaves the busy state.

To turn on this feature, go to Preferences> Advanced Options and select Probe Busy parameter. A user defined script is placed on all endpoints that the probe busy feature is intended for. The purpose of the endpoint probe busy script is to determine when the probe is busy and not available for tests. You should define the script on the probe that determines when a probe is busy. The Hawkeye server will send a command down to each endpoint every so many seconds to execute the script and retrieve the busy status. The frequency of requesting probe busy status is determined by the Hawkeye System Preference parameter Real services: default interval time for automatic endpoints in Advanced Options tab.

When the feature probe busy is turned on, it is not necessary for all endpoints to contain the busy script. For all endpoints not containing the busy script, a result of not busy will be returned.

Below a sample script indicates a probe is busy for a defined period each day.

Use case

This is an example probe busy script which indicates a probe is busy during the peak network busy time of early evening.

Use ssh to connect to the endpoint and create the probe busy script as below. The script must be in the specified directory and use the specified filename.

  1. Create a file on the endpoint named testIfProbeBusy with the following script.

# cd /home/ixia/

 

# nano testIfProbeBusy.py

#!/usr/bin/python

import datetime

import sys

# use format HHMM

simulate_unavailable_start_time = "1326

simulate_unavailable_end_time = "2100

debug = 0

test_start_time = datetime.datetime.now()

test_start_time_str = test_start_time.strftime('%d-%b-%y %H:%M:%S')

test_start_hhmm = test_start_time.strftime("%H%M")

if test_start_hhmm >= simulate_uanavailable_start_time and test_start_hhmm <= simulate_uanavailable_end_time:

endpoint_busy = 1

else:

endpoint_busy = 0

if debug > 0:

sys.stdout.write('\nDEBUG: %s endpoint_busy=%s unavailable from %s to %s \n' %

(test_start_time_str, endpoint_busy, simulate_uanavailable_start_time,

simulate_uanavailable_end_time))

sys.exit(endpoint_busy)

  1. Next ensure script is available for executable

# chmod +x /home/ixia/testIfProbeBusy

  1. On the Hawkeye server UI, under Administration > Preference > Advanced Options, turn on the Probe Busy.

The Hawkeye server will now send frequent commands (default every 5 seconds) down to each endpoint to run the testIfProbeBusy script. The script will return “1” if busy or “0” if available for tests. The Probe status for the endpoint will reflect busy with a blue color when busy. If an endpoint does not contain the script it will always return a not busy status.

When a test runs and the probe is blue indicating busy, the test will enter a queued state. If the test is scheduled to run every minute only one instance of that test will be queued. The scheduled test will continue as normal when probe becomes available. If three different tests are scheduled to run each minute against the probe only one instance of each of the three tests will be queued until probe becomes available.

Probe Busy functions are only supported on XR endpoints.