cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1296
Views
0
Helpful
0
Replies

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

pil user
Level 1
Level 1

Hi,

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
#end
****

Alternatively, is there another solution to fix this issue?

Best regards
Thomas

0 Replies 0