Nagios check to monitor individual process memory,cpu

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
madhudeva
Posts: 32
Joined: Thu Jun 20, 2013 1:08 am

Nagios check to monitor individual process memory,cpu

Post by madhudeva »

Hi Team,

We had a requirement that we need to monitor each and every single process in windows server and also at the same time need to monitor the memory used by that individual process and also CPU usage used by that process.

Is there any plugin that does this thing?

Please help me in this..

Regards,
Madhu
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios check to monitor individual process memory,cpu

Post by tmcdonald »

Every process? That seems pretty unrealistic. In XI you would need a separate service for each process. But then what if another process kicks off? Nagios would not know about it. There are too many moving parts and too much entropy for this to be remotely feasible.
Former Nagios employee
madhudeva
Posts: 32
Joined: Thu Jun 20, 2013 1:08 am

Re: Nagios check to monitor individual process memory,cpu

Post by madhudeva »

Hi tmcdonald,

Sorry.. i mean not each and every process.
Let say for example.. we would like to monitor some .exe process and for the same .exe process we would like to monitor the memory used by this .exe and at the same time would like to monitor CPU usage by that .exe process. It makes sense?

Correct me if I am wrong...

Regards,
Madhu
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios check to monitor individual process memory,cpu

Post by sreinhardt »

Yes this should be reasonably possible via several ways. NSclient process checks, NCPA process checks, performance monitor counters, or running an additional script. Do you have an agent installed on this machine already, or a preference of how you want to monitor it?
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.
madhudeva
Posts: 32
Joined: Thu Jun 20, 2013 1:08 am

Re: Nagios check to monitor individual process memory,cpu

Post by madhudeva »

Yes we had NSclient installed on Windows machine and we are monitoring the windows machine by nagios.
Please advice me on this..
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios check to monitor individual process memory,cpu

Post by sreinhardt »

Have you tried using the windows server wizard to add processes that you would like to monitor? It should contain the checks and settings you wish to use already!
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.
madhudeva
Posts: 32
Joined: Thu Jun 20, 2013 1:08 am

Re: Nagios check to monitor individual process memory,cpu

Post by madhudeva »

Yes.. I can monitor the process using this wizard.
But I need the memory usage of example.exe process.. how would I do that? Please help..
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios check to monitor individual process memory,cpu

Post by abrist »

You can do this using performance counters with nsclient.
For example:

Code: Select all

CheckCounter "Counter:javamemusage=\Process(java)\Private bytes" ShowAll 
Or:

Code: Select all

CheckCounter "Counter:explorermemusage=\Process(explorer)\Private bytes" ShowAll 
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.
madhudeva
Posts: 32
Joined: Thu Jun 20, 2013 1:08 am

Re: Nagios check to monitor individual process memory,cpu

Post by madhudeva »

In my case I would require to monitor D9AXAiServ.exe

CheckCounter "Counter:D9AXAiServmemusage=\Process(D9AXAiServ)\Private bytes" ShowAll

is the above syntax correct?
madhudeva
Posts: 32
Joined: Thu Jun 20, 2013 1:08 am

Re: Nagios check to monitor individual process memory,cpu

Post by madhudeva »

I tried with the below command via command line and got the below error.. please help

/usr/local/nagios/libexec#./check_nrpe -n -H hostname
I (0.3.9.329 2011-09-02) seem to be doing fine...

/usr/local/nagios/libexec# ./check_nrpe -n -H hostname -p 5666 -c CheckCounter -a "Counter:javamemusage=\Process(java)\Private bytes" ShowAll
Could not construct return packet in NRPE handler check client side (nsclient.log) logs...
Locked