Page 1 of 1
check_nrpe arguments from a file
Posted: Fri Jun 01, 2018 12:26 pm
by rjmon
Is it possible to read arguments from a file. i have 5 processes to be monitored instead of creating 5 processes config manually i want it to read the arguments from a file.
Re: check_nrpe arguments from a file
Posted: Fri Jun 01, 2018 1:34 pm
by eloyd
If the plugin you're using supports reading parameters from a file, then yes. If it doesn't, you could always write a short shell script wrapper than does, and then passes them off to the appropriate plugin command.
Re: check_nrpe arguments from a file
Posted: Fri Jun 01, 2018 2:28 pm
by scottwilkerson
or as part of the command you could add the following where the arguments should come from
Re: check_nrpe arguments from a file
Posted: Fri Jun 01, 2018 7:28 pm
by eloyd
True. Shell-based file substitution is an option as well. It may get confusing if you have to escape that inside an NRPE request or something else, though.
Re: check_nrpe arguments from a file
Posted: Mon Jun 04, 2018 10:10 am
by scottwilkerson
Let us know if this doesn't work for you.
Re: check_nrpe arguments from a file
Posted: Mon Jun 04, 2018 2:33 pm
by rjmon
Thanks Scott i tested your idea and implemented it. Also tested eloyd idea using wrapper script also works.
Re: check_nrpe arguments from a file
Posted: Mon Jun 04, 2018 2:36 pm
by scottwilkerson
Glad to see it was resolved!!
Locking