Service Check - Exclude With RegEx?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
Nibz
Posts: 1
Joined: Thu Apr 11, 2024 11:31 pm

Service Check - Exclude With RegEx?

Post by Nibz »

We constantly get critical warnings for Google Update services,
I went to the service check to exclude these services however Every time they update they change the name of their update service and therefore i need to constantly add more and more to the exclude

I attempted Regex today but it did not work, im assuming the service check does not handle regex

The Warning I get is below:
CRITICAL: GoogleUpdaterInternalService125.0.6386.0=stopped (auto), GoogleUpdaterService125.0.6386.0=stopped (auto), delayed ()

The exclude i have tried in /usr/local/nagios/etc/config/service.cfg is:
check_command check_nrpe!check_service -a exclude=^GoogleUpdaterService.* exclude=^GoogleUpdaterInternalService.*

Has anyone successfully does this? so i dont have to keep adding each one
jsimon
Posts: 106
Joined: Wed Aug 23, 2023 11:27 am

Re: Service Check - Exclude With RegEx?

Post by jsimon »

Hi @nibz,

I'm not sure what plugin "check_service" is or what the limitations of it are, but it looks like your command is calling that plugin on the remote host that you're monitoring. The check_nrpe plugin is capable of passing regex to the plugin it calls, so it comes down to check_service. If that plugin does not support regex you may need to find a replacement or update the plugin.

Looking at the local scripts folder on an XI server that I have, I can see that we have a provided plugin named "check_services" which doesn't exactly match the "check_service" plugin you're calling so I'm not sure if yours is the same as ours with a typo in your post or if it's actually a different plugin. Either way, the syntax to pass regex as an arg will depend on the plugin, so if your plugin is custom you may need to provide the contents of it for further assistance.
Post Reply