Loading full navigation.

Glob expressions provide pattern matching that you can use to filter and select entities throughout LogicMonitor. A glob expression matches values based on a pattern instead of requiring you to specify each value individually.

You can use glob expressions in supported fields and filters for alerts, dashboards, reports, and other areas of the LogicMonitor platform. In supported fields, you can use glob expressions as wildcards to match multiple values.

For example, the following resource property filter uses system:controller:* to match system.hostname values that begin with system:controller::

Resource property filter with system:controller:* selected as a wildcard

For more information about using resource property filters, see Dashboard Filters.

Note: Glob expressions are typically case insensitive. Glob expressions used with the Access Log Username filter are case sensitive.

Special Characters in Glob Expressions

Resource, group, and instance names can contain special characters that affect glob expression matching. Use a backslash (\) to escape special characters such as backslashes (\), parentheses (()), quotation marks ("), and pipe characters (|) when you want to match them as literal characters.

For example, use Resources\(Production\) to match Resources(Production).

Escaping special characters is especially important when you combine literal values with glob operators such as !() or ().

Glob Expression Syntax

Use the following syntax to create glob expressions:

ExpressionDescriptionExample
!(a|b|c)Excludes the specified patterns.!(a|b|c) matches entities without a, b, or c in the name.
(a|b|c)Matches one or more of the specified patterns.(a|b|c) matches entities with a, b, or c in the name.
?Matches any single character.prod? matches prod1, prod2, or prodA.
*Matches any number of characters.*.java matches server.java and server2.java.
[abc]Matches any character in the specified set.*.[ch] matches abc.c and abc.h.
[^abc]Matches any character not in the specified set.prod[^abc] matches prodD, prodE, and prodF.
[a-z]Matches any character in the specified range.prod[x-z] matches prodX, prodY, and prodZ.
\wMatches any alphanumeric character or underscore.server\w matches server1, serverA, and server_.
\sMatches a space or tab.web\sserver matches web server but not web-server.
\dMatches a decimal digit.server\d matches server1 and server2, but not serverA.

Glob Expressions Combinations

You can combine multiple patterns to include or exclude matching values. Use parentheses to group patterns when combining expressions.

The following examples display how to combine glob expressions:

ToUse
Match names that begin with 172.172*
Match names that begin with 172 or 192.((172*|192*))*
Exclude names that begin with 172 or 192.(!(172*|192*))*
Match servers 1 through 10 except servers 2 and 4.server!(2|4)
Match resources that start with prod except resources that start with prod-01-LA.prod!(-01-LA*)
Match resources that start with prod but do not contain 29.prod!(*29*)
Match all top-level groups.!(*/*)

You can also use glob expressions to filter alerts. For more information, see Managing Alerts from the Alerts Page.

Resource Group Glob Expressions

You can use glob expressions to match resources based on their resource group hierarchy. For example, you can include or exclude resources in specific groups or child groups.

The following table describes common glob expressions for resource groups:

ExpressionDescriptionMatches resources inDoes not match resources in
group/subgroup1*Matches resources at any level within group/subgroup1 and it’s child groups.group/subgroup1group/subgroup1/group2group/subgroup1/group2/group3group/subgroup2group/subgroup2/anygroup
group/subgroup1Matches resources directly within group/subgroup1, but not it’s child groups.group/subgroup1group/subgroup1/group2group/subgroup1/group2/group3
group/subgroup1/*Matches resources within child groups of group/subgroup1, but not resources directly within group/subgroup1.group/subgroup1/group2group/subgroup1/group2/group3groupgroup/subgroup1
group1/!(subgroup2)Matches resources within subgroups of group1 except subgroup2.group1/subgroup4group1/subgroup1group1/subgroup3group1group1/subgroup2
*group1*Matches resources within any group that contains group1 in it’s name and within it’s child groups.group1/subgroup3group/subgroup1/group2group/subgroup2/anothersubgroup100group/subgroup2
*/group1*Matches resources within a subgroup whose name begins with group1. Does not match a top-level group named group1.group/group1group/group1/group2group/subgroup2/group100group1/subgroup3group/subgroup1