Comparison Operators
The following comparison operators are supported in all criteria expressions:
=, ==, !=, <, , <=, =
numeric comparison (The value on either side of the operator should be an integer, float or IP address.)
eq, ne, gt, lt, ge, le
string comparison (The value on either side of the operator should be a string.)
=~, !~, like, not like
regular expression (A non-string value on the left side of operator is converted to a string before comparison.)
in, not in
determines if a given value is contained in a list of values (The values inside of the list should be the same type as the value on the left side of the operator.)
memberOf, not memberOf
determines if the device or interface is a member of one or more other Device Groups and/or Interface Groups.
hasnetwork
determines if the device or interface is a member of a specific Network View.
Examples:
$ID = 30
$Vendor eq "Cisco"
$Version like /^12.1.*/
$Model in ["cat4506", "3725"]
$IPAddress in [10.1.3.56, 10.2.0.0/16]
memberOf ["Router Group", "Switch Group"]
$Vendor eq "Cisco" and ($Model eq "catalyst2912XL" or $Model eq "cat3548XL")
To perform a case-insensitive match, use the regular expression modifier /i.
Example:
$Name like /core/i
The $Model
and $IPAddress
values work for creating device groups but cannot be used for building Rules with device attributes under Configuration Management > Policy Design Center > Rule.
$Model in ["cat4506", "3725"]
$IPAddress in [10.1.3.56, 10.2.0.0/16]
For Rules in the Policy Design Center, simply use a comma-separated format.