Pass arguments to plugin via NRDP config

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Pass arguments to plugin via NRDP config

Postby DBNagios » Wed May 27, 2020 2:05 pm

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

Postby DBNagios » Wed May 27, 2020 4:18 pm

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


Return to Community Support

Who is online

Users browsing this forum: Google [Bot], maxsec, tvoll and 12 guests