This article outlines the steps required to configure an encrypted SSL connection between the PostgreSQL Agent and a PostgreSQL server. For full details on secure connections, refer to the Secure TCP/IP Connections with SSL section in the PostgreSQL documentation for your version.
ssl = on is set in postgresql.conf.pg_hba.conf to require certificate authentication and ensure root CA certificates are present.The agent supports two methods for accessing certificates:
openssl pkcs8 -topk8 -inform PEM -outform DER -in postgresql.key -out postgresql.pk8 -nocrypt
    
To keep the key encrypted, omit -nocrypt and provide the password in agent properties.
openssl x509 -outform DER -in server.crt -out server.crt.der
    
keytool:keytool.exe -import -file server.crt.der -keystore ..\lib\security\cacerts -alias postgresql
    
Default password for cacerts is changeit.
To preserve the truststore across upgrades, copy cacerts to a custom location (e.g., [FGLAM_HOME]\truststore).
Edit baseline.jvmargs.config in [FGLAM_HOME]\state\default\config:
vmparameter.0 = "-Djavax.net.ssl.trustStore="C:/Quest/Foglight Agent Manager/truststore/cacerts"";
vmparameter.1 = "-Djavax.net.ssl.trustStorePassword=changeit";
    
Escape quotes and adjust paths to match your environment.
Restart the Foglight Agent Manager to apply changes.