Page 1 of 1

Nagios Graph Suggestions

Posted: Mon Apr 20, 2015 3:37 pm
by gdolidze
I am looking for a nagios graph plugin that will let me know what processes are using the resource

for example : in Memory Usage I don't want to know total free or used,
I wanna know what process are using up the memory

Any suggestion to how I can set nagios to do this or any plugins that do this.

Re: Nagios Graph Suggestions

Posted: Mon Apr 20, 2015 4:53 pm
by jdalrymple
Are you wanting to graph specifically the top memory using process, or all memory processes? The latter would be an unreadable graph for sure because you'd be stacking hundreds of processes even on a low utilization system. The former could be done - but I suspect it will require writing a custom plugin. I've never seen one that does this.

Or are you just trying to monitor/alert/notify memory and make mention of the top using processes. There are plugins on the exchange for that, however they are generally platform specific. What platform is it you're working with?

Re: Nagios Graph Suggestions

Posted: Mon Apr 20, 2015 4:53 pm
by abrist
You would most likely have to roll your own and I am unsure how you would graph this.
You could create a bash script to just peal off like the top 5 processes by memory, etc from ps:
ps aux | sort -nk +4 | tail

Re: Nagios Graph Suggestions

Posted: Mon Apr 20, 2015 4:57 pm
by lmiltchev
You can also try this plugin:

http://exchange.nagios.org/directory/Pl ... ge/details

Here's some examples:

Code: Select all

Usage:
check_proc_mem.sh -w <warn_MB> -c <criti_MB> <pid_pattern> <pattern_argument>

Below: If tomcat use more than 1024MB resident memory, send warning
check_proc_mem.sh -w 1024 -c 2048 --pidfile /var/run/tomcat7.pid
check_proc_mem.sh -w 1024 -c 2048 --pid 11325
check_proc_mem.sh -w 1024 -c 2048 --cmdpattern "tomcat7.*java.*Dcom"
You may need to add it to sudoers in order to work in the GUI.

Re: Nagios Graph Suggestions

Posted: Tue Apr 21, 2015 8:19 am
by gdolidze
I want it so basically if it is using a lot of memory i will be notified or if u notice constant peak in memory i can go back and look at a weeks graph showing me which services were causing the peak.

Re: Nagios Graph Suggestions

Posted: Tue Apr 21, 2015 9:45 am
by jdalrymple
gdolidze wrote:i can go back and look at a weeks graph showing me which services were causing the peak.
I can't understand how this graph would look. At the moment I have a Windows 2008 R2 server doing nothing that has 76 processes running. How will you graph 76 separate processes, and what happens to those processes that come and go?

Re: Nagios Graph Suggestions

Posted: Tue Apr 21, 2015 11:11 am
by gdolidze
Ok say you get a notification and it says memory usage is too high i want to see the top 5 process that are causing the spike.

I guess someone said that already i have to make my own.