Check Windows Processes

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Check Windows Processes

Post by ofadl »

Hey everyone,

So im trying to look for a check, that would basically check for specific windows processes on windows servers to work with NSClient++ on be displayed on the nagios website, anyone have a guide in handy?

Thanks
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Check Windows Processes

Post by slansing »

Here you go, this should fit the bill:

http://nagios.sourceforge.net/docs/3_0/ ... ndows.html
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

i was looking to define more specific processes such as and e.t.c :

AgentControl.exe
AFPSourceManager.exe
BRFSourceManager.exe
BRFInputHandler.exe
BZGSourceManager.exe
BZXSourceManager.exe
CBDSourceManager.exe
CCXSourceManager.exe
MNVSourceManager.exe
NelsonResearchReportsSourceManager.exe
NewsroomSourceManager.exe
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

ok basically each server runs different processes, like i mentioned in my previous posts, i have an older version of nagios running that uses NRPE. The new nagios website im running uses NSClient++. I am trying to figure out how to use NSClient to run these specific processes, and uses a notepad file called host.proclist.txt. The service definition on the old nagios server is as follows:

define service{
use comtex-service-template-vna ; Name of service template to use
host_name vnaart622,vnainp110
service_description Check processes are running
check_command check_nrpe!check_procs_from_file!c:\\nrpe_nt\\host.proclist.txt

my question is, does NSClient use the same text file, same service? or how would i modify it to work? sorry if this sounds confusing
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Check Windows Processes

Post by sreinhardt »

You are going to want something similar to this:

Code: Select all

Add the following service definition to monitor the Explorer.exe process on the Windows machine and generate a CRITICAL alert if the process is not running.

define service{
	use			generic-service
	host_name			winserver
	service_description	Explorer
	check_command		check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
	}
edit: ofadl's explanation for npre works pretty well too!! Just depends on how you would like to check things.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

can you explain how that works? I know on nrpe, there was a text file for the list of processes to run, then was a service definition and command definition on the nagios machine
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check Windows Processes

Post by abrist »

NSClient should have a config file in it's program directory. You can specify commands there. There is already an alias in that file for a process or service check. Think of the following (in an nrpe sense as):

Code: Select all

PROCSTATE
As the command, and

Code: Select all

-d SHOWALL -l Explorer.exe
As the arguments.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

is there a way i can set it up, to work the same way as it does on the old nagios server, using the host.proclist.txt file or some file specifying the types of desired processes to be run?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check Windows Processes

Post by abrist »

Is this list meant to be inclusive or exclusive? All encompassing, or particular?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Check Windows Processes

Post by ofadl »

each server has a different list of processes to be run, some have more then others, but all use the same .txt file when working on old nagios with nrpe
Locked