Page 2 of 4

Re: Service Status NOT FOUND

Posted: Wed Jan 11, 2017 2:30 pm
by rkennedy
Those logs appear to be old - what is the output of this ran on the Windows machine?

Code: Select all

netstat -na | findstr 12489
Additionally, please post the full curent nsclient.ini from one of the machines. (also, specify which one it is)

Re: Service Status NOT FOUND

Posted: Wed Jan 11, 2017 6:15 pm
by Box293
kwhogster wrote:Added Notes to my last posting of the ini files

I just restated one of the servers no change the same three services not working.

Also from the Nagios server I run this

root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/./check_nt -H 10.2.8.34 -v SERVICESTATE -d SHOWALL -l uxsms
CRITICAL - Socket timeout after 10 seconds

HTH
This command won't work as you haven't specified the port or the secret.

It should be:

Code: Select all

/usr/lib/nagios/plugins/check_nt -H 10.2.8.34 -p 12489 -s xxxxxxxx -v SERVICESTATE -d SHOWALL -l uxsms
Using your nsclient.ini file (SERVER06) on Windows 2008 R2 with NSClient v0.4.1.73 works fine:

Code: Select all

./check_nt -H 10.25.14.2 -p 12489 -s xxxxxxxx -v SERVICESTATE -d SHOWALL -l uxsms
 uxsms: Started
I suggest:
  • un-installing NSClient++
    rebooting the server
    make sure the C:\Program Files\NSClient++ directory does not exist
    Install NSClient++
If that doesn't work then I would re-do above steps but try the latest version of NSClient++

Re: Service Status NOT FOUND

Posted: Wed Jan 11, 2017 8:24 pm
by kwhogster
Box293

root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/./check_nt -H 10.2.8.33 -p 12489 -s xxxxxxxx -v SERVICESTATE -d SHOWALL -l uxsms
uxsms: Started
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/./check_nt -H 10.2.8.33 -p 12489 -s xxxxxxxxxx -v SERVICESTATE -d SHOWALL -l windefend
windefend: Started
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/./check_nt -H 10.2.8.34 -p 12489 -s xxxxxxxxx -v SERVICESTATE -d SHOWALL -l windefend
windefend: Started
root@tgcs017:/usr/local/nagios/etc/objects# vi servers.cfg
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/./check_nt -H 10.2.8.33 -p 12489 -s xxxxxxxx -v SERVICESTATE -d SHOWALL -l UxSms
UxSms: Started


That works



Rkennedy

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Windows\system32>netstat -na | findstr 12489
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING
TCP [::]:12489 [::]:0 LISTENING

C:\Windows\system32>

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Windows\system32>netstat -na | findstr 12489
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING
TCP [::]:12489 [::]:0 LISTENING

C:\Windows\system32>

Both machines look fine

As you can see from Box293 posting I had the command incorrect

Now it works with that command from the Nagios server and it sees those services are running.

Also I have a NRPE that checks all services and that is working too.

Just these three services on two servers very strange

Any ideas?

Re: Service Status NOT FOUND

Posted: Thu Jan 12, 2017 1:49 pm
by dwhitfield
kwhogster wrote: That works
Great!
Just these three services on two servers very strange

Any ideas?
I'm a bit confused. The check @Box293 gave you is working...what exactly isn't working?

Re: Service Status NOT FOUND

Posted: Thu Jan 12, 2017 7:48 pm
by kwhogster
Take a look at first page and my first post.

This was two questions

the one that is working is the command when I run it from the Nagios server console.

The Nagios web portal still shows not found

This is something in the config file I think now all network works nmap netstat etc. these in past post too.

REmember that I have over 70 services being checked on both of these machines and all but three are working

Yes strange

Re: Service Status NOT FOUND

Posted: Fri Jan 13, 2017 11:03 am
by rkennedy
What user are those 3 services starting / running as? It may be related to permissions.

Also, please post the nsclient.log file as this may have a clue to where the problem is occurring.

Re: Service Status NOT FOUND

Posted: Fri Jan 13, 2017 8:24 pm
by kwhogster
rKennedy

The services

windefend Local Service account

wuauserv Local Service account

uxsms Local Service Account


NOTE

I also use this NRPE Check

define service {
host_name TGCS006
service_description Check All Service
check_command check_nrpe!checkservicestate! -a CheckAll exclude=WLMS
servicegroups AllServices
check_interval 1
use generic-service
}

This works fine it checks all the autostart services to make sure they are all started. It is not complaining about any of the three above



See attached nscleint ini file

Re: Service Status NOT FOUND

Posted: Mon Jan 16, 2017 1:46 pm
by rkennedy
kwhogster wrote:rKennedy

The services

windefend Local Service account

wuauserv Local Service account

uxsms Local Service Account


NOTE

I also use this NRPE Check

define service {
host_name TGCS006
service_description Check All Service
check_command check_nrpe!checkservicestate! -a CheckAll exclude=WLMS
servicegroups AllServices
check_interval 1
use generic-service
}

This works fine it checks all the autostart services to make sure they are all started. It is not complaining about any of the three above



See attached nscleint ini file
The commands posted above are using check_nrpe, where as the ones @Box293 had you run are with check_nt - in order to get it working, I suggest you switch them over to use check_nt specifically, as they appear to be working for you from the CLI -

Code: Select all

root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/./check_nt -H 10.2.8.33 -p 12489 -s xxxxxxxx -v SERVICESTATE -d SHOWALL -l uxsms
uxsms: Started
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/./check_nt -H 10.2.8.33 -p 12489 -s xxxxxxxxxx -v SERVICESTATE -d SHOWALL -l windefend
windefend: Started
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/./check_nt -H 10.2.8.34 -p 12489 -s xxxxxxxxx -v SERVICESTATE -d SHOWALL -l windefend
windefend: Started
root@tgcs017:/usr/local/nagios/etc/objects# vi servers.cfg
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/./check_nt -H 10.2.8.33 -p 12489 -s xxxxxxxx -v SERVICESTATE -d SHOWALL -l UxSms
UxSms: Started

Re: Service Status NOT FOUND

Posted: Mon Jan 16, 2017 2:00 pm
by kwhogster
They are using check_nt

I was just siting another example of something that is working on those two servers

Can we focus on the problem at hand review page 1 first post

The config files use check_nt.

The config file has 70 plus other services that use check_nt

It is just these 6 services not working and they are all started automatically

Thoughts :oops:

Re: Service Status NOT FOUND

Posted: Mon Jan 16, 2017 4:08 pm
by tgriep
I looked at the Changelog for NSClient++ and there has been a lot of bug files for the check_nt compatibility and also a few bugs fixed for the SERVICESTATE command.
I suggest that you upgrade the servers with the latest stable 0.4.x version of NSClient++ and see if that fixes the issue.
You can download it at the following link.
http://www.nsclient.org