Page 1 of 2

Execute Nagios plugins through NCPA

Posted: Wed Apr 30, 2025 5:12 pm
by MaterazziSan
Hi,

Nagios plugins default directory is "/usr/local/nagios/libexec"
NCPA default plugin directory is "/usr/local/ncpa/plugins"

How do you execute nagios plugin? Do you copy them from /usr/local/nagios/libexec to /usr/local/ncpa/plugins? Symlink?

Thank you!

Best regards

Re: Execute Nagios plugins through NCPA

Posted: Mon May 05, 2025 4:09 pm
by bbahn
Hello @MaterazziSan,

Exactly! Just copy your plugins to the NCPA server in the plugins folder and they'll be accessible from the API. A symlink would work for your purposes if the NCPA instance is on your local Nagios server. If it's on your Nagios server, then it doesn't really make sense to execute plugins through NCPA as you can execute them directly with Core or XI.

Re: Execute Nagios plugins through NCPA

Posted: Mon May 05, 2025 6:08 pm
by MaterazziSan
Hi,

Thank you for your answer. Let me explain myself. For example, imagine I would like to check load in target remote GNU/Linux machine.

NCPA is there already installed but load check is not built-inhttps://support.nagios.com/kb/article/l ... s-771.html. I should have nagios plugins installed in target remote machine for having "check_load" plugin. But default directory installation is not "usr/local/ncpa/plugins".

I hope I explain myself.

Best regards

Re: Execute Nagios plugins through NCPA

Posted: Wed May 07, 2025 4:57 pm
by bbahn
Nagios plugins are not built-in to NCPA by default. NCPA has its own API for basic checks such as cpu, memory and others that you can view them here https://www.nagios.org/ncpa/help/3.x/ap ... s-standard or in your NCPA instance's web interface at https://your_ncpa_machine's_ip:5693/gui/api

Re: Execute Nagios plugins through NCPA

Posted: Wed May 07, 2025 5:36 pm
by MaterazziSan
Hi,

I see your point. I need to choose between NRPE + nagios plugins or NCPA + my own plugins.

Thank you!

Best regards

Re: Execute Nagios plugins through NCPA

Posted: Wed May 07, 2025 6:00 pm
by kg2857
I don't think that's true--NRPE and NCPA don't know the source of plugins. They just need to be in the right dir.

Re: Execute Nagios plugins through NCPA

Posted: Thu May 08, 2025 5:42 pm
by MaterazziSan
kg2857 wrote: Wed May 07, 2025 6:00 pm I don't think that's true--NRPE and RCPA don't know the source of plugins. They just need to be in the right dir.
Hi, it means, do you install nagios plugins and copy them to NCPA plugin's directory?

Best regards

Re: Execute Nagios plugins through NCPA

Posted: Fri May 09, 2025 11:39 am
by bbahn
As far as I am aware, all Nagios plugins can be executed on any system that has their dependencies and does not even require Nagios products to be installed on those machines to execute. Nagios products execute these plugins and track their outputs, but the plugins do not require Core/XI/NCPA/etc to be installed. This means you can take any plugins you want and run them with NCPA, NRPE, Nagios Core/XI or any other program that can execute scripts. You can simply put the plugins in your NCPA plugins folder and as long as they're executable, NCPA will be able to execute them from its API directly or via the check_ncpa.py plugin.

Re: Execute Nagios plugins through NCPA

Posted: Sat May 10, 2025 6:42 am
by kg2857
MaterazziSan wrote: Thu May 08, 2025 5:42 pm Hi, it means, do you install nagios plugins and copy them to NCPA plugin's directory?
The plugins are stored in a tar file. You should be able to install them directly to the ncpa plugin dir.

Re: Execute Nagios plugins through NCPA

Posted: Sat May 10, 2025 9:46 am
by MaterazziSan
Clear. Thank you both! ;)