Page 2 of 3
Re: Check process Windows Server 2012
Posted: Fri Dec 23, 2016 5:52 pm
by ruffsense
Can you post your ini file?
Re: Check process Windows Server 2012
Posted: Tue Dec 27, 2016 12:57 pm
by rkennedy
Yes, please post the file. Thanks @ruffsense!
Re: Check process Windows Server 2012
Posted: Tue Jan 03, 2017 4:27 am
by nagios_aws
Hello everyone,
First of all, I wish you the best for the year to come
and to come back to my problem, you can find the conf file in attachment.
please notice that the new conf file is almost empty, I will fill in with old informations translated when I found out how to ...
if you can help me "convert" the old conf to the new conf format, It will be great also
thank you
Re: Check process Windows Server 2012
Posted: Tue Jan 03, 2017 12:34 pm
by rkennedy
From what I can tell, your nsclient.ini looks good provided you're using 0.4.3. Please attempt to test over the command line from the /usr/local/nagios/libexec/ directory with something similar to this -
Code: Select all
[root@localhost libexec]# ./check_nt -H 192.168.47.8 -p 12489 -v PROCSTATE -d SHOWALL -l cmd.exe
cmd.exe: not running
Let us know the full output from your testing. If it fails, please run
netstat -an | findstr 12489 on the Windows machine, and post it for us to review.
Re: Check process Windows Server 2012
Posted: Wed Jan 04, 2017 3:07 am
by nagios_aws
Hello,
it seems to work in command line, but I can't find where to indicate the port in the Nagios interface, it's some users variables ("check_nt screenshot") ...
and when I try to test the command, I get the "command check test" screen
Where can I fill in for the $USER7$ ? what is $USER8$ ?
thank you
Re: Check process Windows Server 2012
Posted: Wed Jan 04, 2017 11:28 am
by rkennedy
Take a look at this file for how to modify the $USER#$ macros -
https://assets.nagios.com/downloads/nag ... Macros.pdf - essentially just the /usr/local/nagios/etc/resource.cfg file. I would make sure that $USER7$ is equal to 12489 - it should work at that point. If not, please post your resource.cfg for us to review.
Re: Check process Windows Server 2012
Posted: Wed Jan 04, 2017 11:31 am
by dwhitfield
Actually, .4.3 has a serious PROCSTATE bug. You should upgrade to .4.4. if you want to use PROCSTATE.
Re: Check process Windows Server 2012
Posted: Mon Jan 09, 2017 8:40 am
by nagios_aws
Hello,
so if I want to monitor a process :
- have to be on .4.4,
- need the $USER7$ variable set to 12489 (already done)
- modify the check_nt command to get rid of the "-s $USER8$"
right ?
I don't want to use PROCSTATE at all costs, I want to monitor a process on Windows Server, that's all.
Re: Check process Windows Server 2012
Posted: Mon Jan 09, 2017 11:05 am
by dwhitfield
nagios_aws wrote:Hello,
so if I want to monitor a process :
- have to be on .4.4,
- need the $USER7$ variable set to 12489 (already done)
- modify the check_nt command to get rid of the "-s $USER8$"
right ?
correct, though if you post your resource.cfg we can be more confident.
Also, you said you were on .5, right? If that's the case, the problem may be that your nsclient.ini is built for .4.x. Unfortunately, NSClient leaves some cruft around between versions. You can just uninstall it, you also have to delete all of the data associated with it.
I don't want to use PROCSTATE at all costs, I want to monitor a process on Windows Server, that's all.
You can definitely do some process monitoring with WMI, but I'm not sure if it's exactly what you want:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Also, at this point, I see no reason to push you to WMI, unless you just see an easier configuration than NSClient.
Re: Check process Windows Server 2012
Posted: Tue Jan 10, 2017 3:40 am
by nagios_aws
Hello,
yes, i'm on 0.5 version, I did a clean install of it, so the nsclient.ini is a standard one.
I modified the check_nt command to get rid of the $USER8$ variable (password) and it works now.
I have also added some instructions in nsclient.ini to handle my commands and arguments:
Code: Select all
[/settings/NRPE/server]
allow arguments = true
Code: Select all
[/settings/external scripts]
allow arguments=true
Code: Select all
[/settings/external scripts/scripts]
mycommand=blablabla
everything seems to work as expected now, thank you for your help !
you can close this thread I think