Network Management

 View Only
  • 1.  CLI Script with dynamic variables

    Posted Oct 07, 2016 05:57 AM

    Hello,

    I want to write a CLI Script with a dynamic variable, depending on which switch is executing the script. For example the device IP address or the current date and time.

    Example Code:

    copy command-output "show tech all" tftp 10.10.10.10 $DEVICE_IP-$DATETIME.txt

    Unfortunately I can't find a list of variables for CLI scripts. Is it even possible in IMC to do this? I know that it is quite simple in f.e. Solarwinds.

     



  • 2.  RE: CLI Script with dynamic variables

    Posted Nov 15, 2016 06:00 PM

    Would also like to know if there is a list of variables which can be incorporated into the 'Configuration Template' script such as hostname, host IP, Date/Time etc.

     

    Bob G. 

     



  • 3.  RE: CLI Script with dynamic variables

    Posted Nov 16, 2016 08:07 AM

    Hello,

    You can basically build variables with any SNMP object available on your switch.

    Obviously the MIB must be loaded in your IMC, and you should know the MIB module name.

    The format is $(MIBNAME|objectId|instanceNumber)

    p.ex. if you want the systemName, the variable will look like this:

    $(RFC1213-MIB|sysName|0) 

    Ray