Top 5 Memory n Cpu Consuming Process

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
sh.shekhar89
Posts: 52
Joined: Fri Oct 10, 2014 3:17 pm

Top 5 Memory n Cpu Consuming Process

Post by sh.shekhar89 »

Hi All,

Can we check top 5 memory and cpu consuming process in nagios for windows clinets??

If any one knows,please guide me how to configure.

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

Re: Top 5 Memory n Cpu Consuming Process

Post by slansing »

You would need to set up a separate plugin/check that collates all of your windows service check returns, then displays that as a service check result somewhere. You could also scrape the CGI's/status.dat for this information and figure out a way to configure that in the Core web interface. There is no guide for this per se.
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Top 5 Memory n Cpu Consuming Process

Post by eloyd »

You can definitely get this information as mentioned, but aside from simply collecting it, what do you want to do with it? In other words, what would you consider to be the warning and critical criteria for alerting? Or do you simply want to gather the information and store it away for future use?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Top 5 Memory n Cpu Consuming Process

Post by lmiltchev »

sh.shekhar89, did slansing and eloyd answer your question? Is it safe to lock this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
belvdr
Posts: 81
Joined: Tue Oct 08, 2013 9:17 pm

Re: Top 5 Memory n Cpu Consuming Process

Post by belvdr »

I am in the same boat.

I have a Windows server that I monitor CPU usage via SNMP. When a high CPU condition exists, the server becomes unresponsive to Windows protocols (WMI, RDP, etc). So, I am trying to write an event handler that dumps the top processes sorted by CPU usage. I need to do this via SNMP but am coming up short.

Anyone know how to find the top processes by CPU via SNMP?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Top 5 Memory n Cpu Consuming Process

Post by abrist »

I have looked through Microsoft's SNMP documentation (sparse as it is now officially deprecated by MS) and I do not see an oid that would return this specific information. You will most likely have to write a custom powershell script to do this.
So I have a question: If the windows server is not responding to network services when under high load, how will you run this event handler script on the server through an agent?
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.
belvdr
Posts: 81
Joined: Tue Oct 08, 2013 9:17 pm

Re: Top 5 Memory n Cpu Consuming Process

Post by belvdr »

SNMP queries still seem to go through, but MS protocols are hosed.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Top 5 Memory n Cpu Consuming Process

Post by tmcdonald »

Unfortunately I think abrist is right here - that's a fairly specific request for a single SNMP query and there doesn't appear to be an OID for it. If this information is available at all via SNMP you will need to do multiple checks in a custom script, sort them, then display the results accordingly.
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Top 5 Memory n Cpu Consuming Process

Post by eloyd »

So this was a thread hijack and the op hasn't responded, but if they are still around, I would like to get an answer to my question, since it may help decide what the best path forward might be:
You can definitely get this information as mentioned, but aside from simply collecting it, what do you want to do with it? In other words, what would you consider to be the warning and critical criteria for alerting? Or do you simply want to gather the information and store it away for future use?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Top 5 Memory n Cpu Consuming Process

Post by abrist »

@OP: Does any of this make sense or are any of the responses here helpful OP?
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.
Locked