Where from the arguments are passing

This forum is intended for the discussion of Nagios Core development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagios-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Where from the arguments are passing

Postby Pratapa » Wed Nov 20, 2019 7:27 am

In our environment there is a remote server which is a Linux server. This server is being monitored by Nagios server.

Following is the portion of the nrpe.cfg file (last few lines of the nrpe.cfg file)

-----------------------------------------------------------------------------------------------------------------------
#command[check_users]=/usr/lib/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
#command[check_load]=/usr/lib/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
#command[check_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
#command[check_procs]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$

# local configuration:
# if you'd prefer, you can instead place directives here

#include=/etc/nagios/nrpe_local.cfg

# you can place your config snipplets into nrpe.d/
# only snipplets ending in .cfg will get included

include_dir=/etc/nagios/nrpe.d/
---------------------------------------------------------------------------------------------------------------------------------------

[root@host1 nrpe.d#cd /etc/nagios/nrpe.d
[root@host1 nrpe.d#pwd
/etc/nagios/nrpe.d
[root@host1 nrpe.d]# ls
command-plugins.cfg

[root@host1 nrpe.d]#cat command-plugins.cfg
command[check_memory]=/usr/lib64/nagios/plugins/ce/check_mem.pl -f -w $ARG1$ -c $ARG2$ -C
command[check_proc]=/usr/lib64/nagios/plugins/check_procs -u $ARG1$ -a "$ARG2$" -c $ARG3$
command[check_swap]=/usr/lib64/nagios/plugins/check_swap -w $ARG1$ -c $ARG2$
command[check_toptime]=/usr/lib64/nagios/plugins/ce/check_toptime
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs $ARG1$ $ARG2$
command[check_users]=/usr/lib64/nagios/plugins/check_users $ARG1$ $ARG2$
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs $ARG1$ $ARG2

I did not understand where from the arguments are passing to this file.
These are not passive checks. Services are in OK state.
Please help me.

Regards,
Pratapa.
Pratapa
 
Posts: 21
Joined: Tue Oct 01, 2019 1:33 am

Re: Where from the arguments are passing

Postby scottwilkerson » Wed Nov 20, 2019 8:13 am

The follow the -a flag when running ./check_nrpe on the nagios server

Code: Select all
/usr/local/nagios/libexec/check_nrpe -H YOURHOST -t 30 -c check_disk -a 20% 10% '/'


Code: Select all
/usr/local/nagios/libexec/check_nrpe -h
...

-a, --args=LIST              Optional arguments that should be passed to the command,
                              separated by a space. If provided, this must be the last
                              option supplied on the command line.

...
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17032
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core Development

Who is online

Users browsing this forum: No registered users and 2 guests