Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
A check plugin to look at process CPU and Memory utilization
Current Version
1
Last Release Date
2014-01-18
Owner
Thomas Weaver
Website
http://www.toms-blog.com
Download URL
http://www.toms-blog.com/nagios-check-process-cpu-memory/
License
GPL
Compatible With
A check plugin for Nagios to monitor processes and their utilization of system resources. This plugin takes in a process name and then uses the command ps to work out how much memory and cpu all the processes of that name are taking up in percentage. It will output performance data for CPU Usage Percentage, Memory Usage Percentage, VSZ, RSS and the number of processes of that name. Options Only the -p option is required all other options are optional. -p allows you to specify the name of the process you want to monitor (REQUIRED) -w specify a warning for CPU percentage utilization -c specify a critical for CPU percentage utilization -m specify a warning for Memory percentage utilization -n specify a critical fro Memory percentage utilization Examples To monitor the apache processes and warn when the CPU uses over 20% and critical when over 30% ./check_cpu_proc.sh -p apache -w 20 -c 30 OK /usr/sbin/apache2 CPU: 0% MEM: 1.5% over 6 processes | proc=6 mem=1.5% cpu=0% rss=42116.0KB vsz=1274760.0KB To monitor apache processes and warn when the CPU uses over 20% and critical when over 30% . Warn when memory is over 0.2% and Critical when memory is over 0.4% ./check_cpu_proc.sh -p apache -w 20 -c 30 -m 0.2 -n 0.4 CRITICAL /usr/sbin/apache2 CPU: 0% MEM: 1.5% over 6 processes | proc=6 mem=1.5% cpu=0% rss=42116.0KB vsz=1274760.0KB To monitor nagios processes purely for performance data. i.e. no warning or criticals ./check_cpu_proc.sh -p nagios OK /usr/lib/nagios/plugins/check_ping CPU: 0% MEM: 0% over 1 processes | proc=1 mem=0% cpu=0% rss=864.0KB vsz=12408.0KB NOTE: this plugin doesn’t check whether the process is running and is purely for monitoring process utilization.
Thank you for the share.
You must be logged in to submit a review.
To:
From: