Graphing "connections" in postgres module

Hi florianbeer,

Thank you for your response.

I dedicated some time to this today and worked it all out (thanks to your guidance as a starting point).

I also have this problem which no one could answer:

but have been able to work out both issues from your response.

Firstly, the “Backends” was always showing up correctly, I just never realised it at the time.

Secondly, I de-selected the postgres App, then removed the RRD files. I couldn’t work out how to remove db entries etc, couldn’t find anything to remove even when installing phpMyAdmin on it. If you have a document/help on this anywhere, please advise (just for my interest).

I then checked the /etc/snmp/postgres script, which calls the Nagios check_postgres.pl script, and noticed that the Nagios script allows for multiple ports to be included on the ports line, so I changed the top of the postgres script to be:

#make sure the paths are right for your system
##cpg='/usr/bin/env check_postgres.pl'
cpg='/usr/bin/env /usr/local/nagios/libexec/check_postgres'

$cpg -u $DBuser -p 5598,5599 --action dbstats | awk -F ' ' '

Notice the important part there is “-p 5598,5599” which must be added to the script. This is nowhere to be found in any documentation but the Nagios script supports multiple ports to be defined there, therefore supplying access to all the DB’s. This should be added to the LibreNMS docs so it can help others.

Then I waited 5 minutes for the poll to finish, then I re-added the entry into /etc/snmp/snmpd.conf and re-enabled in LibreNMS, then waited.

The script was then able to see all databases, and pull the right metrics for each.

Very happy. I’ll update the other case with the same reference to this case for solved status.

Michael.