Page 1 of 1

Adding Windows Service to NCPA. Service check fails

Posted: Mon Oct 05, 2020 11:00 am
by akrradford
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'

Re: Adding Windows Service to NCPA. Service check fails

Posted: Tue Oct 06, 2020 1:55 pm
by cdienger
So far I haven't been able to reproduce. Are you getting htis message in the web interafce with the 'Run Check Command' button or from the command line?

What version of XI is this? (cat /usr/local/nagiosxi/var/xiversion)

What version of the plugin? (/usr/local/nagios/libexec/check_ncpa.py -V)

Try running the command directly on the command line:

Code: Select all

su - nagios
/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'