Storing commands in the nco_http properties file

You can use the nco_http utility's properties file ($OMNIHOME/etc/nco_http.props) to hold frequently used command characteristics.

If you have a particular command that you send to the probe regularly, you can store characteristics of that command in the nco_http properties file. Once you have done that, the format of the nco_http command line is simplified.

You can use the one or more of the following nco_http properties to hold default values for the equivalent options on the nco_http command line:

  • Data
  • DataType
  • Method
  • URI

Specify the value of each property in the same way as you would on the command line. Once you have these values in place you do not need to specify the corresponding command line switch unless you want to override the value of the property.

The following is an example of the use of the properties file and the simplification of the nco_http command that results. In this example, the nco_http properties file contains the following values (note that line breaks appear for presentational purposes only; when editing the properties use one line for each property value):

Data : '{"command":"ackAlarm", "params":[{"alarmId":"alarm1", 
"emsId":"EMS1", "managedElementId":"ME1", "username":"root"}]}'
DataType : 'application/JSON'
Method : 'POST'

To use this set of values use the following nco_http command:

$OMNIHOME/bin/nco_http -uri http://test1.example.com:6789