Check_service: combine exclude and filter=name not like



I’m currently trying to “shorten” my check_service command. Over the past months the exclude list grew, especially with the “OneSyncSvc_xxxxx” services from Windows Server 2016.

As wildcards do not work with the “exclude” option I’d like to know if it is possible to combine the “exclude” and “filter=name not” options.

I have tried it with this, but that does not seem to work, because the OneSyncSvc_xxxxx services still appear in my monitoring:

service_excludes = check_service “filter=name not like ‘clr_optimization’ and name not like ‘OneSyncSvc’” “exclude=some service” “exclude=someotherservice”

Would be amazing if this works in any way, so that I can reduce the check command by around 4000 characters(!)

Thanks and greetings


Changed the command to: check_service "filter=name not like 'clr_optimization' and name not like 'OneSyncSvc_' and name not in ('Service1', 'Service2') but the OneSyncSvc service still keep showing up.