Nagios core, NCPA and discovering checks

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
HankB
Posts: 4
Joined: Sun Nov 06, 2022 11:16 pm

Nagios core, NCPA and discovering checks

Post by HankB »

Hi all,
I've got Nagios Core installed on a server and the NCPA package installed on a couple remote hosts. I got the example checks as listed in the documents working and would now like to go past that. My first question is how can I identify the checks that the NCPA package supports out of the box along with the syntax required to use them. I supposed that there must be some kind of disk check and through some searching and a bit of trial and error, got the following to work:

Code: Select all

bash-5.0# libexec/check_ncpa.py -t '...' -P 5693 -H canby -M 'disk/logical//|'
OK: Used disk space was 65.30 % (Used: 12.26 GiB, Free: 6.51 GiB, Total: 19.60 GiB) | 'used'=12.26GiB;;; 'free'=6.51GiB;;; 'total'=19.60GiB;;;
bash-5.0# 
That gets me the root filesystem. I'd like to check other filesystems but the obvious modification to check '/boot' instead of '/' gets me

Code: Select all

bash-5.0# libexec/check_ncpa.py -t '...' -P 5693 -H canby -M 'disk/logical//boot|'
UNKNOWN: The node (boot/) requested does not exist. You may be trying to access the '/' node.
bash-5.0# libexec/check_ncpa.py -t ' ...' -P 5693 -H canby -M 'disk/logical/boot|'
UNKNOWN: The node (boot/) requested does not exist. You may be trying to access the '/' node.
bash-5.0# libexec/check_ncpa.py -t '...' -P 5693 -H canby -M 'disk/logical///boot|'
UNKNOWN: The node (boot/) requested does not exist. You may be trying to access the '/' node.
bash-5.0# 
I tried other variants with similar results but won't waste space repeating them here. This is not a particularly productive way to get things done.

Is there a reference or guide that provides the commands available and the syntax required?

Thanks!

Edit.0: I found it. the API page served on the remote has all of the information in a format that is close enough to what is required in the config on the host running Nagios that even I can figure out the syntax.

As an aside, I find that UIs that change as options are selected can reduce discoverability because not all options are visible at any one time. Once discovered, I find this to be a pretty slick way to present the information but getting there was not obvious to me.
Post Reply