Adding Windows Service to NCPA. Service check fails
Posted: Mon Oct 05, 2020 11:00 am
I think the problem is the way the Sysadmin of this system defined the service name. When I run the check for most services, I get a return result but one service in particular fails:
SQL Error [nagiosxi] : ERROR: syntax error at or near "O"
LINE 1: ...ec/check_ncpa.py -H 172.16.193.22 -t \'^F(Qzg0XZ[1O\' -P 569...
^
[[email protected] ~]$ /usr/local/nagios/libexec/check_ncpa.py -H 172.16.193.22 -t '^F(Qzg0XZ[1O' -P 5693 -M 'services' -q 'service=ENSTAR - FCS_File_import_Service,status=running'
Error submitting command.
When I used NSClient I would get around spaces in the service check name by adding quotes, but this doesn't work either.
Full syntax of check:
-t '^F(Qzg0XZ[1O' -P 5693 -M 'services' -q 'service=ENSTAR - FCS_File_import_Service,status=running'
SQL Error [nagiosxi] : ERROR: syntax error at or near "O"
LINE 1: ...ec/check_ncpa.py -H 172.16.193.22 -t \'^F(Qzg0XZ[1O\' -P 569...
^
[[email protected] ~]$ /usr/local/nagios/libexec/check_ncpa.py -H 172.16.193.22 -t '^F(Qzg0XZ[1O' -P 5693 -M 'services' -q 'service=ENSTAR - FCS_File_import_Service,status=running'
Error submitting command.
When I used NSClient I would get around spaces in the service check name by adding quotes, but this doesn't work either.
Full syntax of check:
-t '^F(Qzg0XZ[1O' -P 5693 -M 'services' -q 'service=ENSTAR - FCS_File_import_Service,status=running'