Unknown command(s) from Nagios XI web

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
marin
Posts: 2
Joined: Wed Oct 30, 2019 1:57 am

Unknown command(s) from Nagios XI web

Post by marin »

Hi all,

I am a bit desperate here and I need help with one check command on Nagios XI. I will try my best to explain what is it that I can't get working.

I have a Nagios XI which monitors Windows servers with NSClient++ installed. I have a working service on one server that I would like to use on some other servers. It is a command defined in nsclient.ini that uses a powershell script.

When adding a new command to another server exactly as defined on first server on which that command works OK and copying the script I get some odd behaviour that I can't solve.

Command works OK from nagiosxi CLI, it returns expected results to command line, tried to run the check as root and as nagios user.
Command works OK from nagiosxi web ui from core config manager from defined service where there is a Run command button to check the service against a host you wish.
Command DOES NOT WORK OK from nagiosxi web ui after the service is created and configuration is applied. Service status is in UNKNOWN state with the output Unknown command(s): check_command_name

I am using check_nrpe from nagios server and NSClient++ on Windows server. Could someone point me in the right direction where to look, and how to troubleshoot this and make this to work. Thans in advance.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unknown command(s) from Nagios XI web

Post by lmiltchev »

Can you show us the actual command, run from the command line, along with the output of it, and the service config?

CCM > Services > <your service> > View config
Be sure to check out our Knowledgebase for helpful articles and solutions!
marin
Posts: 2
Joined: Wed Oct 30, 2019 1:57 am

Re: Unknown command(s) from Nagios XI web

Post by marin »

Desperately I went through configuration for that service on nagios server, nsclient++ configuration on the client server, and all looked good.

Then I found out why the service can't work, and it was about wrong host configuration. The IP address in host definition was wrong.

That explains why I was getting the expected results when testing, either from command line or web UI while service definition, beacause there I used dns name of the server. When the service was defined it was run against the wrong host.

I'm sorry for posting, it turned out to be a rookie mistake with host definition.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unknown command(s) from Nagios XI web

Post by scottwilkerson »

marin wrote:Desperately I went through configuration for that service on nagios server, nsclient++ configuration on the client server, and all looked good.

Then I found out why the service can't work, and it was about wrong host configuration. The IP address in host definition was wrong.

That explains why I was getting the expected results when testing, either from command line or web UI while service definition, beacause there I used dns name of the server. When the service was defined it was run against the wrong host.

I'm sorry for posting, it turned out to be a rookie mistake with host definition.
Glad you figured it out!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked