I am new to Nimsoft and am trying to create nas alerts based on Production vs. Test servers. I want to filter out Test servers in my Production server alert. Our naming convention is as follows.
role - up to 6 characters
test designation (if applicable) - 4 characters
sequence - 2 digits
location - 3 characters
so as an example: I have two servers
pimapp01sea - Production PIM Application Server 1 in Seattle
pimapptest01sea - Test PIM Application Server 1 in Seattle
I want to filter my alerts so that my Production nas profile only alerts for production servers. I used RegexBuddy to create this expression and it test out fine in RegexBuddy but when I try it in Nimsoft it doesn't match the string.
Can anyone tell me what is wrong with my expression? Any help is much appreciated.
Okay, I figured it out myself. I didn't realize that expressions had to have /^ at the beginning and / at the end.
This worked for me.
Just to clarify a little for those not used to working with regexes in Nimsoft probes:
The requirement in a lot of probes is that you need to surround the regex with slashes, like so:
If you don't a text comparison is usually done instead, though some probes do allow pattern matching where the pattern will be turned into a regex. If you need to match on a slash you need to escape it with a backslash, otherwise you will proably confuse the regex engine quite a bit.
The ^ simply says that the regex has to match from the start of the line. A fine distinction, but it could turn out to be an important one!