• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Server Health emailed alerts/alarms

N_Vas

Basic Pleskian
Hello,

I keep receiving emailed alerts with subject like:
"<server name> alarm level changed"

with content like:

Server health parameter "Memory > Real memory usage" changed its status from "green" to "yellow".
or
Server health parameter "Services > Apache CPU usage" changed its status from "red" to "yellow".

(and then a readout of the top command)



1) Where in Plesk can I see live alerts (or a historical log of these alerts)

2) Where can I change the settings (I think it may be too sensitive and the thresholds need to be adjusted)


3) I don't quite understand the alerts in general either, for example, the "Memory > Real memory usage", the TOP command output is for example:

top - 12:19:59 up 4:56, 1 user, load average: 0.21, 0.21, 0.21
Tasks: 255 total, 1 running, 254 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.5%us, 0.7%sy, 0.2%ni, 92.8%id, 0.8%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 5967176k total, 2539756k used, 3427420k free, 134972k buffers
Swap: 4194300k total, 788k used, 4193512k free, 664916k cached



More than half the memory is unused, very little swap is in use. I don't even see a reason to be warning about this.



Thanks
 
Hi N_Vas,

please have a look at the KB - article


... and bookmark it. It will help you to find log . and configuration files for Plesk.


The standard configuration should be edited - please have a closer look at the parts:
Code:
<alarm level="red" threshold="XX" type="percent"/>
<alarm level="yellow" threshold="XX" type="percent"/>
at your current configuration - if you experience "too" much eMail - notifications. Please experiment with the percentages to find your very own, unique configuration, because there is no "best" solution due to the case, that each server/system is unique when it comes to CPU, RAM and SWAP for example.
 
Thanks, I located the file that I'd need to modify (/usr/local/psa/var/custom-health-config.xml)

However I don't see a section for "Apache CPU usage", this is one of the alerts that we get:

"Server health parameter "Services > Apache CPU usage" changed its status from "yellow" to "red".

There is a "Web" section in the config file..... is that for the Apache alert?


BTW - I also noticed nginx is installed on the server, was that installed and used by Plesk in some way? We didn't install any web services when installing CentOS.
 
There is a "Web" section in the config file..... is that for the Apache alert?
Correct.
On the other hand, the definition "WebProxy" is for nginx.


BTW - I also noticed nginx is installed on the server, was that installed and used by Plesk in some way? We didn't install any web services when installing CentOS.
The component "Nginx reverse proxy support" is an additional component. If you would like to add/remove a Plesk component, you could use the Plesk - Control - Panel


or you can use the Plesk autoinstaller directly

/usr/local/psa/admin/sbin/autoinstaller --help

over the command line. To list all components for your current Plesk version, please use the command

/usr/local/psa/admin/sbin/autoinstaller --select-release-current --show-components --show-options
 
Back to the Health alerts, the configuration in /usr/local/psa/var/custom-health-config.xml seems to have reasonable thresholds, but I'm getting quite a few alerts - so I'm wondering if it's alerting on spikes in usage?

The 'memory' alert is also confusing for me, as only half the memory usage is in use, so it shouldn't even be alerting on that.


Below are two exampl alerts (a Apache CPU alert and a Memory alert). Based on these alerts - is the server under very heavy load? Should I be adding more CPUs and Memory? (the VM has 4 CPUs and 6GB of memory currently...)




Server health parameter "Services > Apache CPU usage" changed its status from "yellow" to "red".

top - 18:55:45 up 1 day, 11:31, 1 user, load average: 0.26, 0.25, 0.23
Tasks: 255 total, 1 running, 254 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.6%us, 0.6%sy, 0.0%ni, 93.5%id, 0.2%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 5967176k total, 2440328k used, 3526848k free, 157740k buffers
Swap: 4194300k total, 233284k used, 3961016k free, 608056k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
84441 xxxxxxxx 20 0 272m 102m 8296 S 37.5 1.8 0:41.99 php-cgi
1844 mysql 20 0 2179m 37m 3928 S 3.9 0.6 18:06.44 mysqld
1 root 20 0 19236 844 584 S 0.0 0.0 0:00.56 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 0:00.21 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.09 ksoftirqd/0
5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0





Server health parameter "Memory > Real memory usage" changed its status from "yellow" to "red".

top - 19:15:47 up 1 day, 11:51, 1 user, load average: 0.17, 0.27, 0.26
Tasks: 254 total, 2 running, 252 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.7%us, 0.6%sy, 0.0%ni, 93.5%id, 0.2%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 5967176k total, 2356744k used, 3610432k free, 160916k buffers
Swap: 4194300k total, 233284k used, 3961016k free, 608948k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
86059 xxxxxxxx 20 0 274m 102m 8652 S 81.0 1.8 0:20.40 php-cgi
85478 xxxxxxxx 20 0 285m 105m 9.9m R 13.8 1.8 0:41.87 php-cgi
1 root 20 0 19236 844 584 S 0.0 0.0 0:00.56 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 0:00.21 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.09 ksoftirqd/0
5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
6 root RT 0 0 0 0 S 0.0 0.0 0:00.12 watchdog/0




Thanks
 
Back
Top