nhModifyElements changes selected attributes for one or more elements maintained by eHealth. You can use three methods to specify elements: use standard input (stdin), use the -inFile argument, or redirect the output of the nhListElements command as input.
CAUTION: Improper use of this command can result in failure to poll or
incorrect report data. Use this command only if you are an advanced user and are familiar with the effects of this command.
nhModifyElements [ -h ] [ -rev ] -fieldName <fieldName> [ -value <value> ]
[ -inFile <fileName> ] [ -verify ]
-h (Optional) Displays this command usage.
-rev (Optional) Displays the eHealth software revision.
(Required) Specifies one of the following element fields to update: alias, name, poll, pollRate, speed, speedIn, speedOut, includeLanWan or nmsState. You can update only one field at a time. For specific information and requirements concerning the values of each of these field names, refer to the eHealth Administration Reference.
(Optional) Modifies a property for a set of elements without requiring you to generate an input file where the data format is name,value. Specify -value with the following fieldName values: poll (yes, no), pollRate (fast, normal, slow), speed|speedIn|speedOut (speed in bits per second), includeLanWan (yes, no). NOTE: You cannot use the -value parameter with the name or alias fields
(Optional) Specifies the name of the file that contains the list of modifications. Use -inFile to specify unique values for each element, not the same value for all elements; or, create a list and use -value to specify the same value for all elements in the list. If you do not specify an input file, eHealth reads input from standard input. Input has the following format:
name[,value] name[,value] ... name[,value]
If you do not use the -value argument, you must specify a value for each element in the list.
(Optional) Processes the input and produces a DCI file, but does not modify the elements in the eHealth configuration.
The following example changes the poll rate of all elements in the file subnet5Routers to normal:
nhModifyElements -fieldName pollRate -value normal -inFile subnet5Routers
The following command finds all elements that have not collected data for four hours and turns off polling for them:
nhListElements -noDbDataFor 4 | nhModifyElements -fieldName poll -value off
The following command lists all elements that have a speed of 9600 bps and changes them to a speed of 19200 bps:
nhListElements -where "speed = 9600" | nhModifyElements -fieldName speed -value 19200
For more information, refer to the eHealth Administration Reference.