cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

105
Views
0
Helpful
0
Replies
Highlighted
Beginner

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

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

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards