The Postgres Enterprise Manager (PEM) tool is designed to help with managing and monitoring multiple Postgres servers. It provides status information that can be useful for any administrator, and comes with an alerting system to let you know when a server may be down or encountering some issues. However, when PEM is first installed, even though alerting looks like it’s already pre-configured, including a starting set of alerts that have been included as a template, the alerts don’t actually trigger. For example:
I have my default alerts enabled, but even though I have a server down, there are no alerts.
The issue is most likely because the default installation of PEM does not activate alerts. If you install PEM using the yum repository files, it provides you with the standard agents.cfg file, usually located in /usr/edb/pem/agent/etc/agent.cfg. In it, the field alerts_threads is set by default to 0, which keeps it disabled. Here, I change the value and then restart the pemagent service on the PEM server (I am on Centos 7, hence the systemctl command instead of service)
[root@35f801c581e1 /]# vi /usr/edb/pem/agent/etc/agent.cfg
[root@35f801c581e1 /]# systemctl start pemagent
Once this change is made, refresh the browser screen and it is now alerting properly, notifying me of a number of issues: