Open colinsauze opened 8 years ago
Just found that this is only a problem via the actual browser based web interface, running a query from a command line script that interfaces to Nagios works.
This does not work you mean?
Yes it does, i'd not tried that method, I'd tried:
check_process process="nscp.exe"
check_process process=nscp.exe
and
check_process process=nscp.
exe
and all of these fail. Perhaps some notes in the help explaining the correct syntax would have helped.
Ahh... yes, I do pretty lame parsing on the command line there, it is similar to how "nscp test" works so no proper parsing of escape codes just a "does it start with " kinda deal...
If you use the rest API though it will be parsed properly as you send arguments individually there...
I'll keep this as a bug for fixing the parsing to be more "sane"...
When I try to use the check_process on on NSClient in JSON/web server mode I can get the list of running processes by giving it no parameters. However, the documentation says I can specify the name of a single process with the "process" option. When I do this from the web interface (https://myserver:8443/queries.html) and I try to query a windows process by its full name (e.g. chrome.exe) I get the error:
Invalid command line: unrecognised option 'exe'
I've tried without the .exe and it finds no processes. I've also tried the HTML escape character ., a leading \ and putting the whole thing in quotes but these all give errors too. I presume that on Linux/Unix hosts this won't be a problem as you don't normally get dots in the filename, but on a Windows host it is a problem.