Sounds to me like you'd make use of a script which emails you the high CPU usage.
For instance (note that this may need adjusting for your use-case)
Monitoring CPU Usage // Email and CRON Task.
Built with Ubuntu in mind.
First, create a new shell script for your monitoring, to do this:
sudo nano /opt/monitor-script/cpu-monitoring.sh
Next, create the script that will monitor our CPU usage:
cpuuse=$(cat /proc/loadavg | awk '{print $3}'|cut -f 1 -d ".")
if [ "$cpuuse" -ge 90 ]; then
SUBJECT="ALERT: CPU load is above threshold on $(hostname) | Reported at $(date)"
MESSAGE="/tmp/Mail.out"
TO="you@host.com"
echo "CPU current usage is: $cpuuse%" >> $MESSAGE
echo "" >> $MESSAGE
echo "+------------------------------------------------------------------+" >> $MESSAGE
echo "Top 20 processes consuming high CPU" >> $MESSAGE
echo "+------------------------------------------------------------------+" >> $MESSAGE
echo "$(top -bn1 | head -20)" >> $MESSAGE
echo "" >> $MESSAGE
echo "+------------------------------------------------------------------+" >> $MESSAGE
echo "Top 10 Processes consuming high CPU using the ps command" >> $MESSAGE
echo "+------------------------------------------------------------------+" >> $MESSAGE
echo "$(ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10)" >> $MESSAGE
mail -s "$SUBJECT" "$TO" < $MESSAGE
rm /tmp/Mail.out
else
echo "Server CPU usage is in under threshold"
fi
Finally, add a cronjob to automate this. In this example, it will run every 5 minutes.
crontab -e
*/10 * * * * /bin/bash /opt/monitor-script/cpu-monitoring.sh