In the last post we did a click/click/click setup of the PEM server. What we want to do now is to attach a PostgreSQL instance to the PEM server for being able to monitor and administer it. For that we need to install the PEM agent on a host where we have a PostgreSQL instance running (192.168.22.249 in my case, which runs PostgreSQL 10 Beta1). Lets go …
As usual, when you want to have the systemd services generated automatically you should run the installation as root:
[[email protected] postgres]# ls pem_agent-7.0.0-beta1-1-linux-x64.run [[email protected] postgres]# chmod +x pem_agent-7.0.0-beta1-1-linux-x64.run [[email protected] postgres]# ./pem_agent-7.0.0-beta1-1-linux-x64.run
The installation itself is not a big deal, just follow the screens:
Once done we have a new systemd service:
[[email protected] postgres]# systemctl list-unit-files | grep pem pemagent.service enabled
… and the processes that make up the PEM agent:
[[email protected] postgres]# ps -ef | grep pem root 3454 1 0 16:40 ? 00:00:00 /u01/app/postgres/product/pem7/agent/agent/bin/pemagent -c /u01/app/postgres/product/pem7/agent/agent/etc/agent.cfg root 3455 3454 0 16:40 ? 00:00:00 /u01/app/postgres/product/pem7/agent/agent/bin/pemworker -c /u01/app/postgres/product/pem7/agent/agent/etc/agent.cfg --pid 3454 root 3515 2741 0 16:43 pts/0 00:00:00 grep --color=auto pem
Of course, we need to allow connections to our PostgreSQL instance from the PEM server. Adding this to the pg_hba.conf and reloading the instance fixes the issue:
host all all 192.168.22.248/32 md5
… and the instance is there.
In the next post we’ll setup some monitoring for our newly added PostgreSQL instance.