Migrating check_xi_service_nsclient to check_xi_ncpa

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
Aldo Lanfranconi
Posts: 22
Joined: Fri Jan 29, 2021 12:06 pm

Migrating check_xi_service_nsclient to check_xi_ncpa

Post by Aldo Lanfranconi »

Hello, I have a Nagios xi version 5.4.9
I am Migrating to Nagios xi version 5.8.6

I used the NSclient on remote hosts, now with the new server I am using NCPA client.

I did have a few windows server hosts on where I check multiple service state together, like this:

Code: Select all

check_xi_service_nsclient!token!SERVICESTATE!-l 'ServiceName1','ServiceName2' -d SHOWALL!!!!!

but now, with the command check_xi_ncpa I can´t figureout how to do it

Code: Select all

check_xi_ncpa!-t 'token' -P 5693  -M 'services' -q 'service=ServiceName1,status=running'
how do I check multiple windows service state under 1 reference name?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Migrating check_xi_service_nsclient to check_xi_ncpa

Post by benjaminsmith »

Hi,

You'll find an example command on the page below

https://support.nagios.com/kb/article/s ... e_services

For example:

Code: Select all

/check_ncpa.py -H 192.168.254.113 -t welcome -M services -q service=Spooler,service=EventLog,status=running,status=stopped
Let us know if that works. If not please post the full check command and output to the thread so we can help troubleshoot. Thanks, Benjamin
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!
Aldo Lanfranconi
Posts: 22
Joined: Fri Jan 29, 2021 12:06 pm

Re: Migrating check_xi_service_nsclient to check_xi_ncpa

Post by Aldo Lanfranconi »

Hi, thanks for your response.

I have a Server that I want to monitor 2 grouped MSSQL services on.
I did added the server using the wizard and I just put a SQL service, now I want to modify that check so that it checks the status of two SQL services:

If I edit the SQL service check command the wizard configured it like this:

Code: Select all

-t 'token' -P 5693  -M 'services' -q 'service=MSSQL$$InstanceName,status=running'
so, looking at the documentation there are a few differences, on my command some parte are with ' ', and the word after -M is services instead service

I can't get it to work, below are the tests I did.


Added the new servicename to the wizard configured command

Code: Select all

-t 'token' -P 5693  -M 'services' -q 'service=MSSQL$$InstanceName,SQLAgent$InstanceName,status=running'
UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details.
remove quotation marks

Code: Select all

-t token -P 5693  -M services -q service=MSSQL$$InstanceName,SQLAgent$InstanceName,status=running
UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details.
remove added new service

Code: Select all

-t token -P 5693  -M services -q service=MSSQL$$InstanceName,status=running
UNKNOWN: No services found for service names: MSSQL
added quotation marks arround servicename

Code: Select all

-t token -P 5693  -M services -q service='MSSQL$$InstanceName',status=running
OK: MSSQL$InstanceName is running
added the new servicename

Code: Select all

-t token -P 5693  -M services -q service='MSSQL$$InstanceName,SQLAgent$InstanceName',status=running
UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details.
added the new servicename with split quotation marks

Code: Select all

-t token -P 5693  -M services -q service='MSSQL$$InstanceName','SQLAgent$InstanceName',status=running
UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details.
remove the s to the command -M services (a per documentation)

Code: Select all

-t token -P 5693  -M service -q service='MSSQL$$InstanceName',status=running
UNKNOWN: The node (service) requested does not exist. You may be trying to access the 'services' node.
I don´t know what else to do.
Aldo Lanfranconi
Posts: 22
Joined: Fri Jan 29, 2021 12:06 pm

Re: Migrating check_xi_service_nsclient to check_xi_ncpa

Post by Aldo Lanfranconi »

OK, got it

This command WORKS

Code: Select all

-t token -P 5693  -M services -q service='servicename1',service='servicename2',status=running
Thanks a lot for your help!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Migrating check_xi_service_nsclient to check_xi_ncpa

Post by benjaminsmith »

Hi @Aldo Lanfranconi,

Your welcome and glad that's working!

We'll close this out but feel free to open another if you have any new questions.

--Benjamin
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!