check_service exclude does not work as expected

This forum was archived to /woltlab and is now in read-only mode.
  • Hi,

    i try to monitor services on Windows Servers with Icinga2 and NSClient++. I use the official nscp_api check command.

    I would like to monitor every service except some predefined exclusions. But the configured exclude arguments don't seem to work.

    My configuration:

    1. apply Service "Dienste" {
    2. check_command = "nscp_api"
    3. vars.nscp_api_query = "check_service"
    4. vars.nscp_api_arguments = [ "exclude=sppsvc exclude=stisvc exclude=gupdate exclude=RemoteRegistry exclude=ShellHWDetection exclude=MapsBroker" ]
    5. vars.nscp_api_password = "****"
    6. assign where [...]
    7. }

    The ouput i'm getting in icingaweb2:

    1. check_service CRITICAL: RemoteRegistry=stopped (auto), ShellHWDetection=stopped (auto), delayed (sppsvc=stopped (delayed))

    I already tried some alternatives like using the filter argument. Same Problem. I dont find any example config that does exactly what i'm looking for.

    I hope you guys can help me.

  • You can try to change the parameter vars.nscp_api_arguments to a Array.


    1. vars.nscp_api_arguments = [ "exclude=sppsvc", exclude=stisvc exclude=gupdate", "exclude=RemoteRegistry", "exclude=ShellHWDetection", "exclude=MapsBroker" ]
  • When i try that, i get the following output in Icingaweb2:

    1. check_service Invalid command line: unrecognised option 'exclude[]=sppsvc'
  • NRPE is not an alternative for me, but i will try the workaround from github.