Page 1 of 1

Linux active checks with NCPA client - cfg examples?

Posted: Mon Feb 22, 2021 1:18 pm
by ronafisher2
Hello all,

I've stood up a 4.4.6 core install and using NCPA client on Windows and Linux clients. I've managed to get the Windows clients reporting properly for services etc. I can't find any examples of config files for Linux specifically syntax for checking partitions/mount points. I'd like to monitor space on the usual mount points.. / /var/log etc.

A windows disk check looks like this


define service {
host_name Server ; The name we're giving to this host
service_description Disk Space Used I:
check_command check_ncpa!-t 'token' -P 5693 -M 'disk/logical/I:|/used_percent' --warning 90 --critical 95
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}

What is the regex for Linux mount points?

Thanks!

Ron

Re: Linux active checks with NCPA client - cfg examples?

Posted: Mon Feb 22, 2021 4:28 pm
by gormank
HASH)X!)T@A8c0here are examples in the KB:
https://support.nagios.com/kb/category.php?id=186

Re: Linux active checks with NCPA client - cfg examples?

Posted: Mon Feb 22, 2021 4:50 pm
by ronafisher2
Thanks all the examples are for Windows disks. All I need is an example of the syntax for checking /var/log which I can't seem to find anywhere.

Re: Linux active checks with NCPA client - cfg examples?

Posted: Mon Feb 22, 2021 5:08 pm
by ronafisher2
I think I figured it out.. maybe this will help the next newb.. replace / with |

[nagios@server etc]$ /usr/local/nagios/libexec/check_ncpa.py -H client -t 'token' -P 5693 -M 'disk/logical/|/free' --warning 10: --critical 5: -u G
OK: Free was 50.23 GB | 'free'=50.23GB;10:;5:;
[nagios@server etc]$ /usr/local/nagios/libexec/check_ncpa.py -H client -t 'token' -P 5693 -M 'disk/logical/|var|log/free' --warning 10: --critical 5: -u G
OK: Free was 472.26 GB | 'free'=472.26GB;10:;5:;