Pass arguments to plugin via NRDP config

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.
Locked
DBNagios
Posts: 2
Joined: Fri Feb 08, 2019 5:05 am

Pass arguments to plugin via NRDP config

Post by DBNagios »

Hi all,

I'm using some NCPA passive checks. These passive checks are using a plugin that are configured in /ncpa/ncpa.cfg.d/nrdp.cfg.
Till now I never wanted to pass an argument to the plugin and that worked fine.

But now I want to pass an argument to the plugin, e.g.:
%HOSTNAME%|Temperature = plugins/getCPUTemperature.sh SENSOR1

The problem is that SENSOR1 is not passed as an argument to the getCPUTemperature plugin.
Does anyone know how to pass it as an argument. The Nagios document is not clear about this.

Thanks!
DBNagios
Posts: 2
Joined: Fri Feb 08, 2019 5:05 am

Re: Pass arguments to plugin via NRDP config

Post by DBNagios »

In the meantime I figured out how to pass a single argument to the plugin:
%HOSTNAME%|Temperature = plugins/getCPUTemperature.sh --args SENSOR1

However, I need to pass two arguments to the plugin. How can this be realized?
I tried different kinds of ways like:
%HOSTNAME%|Temperature = plugins/getCPUTemperature.sh --args SENSOR1, SENSOR2
%HOSTNAME%|Temperature = plugins/getCPUTemperature.sh --args 'SENSOR1 SENSOR2'
But it the string is always passed as a single argument.

Thanks.
Locked