Execute Nagios plugins through NCPA

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
User avatar
MaterazziSan
Posts: 18
Joined: Wed Apr 19, 2023 5:31 pm

Execute Nagios plugins through NCPA

Post 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
bbahn
Posts: 316
Joined: Thu Jan 12, 2023 5:42 pm

Re: Execute Nagios plugins through NCPA

Post 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.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
User avatar
MaterazziSan
Posts: 18
Joined: Wed Apr 19, 2023 5:31 pm

Re: Execute Nagios plugins through NCPA

Post 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
bbahn
Posts: 316
Joined: Thu Jan 12, 2023 5:42 pm

Re: Execute Nagios plugins through NCPA

Post 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
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
User avatar
MaterazziSan
Posts: 18
Joined: Wed Apr 19, 2023 5:31 pm

Re: Execute Nagios plugins through NCPA

Post by MaterazziSan »

Hi,

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

Thank you!

Best regards
kg2857
Posts: 358
Joined: Wed Apr 12, 2023 5:48 pm

Re: Execute Nagios plugins through NCPA

Post 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.
Last edited by kg2857 on Thu May 08, 2025 9:39 pm, edited 1 time in total.
User avatar
MaterazziSan
Posts: 18
Joined: Wed Apr 19, 2023 5:31 pm

Re: Execute Nagios plugins through NCPA

Post 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
bbahn
Posts: 316
Joined: Thu Jan 12, 2023 5:42 pm

Re: Execute Nagios plugins through NCPA

Post 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.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
kg2857
Posts: 358
Joined: Wed Apr 12, 2023 5:48 pm

Re: Execute Nagios plugins through NCPA

Post 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.
User avatar
MaterazziSan
Posts: 18
Joined: Wed Apr 19, 2023 5:31 pm

Re: Execute Nagios plugins through NCPA

Post by MaterazziSan »

Clear. Thank you both! ;)
Post Reply