This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Script variables not parsing?

I figured this should work as a test but it doesn't

I simply created a script, then run this script against a node

:log warning "Script Test Start"

:log warning "Node IP is ${N=SwisEntity;M=IP_Address}"

:log warning "Node IP also is ${IP}"

:log warning "Script Test End"

since i'm only getting 2 log entries, it looks like it's literally pasting those characters in (which is an invalid command and gets rejected)

I also tried this in a compliance rule by simply entering

/ip address find where address=${N=SwisEntity;M=IP_Address}

Expecting when I hit test and point to a config file it would show i.e.

/ip address find where address=192.168.1.1

But again it shows the literal text, not an IP address

Am I doing something wrong here?

I need to be able to run compliance reports and find some particular lines that use the primary/loopback address of nodes. And if those lines don't exist, NCM will create them. So scripting is necessary here as it'll be run against hundreds of routers