check_nrpe arguments from a file
check_nrpe arguments from a file
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
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.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_nrpe arguments from a file
or as part of the command you could add the following where the arguments should come from
Code: Select all
$(cat /path/to/file)
Re: check_nrpe arguments from a file
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.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_nrpe arguments from a file
Let us know if this doesn't work for you.
Re: check_nrpe arguments from a file
Thanks Scott i tested your idea and implemented it. Also tested eloyd idea using wrapper script also works.
Code: Select all
$(cat /path/to/file)
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_nrpe arguments from a file
Glad to see it was resolved!!
Locking
Locking