Windows Service names with spaces fail to parse correctly
Posted: Wed May 01, 2013 9:57 am
Hello,
I was following the doc Nagios XI - Restarting a Windows Service with NRPE. I am able to sucessfully start services on a remote machine with the following command:
./check_nrpe -H 192.168.5.180 -p 5666 -c runcmd -a spooler.
This works. Now I am trying to restart a service with the same command:
./check_nrpe -H 192.168.5.180 -p 5666 -c runcmd -a Klocwork 9.2 Server
The spaces are parsed out and it only passes through the string Klocwork. Of course this is not a real service name so it fails. Is there some type of quoting I will need? I've tried double quotes and single quotes.
Regards,
Randy
I was following the doc Nagios XI - Restarting a Windows Service with NRPE. I am able to sucessfully start services on a remote machine with the following command:
./check_nrpe -H 192.168.5.180 -p 5666 -c runcmd -a spooler.
This works. Now I am trying to restart a service with the same command:
./check_nrpe -H 192.168.5.180 -p 5666 -c runcmd -a Klocwork 9.2 Server
The spaces are parsed out and it only passes through the string Klocwork. Of course this is not a real service name so it fails. Is there some type of quoting I will need? I've tried double quotes and single quotes.
Regards,
Randy