update - Updates Model and Model Attributes
Use the update command to update model and model type attributes.
Use the update command to update model and model type attributes.
The command has the following format:
update [mh=modelhandle] attr=attribute_id[,iid=instance_id],val=value [attr=attribute_id[,iid=instance_id],val=value...] | [mh=modelhandle] attr=attribute_id,iid=instance_id,remove [attr=attribute_id,iid=instance_id,remove...] | [-n] mth=model_type_handle | attr=attribute_id,val=value [attr=attribute_id,val=value ... ] [lh=landscape_handle] | alarm [-r] aid=alarm_id <assign=troubleshooter | status=status_text | ticket=troubleticketID | ack=(true|false)> [lh=landscape_handle] | action=action_code [watch=watch_id] [mh=modelhandle]
- -nIf the -n (no prompt) option is specified with the update command, then the system does not prompt for confirmation. This option is useful in CLI scripts.
- -rThe -r (replace status text/replace trouble ticket ID) option can be specified with the update alarm command when using the status or the ticket arguments. When the -r option is used, the existing alarm status text or alarm trouble ticket ID is replaced with the text specified by the status argument or the ticket argument. When the -r option is not used, the new values are appended to the existing values.
- reconfig, 0x1000e, or 65550 to reconfigure a model
- activate, 0x00480003, or 4718595 to activate a watch
- deactivate, 0x00480004, or 4718596 to deactivate a watch
- reconfigure_apps, 0x210008, or 2162696 to reconfigure application models on Cisco and Wellfleet devices
- reload_event_disp, 0x000100a2, or 65698 to update theSpectroSERVERwith changes to EventDisp and AlertMap files
The watch =
<watch_id>parameter is applicable only for the following actions: activate (or the hexadecimal equivalent 0x00480003) and deactivate (or the hexadecimal equivalent 0x00480004).
The following points describe the features of update command:
- The update command updates the attribute specified by attribute_id value either for model with model_handle or for all models with the model type model_type_handle in the landscape specified by landscape_handle.
- Multiple attributes can be updated with one update command by specifying multiple attribute_id, value pairs, each pair that is separated from adjacent pairs by a space.
- The remove option removes instances that are specified from a list attribute.
- If landscape_handle is not specified when updating model type attributes, the current landscape is used. If model_handle is not specified, then the specified attribute of the current model is updated.
- When you are updating model type attributes, remember that only shared attributes can be updated. Shared attributes are attributes that have the shared flag set. Use the show attributes command to see if an attribute is shared.
- Security-sensitive attributes, such as User_Community_String and Model_Security_String, can be updated through CLI. However, the current user model cannot update its own User_Security_String or Security_String, but it can update those of other models.
- The update command also lets the user specify an instance ID when changing a single attribute value. When updating a list of attribute values, an instance ID can be specified for each attribute on the list. instance_id is the instance ID for the corresponding attribute. The instance_id must be a positive integer, or sequence of dot-separated positive integers.
- If an instance ID is not specified, the update command uses the first valid instance that it finds for the attribute. If no valid instances are found, an error message is displayed:update: no valid instance for list attribute <attr_id>
- The update alarm command updates the alarm specified by alarm_id with the value specified by the Troubleshooter (Troubleshooter model handle or Troubleshooter name), status_text, troubleticketID, or ack parameter. To clear the existing alarm values for Troubleshooter, Status text, or Trouble Ticket ID, you can set the appropriate parameter to have no value (status=, ticket=, or assign=). The landscape_handle parameter specifies the landscape in which the alarm will be found.
- The update action command performs an action specified by action_code on a device specified by model_handle. With action_code reconfig, any device of model type GnSNMPDev, or of any model type that inherits from GnSNMPDev, can be reconfigured. The activate or deactivate action_code update a watch status on a device of a specified model_handle. When the activate action object is sent, there may be a short delay between the time the watch status changes from INITIAL to ACTIVE, depending upon the intelligence that is built into the selected model. The watch_id of the watch slated to have its status updated can be obtained by using the show watch command. The reconfigure_apps action_code update application model types for Cisco and Wellfleet device models. The reload_event_disp action_code update theSpectroSERVERwith changes made to EventDisp or AlertMap files.
- Use caution when using the update action command. As with any CLI command, you can corrupt theSpectroSERVERdatabase if you use this command incorrectly. For example, inadvertently reconfiguring a critical router can cause unpredictable results on your network.
- If update is entered with a valid model_handle or valid model_type_handle, valid attribute_id(s), and valid values, the modified attributes and their values are displayed in the following format:Id Name Value Id Name Value
- If you do not use the -n option when updating models of a specified model type, the following confirmation message is displayed:update: all models of this type will be updated, are you sure? Valid responses are y, yes, Y, Yes, n, no, N, No.
- If the update alarm command is successful, the following message is displayed:update:successful
- If the update action command is successful, the following message is displayed:update action: successful
- In the following example, the update command with an instance_id is used to disable port 7 on board 5 of the Hub represented by model handle 0x4001f6:$ update mh=0x4001f6 attr=0x10ee0,iid=5.7,val=1 Id Name Iid Value 0x10ee0 CsPortAdminState 1
- In the following example, the update command is used with the remove option to remove an IP address (iid) from the deviceIPAddressList (attr) for a particular model (mh).$ update mh=0xc600018 attr=0x12a53,iid=10.253.8.65,remove update: successful
- In the following example, the update command is used to update the attribute named AutoPlaceStartX on all models of the model type represented by model type handle 0x10059.$ update mth=0x10059 attr=0x118f2,val=100 lh=0x400000 update: all models of this type will be updated, are you sure? y Id Name Value Id AutoPlaceStartX 100
- In the following example, the update alarm command is used to update an alarm troubleshooter assignment.$ update alarm aid=928 assign=0xa600722 update: successful
- In the following example, the update alarm command is used to update alarm status. The -r option is used to overwrite the existing status.$ update alarm -r aid=928 status='Working on it' update: successful
- In the following example, the update alarm command is used to update the alarm Trouble Ticket ID. The -r option is used to overwrite the existing value for Trouble Ticket ID.$ update alarm -r aid=928 ticket='Ax1009' update: successful
- In the following example, the update alarm command is used to clear the existing value for Trouble Ticket ID.$ update alarm aid=928 ticket= update: successful
- In the following example, the update alarm command is used to acknowledge the alarm.$ update alarm aid=928 ack=TRUE update: successful
- In the following example, the update command is used to restrict updating of the User_Community_String.$ update mh=0x9a000ff attr=0x1007a,val=AA,11 update: successful
- In the following example, the update action command is used to reconfigure a Cisco router.$ update action=reconfig mh=0xc600030 update action: successful $ update action=activate watch=0xffff0001 mh=0xc600015 Watch_Id MHandle Watch_Status 0xffff0001 0xc600015 INITIAL $ update action=0x480004 watch=0xffff0001 mh=0xc600015 Watch_Id MHandle Watch_Status 0xffff0001 0xc600015 INACTIVE