How to configure a Regular Expression (Regex) to match a Fully Qualified Domain Name (FQDN) in a Foglight Credential for when there is no monitoring in a database agent
When creating a credential, one option is to specify a pattern match(e.g. regex) for the hostname and internal corporate namespace, also known as a FQDN - Fully Qualified Domain Name.
Any agent name:
^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$
Any FQDN:
^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$
Specific domain(example):
^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.mydomain.com)$
Specific sub-domain(example):
^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.int.mydomain.com)$
Specific sub-domain(example):
^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.emea.int.mydomain.com)$
A. "^" - Matches the starting position within the string. In line-based tools, it matches the starting position of any line.
B. "$" - Matches the ending position of the string or the position just before a string-ending newline.
C. "*" - Matches the preceding element zero or more times. For example, ab*c matches "ac", "abc", "abbbc", etc. [xyz]* matches "", "x", "y", "z", "zx", "zyx", "xyzzy", and so on. \(ab\)* matches "", "ab", "abab", "ababab", and so on.
D. "[ ]" - A bracket expression. Matches a single character that is contained within the brackets. For example, [abc] matches "a", "b", or "c". [a-z] specifies a range which matches any lowercase letter from "a" to "z". These forms can be mixed: [abcx-z] matches "a", "b", "c", "x", "y", or "z", as does [a-cx-z].
E. "." - Matches any single character (many applications exclude newlines, and exactly which characters are considered newlines is flavor-, character-encoding-, and platform-specific, but it is safe to assume that the line feed character is included). Within POSIX bracket expressions, the dot character matches a literal dot. For example, a.c matches "abc", etc., but [a.c] matches only "a", ".", or "c".
F. "\" - escape sequence to allow a metacharater to be evaluated as a literal character in an expression
Examlpe "\." would match a literal dot or period character, rather than matching any single charater.
© ALL RIGHTS RESERVED. Termini di utilizzo Privacy Cookie Preference Center