Hi. As an update, as per the other “osupdates” help forum I went through and added the various rules / policies into SELinux.
Graphs are also now showing for PosgreSQL but on only the one database running on 5598, not the other database running on 5599.
The /root/.pgpass has two lines, one for port 5598, the other for port 5599.
As we determined previously though, without specifying the port within the /etc/snmp/postgres script, the script doesn’t run complaining about:
ERROR: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Adding the port in the script produces the output.
So I have created two scripts, one for port 5598, the other for port 5599:
- /etc/snmp/postgres_port5598
- /etc/snmp/postgres_port5599
Both scripts run and produce output with the respective DB names.
I referenced these script in snmpd.conf as:
extend postgres /etc/snmp/postgres_port5598
extend postgres /etc/snmp/postgres_port5599
But when I look in the Web GUI, only the first one (port 5598) shows in the “Total” DBs listed (that and template1, template0, postgres).
Is there something I’m doing wrong or should I be doing something better/more correct ?
Michael.