Check process Windows Server 2012

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
ruffsense
Posts: 140
Joined: Thu Apr 11, 2013 12:40 am

Re: Check process Windows Server 2012

Post by ruffsense »

Can you post your ini file?
I don't insult, I diagnose.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check process Windows Server 2012

Post by rkennedy »

Yes, please post the file. Thanks @ruffsense!
Former Nagios Employee
nagios_aws
Posts: 76
Joined: Wed May 18, 2016 3:34 am

Re: Check process Windows Server 2012

Post 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
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check process Windows Server 2012

Post 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.
Former Nagios Employee
nagios_aws
Posts: 76
Joined: Wed May 18, 2016 3:34 am

Re: Check process Windows Server 2012

Post 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
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check process Windows Server 2012

Post 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.
Former Nagios Employee
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Check process Windows Server 2012

Post by dwhitfield »

Actually, .4.3 has a serious PROCSTATE bug. You should upgrade to .4.4. if you want to use PROCSTATE.
nagios_aws
Posts: 76
Joined: Wed May 18, 2016 3:34 am

Re: Check process Windows Server 2012

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Check process Windows Server 2012

Post 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.
nagios_aws
Posts: 76
Joined: Wed May 18, 2016 3:34 am

Re: Check process Windows Server 2012

Post 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 ! :D

you can close this thread I think
Locked