Showing results for 
Search instead for 
Did you mean: 

how to use string from configuration or Prime DB as variable in CLI template

pil user
Level 1
Level 1


Is there a way to use existing information from prime (such as MGMT ip address) or read it out from switch configuration?

We have some switches, which are connected by a third party router to our network. We cannot find any physically connected devices in a branch in Prime. In HQ it works. In Prime -> Device Details -> Clients -> Current Associated Clients -> Current Associated Wired Clients are all clients listed with mac address, but ip address has "IP Not Available".
If I ping a workstation from the directly connected switch and collect information by "Refresh from Device", ip address will show in table and the device can be found trough "Application Search" of Prime.

What I try to do is a script (CLI Template) that do a ping for all addresses within the same subnet as the switch is. This script will scheduled as job and have to start before "Wired Client Status" is execute.

The ping thing itself work with the script below, but it is "hardcoded" to one branch subnet.

#set ($start = 1)
#set ($end = 254)
#set ($set = [$start..$end])
#foreach ($number in $set)
do ping 10.0.0.$number timeout 1 repeat 1

Alternatively, is there another solution to fix this issue?

Best regards

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: