I have managed to to pass parameter as twice quoted (“ ‘ param value ‘ “) on nagios side and the command was executed, but it happens only from command line, and i can’t pass parameter from nagios config. In my humble opinion less elegant and non-flexible code is better than non-working solution, as a bad peace is better than a good quarrel. At least it work for me and solution was to hardcoded parameter on nrpe side:
filename with special characters must be quoted with double quotes. Check following command first from command line on remote host
# ./check_file_size.sh -v --maxcrit 100000 "/tmp/Some File Name with Spaces.log"
If command returns filename and file size, the next step to add command to NRPE config.
Let’s edit nrpe.cfg and add new command
command[check_file_demo]=/usr/local/nagios/libexec/check_file_size.sh -v --maxcrit 100000 "/tmp/Some File Name with Spaces.log"
save file and execute from command line on remote host
./check_nrpe -H 127.0.0.1 -c check_file_demo
when it works you can use check_nrpe command already from nagios server.
Enjoy!
Subscribe to:
Post Comments (Atom)
HOWTO: Repair Logitech M325 Mouse
FixIt says that you will find single screw under CE label. It isn't always true.
-
I would like to execute mysqldump using .mylogin.cnf file and --login-path option to make it more secure as it can be with plain text passwo...
-
If your worry about data left on dedicated/hosted root server and want to remove secure all files and bits, you can clean complete disk sli...
-
OUT - OF - DATE Obsolete. Please check new post ! If you have issue with Function List plugin for Notepad++ 5.1 or later, please ch...
No comments:
Post a Comment