cancel
Showing results for 
Search instead for 
Did you mean: 

Netsight Script Error Wrong # args

Netsight Script Error Wrong # args

Joshua_Puusep
New Contributor III
Hello,

We are trying to use a very simple script to update our NTP settings. Running the following script produces the error below. We have another basic scripts for snmp settings that we've used in the past with success, but now produces the same error. We are running Netsight 7.0.9.4. Any suggestions would be appreciated. Thanks much.

#@MetaDataStart
#############################################################################################
# Define your user parameters in this section. For reference, see bundled scripts.
#############################################################################################
#@MetaDataEnd
# Enter all CLI commands from here
set sntp server xxx.xxx.xxx.xxx
clear sntp server xxx.xxx.xxx.xxx
save config

*** Error at line - 13 ***
wrong # args: should be "set varName ?newValue?"

Note there are only 9 lines in the script....

Update: I've narrowed down the issue to the "set" command. The script seems to expect a variable name and not a cli command. note that we are trying to run this again B-Series Switches. Also opened a ticket with GTAC for more info.
1 REPLY 1

Joshua_Puusep
New Contributor III
Tuns out you need to prepend CLI for set commands. The following works:
CLI set sntp server xxx.xxx.xxx.xxx.
GTM-P2G8KFN