Closed hakong closed 5 years ago
Not a direct solution to your problem, but with a bit of hostgroup magic, you can easily achieve this. We use hostgroups like win-disk-c, win-disk-f that run the checks for specific disks that might be present on a Windows system. Linux? linux-disk-/ and linux-disk-/[other mount pont].. Same thing with various services. If you're monitoring a small amount of servers, changing hostgroups shouldn't be too hard.
That's unfortunately not an option. There's about 10.000 service checks on a few nagios/naemon instances at different sites. I guess figuring out the regex is my best bet here. Do you know how the regex for this would look? I tried a few basics like:
DISK WARNING /[A-Z]
^DISK WARNING /\w
But thruk complained every time and it didn't filter anything.
The regular expression looks fine, what does Thruk complain about?
Which version is that, i have a feeling that i fixed something in that area a while ago.
Even a non-regex doesn't work.
Thruk Version 2.20-2
Please retry with the latest release.
Does not seem to work. Works:
Does not work:
It seems to fail on the forwardslash, could that be?
DISK WARNING .*\w
DISK WARNING .*[A-Z]
Does not work:
Works, but not what I need:
Those that work still give an error in the drop-down ajax autocomplete thingy. This works the same in both versions (2.20 and 2.23).
These 2 work aswell with the forward slashes:
DISK WARNING .*/[A-Z]
DISK WARNING .*/\w
Seem to have foud another bug.
When typing in DISK [A-Z]
in "Service", the drop-down ajax list shows HTML tags.
i fixed the issue with the preview. Forward slashes must be escaped like \/
Is your feature request related to a problem? Please describe. Not really a problem, but I'd like to filter based on more variables. For example icon_image.
Describe the solution you'd like Display filter based on custom variables from a service configuration.
Describe alternatives you've considered n/a
Additional context Trying to filter out all windows-related services and hosts from a display. The windows hosts are not in a specific hostgroup, so I can't use that. I've been building filters for various windows-only checks and am currently struggling with getting rid of a "Disk Usage" check that returns "DISK WARNING /C" for Windows, but "DISK WARNING /" for Linux, and can't get the regex to work(
DISK WARNING /[A-Z]
is basicly what I want), so I thought about filtering the windows icon (icon_image win40.png
) but that dosen't seem possible.