I am using NCPA agent 2.1.8 for windows. I have check_log3.exe plugin with version 3.14. It is working great with logfile path without space in it. However, it will give me "Cannot read '\"C:\\Monitoring\\avoid spaces\\test.txt\"'" error.
the syntax I used:
check_log3.exe?args=-l "C:\Monitoring\avoid spaces\test.txt" -p "outerror"
I tried few ways to escape space, use double or single quotes, got the same result.
Any help is greatly appreciated.
Thanks
Joseph
NCPA Plugin using check_log3.exe logfile path with space
Re: NCPA Plugin using check_log3.exe logfile path with space
Update:
looks like the -l logfile option is not accepting either single or double quotes. And space is the delimiter for the logfile.
However, if we ran from DOS command prompt, see below. it is working.
plugins\check_log3.exe -l "C:\Monitoring\avoid spaces\test.txt" -p "error"
WARNING: Found 2 lines (limit=1/0): 3rd error|lines=2
Not working from NCPA API or Nagios XI command.
looks like the -l logfile option is not accepting either single or double quotes. And space is the delimiter for the logfile.
However, if we ran from DOS command prompt, see below. it is working.
plugins\check_log3.exe -l "C:\Monitoring\avoid spaces\test.txt" -p "error"
WARNING: Found 2 lines (limit=1/0): 3rd error|lines=2
Not working from NCPA API or Nagios XI command.
Re: NCPA Plugin using check_log3.exe logfile path with space
You mention using check_log3.exe. Is that this plugin with the Perl script converted to an exe?
https://exchange.nagios.org/directory/P ... pl/details
I'm trying to throw this issue into a lab environment and see if I can get it going.
https://exchange.nagios.org/directory/P ... pl/details
I'm trying to throw this issue into a lab environment and see if I can get it going.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NCPA Plugin using check_log3.exe logfile path with space
I believe I got it from here:
https://github.com/pmcaulay/nagios-plugins
Thank you for helping.
Joseph
https://github.com/pmcaulay/nagios-plugins
Thank you for helping.
Joseph
Re: NCPA Plugin using check_log3.exe logfile path with space
It looks like we do have an open bug for this.
https://github.com/NagiosEnterprises/ncpa/issues/481
If you need to work around this, you could make a symlink to the directory where your log file is stored.
For example, you have
C:\Monitoring\avoid spaces\
Very important note. If in the future you want to get rid of the symlink, you rmdir the symlink, do not del the symlink. It will delete all of the files in the target directory.
https://github.com/NagiosEnterprises/ncpa/issues/481
If you need to work around this, you could make a symlink to the directory where your log file is stored.
For example, you have
C:\Monitoring\avoid spaces\
Code: Select all
mklink /D C:\Monitoring\nospaces "C:\Monitoring\avoid spaces\"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NCPA Plugin using check_log3.exe logfile path with space
Hi mbellerue,
Thanks for the info and this work around solved my issue.
Thank you,
Joseph
Thanks for the info and this work around solved my issue.
Thank you,
Joseph