Probe commands

The following sections define the structure of the JavaScript Object Notation (JSON)-formatted commands that you can send to the probe. There is an example of each command.

All the examples use a probe URI of http://localhost and a HTTP listening port of 8080.

version

Use the version command to print the version of the probe.

The format of the -data option for the version command is:

-data '{"command":"version","params":[]}'

The following command returns version information:

$OMNIHOME/bin/nco_http -uri http://localhost:8080/probes/generic_3gpp -datatype application/JSON -method POST -data '{"command":"version", "params":[]}'

acknowledge_alarm

Use the acknowledge_alarm command to acknowledge an alarm.

The format of the -data option for the acknowledge_alarm command is:

-data '{"command":"acknowledge_alarm", "params":[{"alarm_id":"alarmId"}]}'

Where alarmId is the identifier stored in the alarm's AlarmId field.

The following example acknowledges the alarm with an AlarmId of 50047933:

$OMNIHOME/bin/nco_http -uri http://localhost:8080/probes/generic_3gpp -datatype application/JSON -method POST -data '{"command":"acknowledge_alarm", "params":[{"alarm_id":"50047933"}]}'

clear_alarm

Use the clear_alarm command to clear an alarm.

The format of the -data option for the clear_alarm command is:

-data '{"command":"clear_alarm", "params":[{"alarm_id":"alarmId"}]}'

Where alarmId is the identifier stored in the alarm's AlarmId field.

The following example clears the alarm with an AlarmId of 50047933:

$OMNIHOME/bin/nco_http -uri http://localhost:8080/probes/generic_3gpp -datatype application/JSON -method POST -data '{"command":"clear_alarm", "params":[{"alarm_id":"50047933"}]}'

help

Use the help command to receive help information about the HTTP/HTTPS command interface.

The format of the -data option for the help command is:

-data '{"command":"help","params":[]}'

The following command returns help information:

$OMNIHOME/bin/nco_http -uri http://localhost:8080/probes/generic_3gpp -datatype application/JSON -method POST -data '{"command":"help", "params":[]}'

resync_all

Use the resync_all command to perform a complete resynchronization with the endpoint.

The format of the -data option for the resync_all command is:

-data '{"command":"resync_all", "params":[]}'

The following example resynchronizes the probe:

$OMNIHOME/bin/nco_http -uri http://localhost:8080/probes/generic_3gpp -datatype application/JSON -method POST -data '{"command":"resync_all", "params":[]}'

resync_filter

Use the resync_filter command to perform a resynchronization using a custom filter.

The format of the -data option for the resync_filter command is:

-data '{"command":"resync_filter","params":[{"resync_filter":"filter"}]}'

Where filter limits the alarms that are resynchronized.

The following example resynchronizes alarms that have perceived severity of CRITICAL:

$OMNIHOME/bin/nco_http -uri http://localhost:8080/probes/generic_3gpp -datatype application/JSON -method POST -data '{"command":"resync_filter", "params":[{"resync_filter":"perceivedSeverity==CRITICAL"}]}'

unacknowledge_alarm

Use the unacknowledge_alarm command to unacknowledge an alarm.

The format of the -data option for the unacknowledge_alarm command is:

-data '{"command":"unacknowledge_alarm", "params":[{"alarm_id":"alarmId"}]}'

Where alarmId is the identifier stored in the alarm's AlarmId field.

The following example unacknowledges the alarm with an AlarmId of 50047933:

$OMNIHOME/bin/nco_http -uri http://localhost:8080/probes/generic_3gpp -datatype application/JSON -method POST -data '{"command":"unacknowledge_alarm", "params":[{"alarm_id":"50047933"}]}'

userid_acknowledge_alarm

Use the userid_acknowledge_alarm command to acknowledge an alarm.

The format of the -data option for the userid_acknowledge_alarm command is:

-data '{"command":"userid_acknowledge_alarm", "params":[{"ack_user_id":"userId","alarm_id":"alarmId"}]}'

Where:

  • alarmId is the identifier stored in the alarm's AlarmId field.
  • userId is the user name of the user acknowledging the alarm.

The following example acknowledges the alarm with the following characteristics:

  • Alarm Identifier: 50047933
  • User ID: your_user_id

$OMNIHOME/bin/nco_http -uri http://localhost:8080/probes/generic_3gpp -datatype application/JSON -method POST -data '{"command":"userid_acknowledge_alarm", "params":[{"ack_user_id":"your_user_id","alarm_id":"50047933"}]}'

userid_clear_alarm

Use the userid_clear_alarm command to clear an alarm.

The format of the -data option for the userid_clear_alarm command is:

-data '{"command":"userid_clear_alarm", "params":[{"clear_user_id":"userId","alarm_id":"alarmId"}]}'

Where:

  • alarmId is the identifier stored in the alarm's AlarmId field.
  • userId is the user name of the user acknowledging the alarm.

The following example clears the alarm with the following characteristics:

  • Alarm Identifier: 50047933
  • User ID: your_user_id

$OMNIHOME/bin/nco_http -uri http://localhost:8080/probes/generic_3gpp -datatype application/JSON -method POST -data '{"command":"userid_clear_alarm", "params":[{"clear_user_id":"your_user_id","alarm_id":"50047933"}]}'

userid_unacknowledge_alarm

Use the userid_unacknowledge_alarm command to unacknowledge an alarm.

The format of the -data option for the userid_unacknowledge_alarm command is:

-data '{"command":"userid_unacknowledge_alarm", "params":[{"ack_user_id":"userId","alarm_id":"alarmId"}]}'

Where:

  • alarmId is the identifier stored in the alarm's AlarmId field.
  • userId is the user name of the user acknowledging the alarm.

The following example unacknowledgs the alarm with the following characteristics:

  • Alarm Identifier: 50047933
  • User ID: your_user_id

$OMNIHOME/bin/nco_http -uri http://localhost:8080/probes/generic_3gpp -datatype application/JSON -method POST -data '{"command":"userid_unacknowledge_alarm", "params":[{"ack_user_id":"your_user_id","alarm_id":"50047933"}]}'