- Community Home
- >
- Networking
- >
- IMC
- >
- CLI Script with dynamic variables
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2016 02:57 AM
10-07-2016 02:57 AM
CLI Script with dynamic variables
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2016 02:59 PM
11-15-2016 02:59 PM
Re: CLI Script with dynamic variables
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2016 05:06 AM
11-16-2016 05:06 AM
Re: CLI Script with dynamic variables
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