Commands supported by the probe over HTTP/HTTPs

The following sections define the structure of the 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://test1.example.com and a HTTP listening port of 6789.

acknowledgeAlarm

Use the acknowledgeAlarm command to acknowledge an alarm.

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

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

Where:

  • alarmIds is a comma-separated list of identifiers of the alarms that you want to acknowledge.

The following example acknowledges the alarms with IDs 111 and 222:

$OMNIHOME/bin/nco_http -uri http://test1.example.com:6789/probes/huawei_u2000_corba -datatype application/JSON -method POST -data '{"command":"acknowledgeAlarm", "params":[{"alarmIds":"111,222"}]}'

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://test1.example.com:6789/probes/huawei_u2000_corba -datatype application/JSON -method POST -data '{"command":"help", "params":[]}'

The response from the probe includes the following message:

Information: I-UNK-104-002: {"response":"Available commands: ackAlarm(alarmId String,emsId String,managedElementId String,username String), unackAlarm(alarmId String,emsId String,managedElementId String,username String), resync(), resyncFilter(excludeSeverity String,excludePbCause String), stop() ","status":"200"}

resync

Use the resync command to perform a resynchronization with the endpoint using the value specified by the ResyncSeverityFilter and ResyncProbableCauseFilter properties.

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

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

The following example resynchronizes the probe:

$OMNIHOME/bin/nco_http -uri http://test1.example.com:6789/probes/huawei_u2000_corba -datatype application/JSON -method POST -data '{"command":"resync", "params":[]}'

resyncFilter

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

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

-data '{"command":"resyncFilter","params":[{"excludeSeverity":"sev=severities", "excludePbCause":"pbCause=probable-causes"}]}'

Where:

  • severities is a list of severities to exclude when the probe resynchronizes with the CORBA interface. Separate each entry in the list with a semicolon.
  • probable-causes is a list of probable causes to exclude when the probe resynchronizes with the CORBA interface. Separate each entry in the list with a semicolon.

The following example resynchronizes the probe an excludes alarms with a severity of PS_CLEARED or PS_WARNING:

$OMNIHOME/bin/nco_http -uri http://test1.example.com:6789/probes/huawei_u2000_corba -datatype application/JSON -method POST -data '{"command":"resyncFilter", "params":[{"excludeSeverity":"sev=PS_CLEARED;PS_WARNING", "excludePbCause":"pbCause="}]}'

stop

Use the stop command to shut down the probe.

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

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

The following example stops the probe:

$OMNIHOME/bin/nco_http -uri http://test1.example.com:6789/probes/huawei_u2000_corba -datatype application/JSON -method POST -data '{"command":"stop", "params":[]}'

unacknowledgeAlarm

Use the unacknowledgeAlarm command to clear an alarm.

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

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

Where:

  • alarmIds is a comma-separated list of identifiers of the alarms that you want to unacknowledge.

The following example unacknowledges the alarms with IDs 111 and 222:

$OMNIHOME/bin/nco_http -uri http://test1.example.com:6789/probes/huawei_u2000_corba -datatype application/JSON -method POST -data '{"command":"unacknowledgeAlarm", "params":[{"alarmIds":"111,222"}]}'