07-24-2015 02:03 PM
I have an issue creating a Device Group specifically for F5 load blalncers.
This device criteria results in all devices being found:
$type = "Load Balancer" and $Model eq "BIG-IP 3600" or $Model eq "BIG-IP 1600" or $Model eq "BIG-IP 4000"
This device criteria does not find any devices:
$type = "Load Balancer" and $Model eq "/^BIG-IP.+/"
Does anyone see what is wrong with the reg expression for the second criteria?
07-24-2015 02:22 PM
I hope this helps you:
The following comparison operators are supported:
=, ==, !=, <, >, <=, >= 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.)
determines if a given value is contained in a list of values (The in, not in values inside of the list should be the same type as the value on the
left hand side of the operator.)
memberOf, determines if the device or interface is a member of one or more
not memberOf other Device Groups and/or Interface Groups
$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"]
To do a case-insensitive match, use the regular expression modifier "/i".
$Name like /core/i
The following logical operators can be used to combine comparison sub-expressions:
and, &, && boolean AND
or, |, || boolean OR
(, ) grouping
$Vendor eq "Cisco" and $Type eq "Router"
($Vendor eq "Juniper" and $Type eq "Router")
or ($Vendor eq "Cisco" and $Type in ["Router", "Switch"])
memberOf ["Routing Group"]
and $IPAddress in [10.1.0.0/16, 10.2.3.45]
07-28-2015 04:19 PM
That was a help. I had seen that list in the Admin guide, but it didn't click until after I saw your post. In the end I was able use the following to group all of the F5 GTM and LTM devices into one group:
$vendor eq "F5" and ($Model like /^BIG-IP*/)