Nscp-local-disk (check_drivesize) and exclude mounted filesystems in folder

I have a scenario on multiple windows servers where filesystems are mounted as a folder.
This is for our backup servers to access backend library storage.

Is there a way to exclude a folder or mounted drives with the nscp_disk_arguments ?

This is running in test mode

what Icinga is showing

A little more patience and found the answer… so for anyone else with a similar issue, here is the solution:

Powershell in test mode for nscp.exe
check_drivesize "filter=drive not like '\\CV_' and mounted = 1"

Service Definition:

apply Service "Local Disks (ALL)" {
    import "service-check-alarm-settings"
    check_command = "nscp-local-disk"
    command_endpoint = host.vars.client_endpoint
    enable_notifications = false
    vars.grafana_graph_disable = true
    vars.nscp_disk_arguments = "filter=drive not like 'CV_' and mounted = 1"
    vars.nscp_disk_showall = true
    assign where host.vars.client_endpoint && host.vars.os == "windows"

Produces this in Icinga

1 Like

several months later, I am back because the filter needs to be expanded and I am having some syntax issues in adding the additional args.

When adding the second check for ‘SnapMnt’, this causes the check to not process… end up with an UNKNOWN state.

vars.nscp_disk_arguments = "filter=drive not like 'CV_' or not like 'SnapMnt_' and mounted = 1"

…any clue/tip on how to put 2 or conditions together?..along with an and condition.