LogicMonitor seeks to disrupt AI landscape with $800M strategic investment at $2.4B valuation to revolutionize data centers.

Learn More

Using Glob Expressions Throughout the LogicMonitor Portal

Last updated on 07 March, 2024

Overview

Many fields throughout your account support glob expressions.  Fields that support glob expressions are usually marked with an asterisk:

You can also use glob to construct filters in LogicModules, on the Alerts Page, in Reports and more.

Note:

  • Typically, glob is case insensitive. However, in case of the Access Log Username filter, glob is case sensitive.
  • Resource and group names containing parentheses ( ) or pipe characters | may break complex glob expressions. You can escape these characters using the \ character, like this: ‘Resources\(Production\)’

Glob Syntax

This table below illustrates how to format glob expressions. You can combine these to create more complex expressions:

ExpressionDescriptionExamples
!(a|b|c)Specifies a negative pattern match!(a) would match all entities without the string ‘a’ as the name. !(a|b|c) would match all entities without a, b or c as the name.

If a device is linked to additional groups, such as “d” in conjunction with “a,” “b,” and “c,” it must not be filtered out; instead, it must be displayed.

Conversely !(*a*) would match all entities without the string ‘a’ in the name. !(*a*|*b*|*c*) would match all entities without a, b or c in the name.

If a device is linked to additional groups, such as *d* in conjunction with *a*, *b*, and *c*, it must not be filtered out; instead, it must be displayed.
(a|b|c)Matches one or more occurences of the given patterns(a|b|c) would match all entities with a, b or c in the name.
?Matches any one characterprod? would match prod1, prod2, prod3, prodA, prodB, etc.
*Matches any number of characters* would match everything, *.java would match server.java and server2.java.
[abc]Matches any character in the set a, b, or c*.[ch] would match abc.c and abc.h
[^abc]Matches any character not in the set a, b, or cprod[^abc] would match prodD, prodE, and prodF
[a-z]Matches any character in the range a to z, inclusiveprod[x-z] matches prodX, prodY and prodZ
\wMatches any alphanumeric character or underscore 
\sMatches a space or tab 
\dMatches a decimal digit 

Examples

  • Include all servers 1 through 10 except servers 2 and 4: (server1|server3|server5|server6|server7|server8|server9|server10) OR server!(2|4)
  • Include all servers that are members of the group Production and child groups under Production, except any servers under group Production/Servers: Production/!(Servers)
  • Include all groups except those that start with a – and group Servers: !(-*|Servers)
  • Include all resources that start with prod that do not match prod-01-LA: prod!(-01-LA*)
  • Include all resources that start with prod that do not contain ’29’: prod!(*29*)
  • Include all top level groups: !(*/*)
  • Include all groups under the group Production, but exclude subgroups for groups under the group Production: Production/!(*/*)
  • Include all servers under the group Production and child groups under production, except any servers under Production/Network/Servers: Production/!(Network/Servers)

Specifying Groups with Glob Expressions

Resource groups can be specified using glob expressions (e.g. in an alert rule) as follows:

There are few limitations while excluding the subgroups as the mentioned combinations do not work for all pages or sections. For more information, contact support.

Expression Description Will match resources in: Will not match resources in:
group/subgroup1* Matches resources at any level within group/subgroup1 and any child subgroups. group/subgroup1
group/subgroup1/group2
group/subgroup1/group2/group3
group/subgroup2
group/subgroup2/anygroup
group/subgroup1 Matches resources within group/subgroup1 only; does not match resources within any child subgroups of group/subgroup1. group/subgroup1 group/subgroup1/group2
group/subgroup1/group2/group3
group/subgroup1/* Matches only resources within child subgroups; does not match resources within group/subgroup1. group/subgroup1/group2
group/subgroup1/group2/group3
group
group/subgroup1
group1/!(subgroup2) Matches resources within any subgroup in group1 except subgroup2. group1/subgroup4
group1/subgroup1
group1/subgroup3
group1
group1/subgroup2
*group1* Matches resources within any group with group1 in its name (and any child subgroups). group1/subgroup3
group/subgroup1/group2
group/subgroup2/anothersubgroup100
group/subgroup2
*/group1* Matches resources within any group whose name starts with */group1 (is a subgroup in a higher group). Does not match a top-level group named group1. group/group1
group/group1/group2
group/subgroup2/group100
group1/subgroup3
group/subgroup1
In This Article