Fortinet Document Library

Version:


Table of Contents

User Guide

21.4.0
Copy Link

PostgreSQL

The PostgreSQL plugin allows you to monitor a number of metrics about the PostgreSQL database running on your server. If you can not find this plugin in the /usr/lib/panopta-agent/plugins folder, then your version of the Agent is out of date and you should update it to gain access to this feature.

Please note that at this time the PostgreSQL plugin can only monitor one database and only supports password or md5 authentication.

PostgreSQL Configuration

You will need to add a panopta-agent user to PostgreSQL. You can do this by typing in your psql shell:

CREATE USER "panopta-agent" WITH PASSWORD 'XXXXX';

You should also give this user access to the database you would like to monitor.

Agent Configuration

In addition you will need to add your PostgreSQL username and password to the /etc/panopta-agent/panopta_agent.cfg file as shown below:

[postgresql]
hostname = localhost
port = 5432
username = panopta-agent
password = XXXXX
database = SomeDatabase
unix_sock = /tmp/.s.PGSQL.5432 (optional for unix socket based connections)

Make sure that the password in the configuration file matches that of the panopta-agent user in PostgreSQL.

Unix socket connections are also supported. If you choose to use this option, the hostname parameter will be ignored.

Control Panel Configuration

After making this change, give the agent a few minutes to sync with our FortiMonitor’s server then you should see new server resources available to add for the server in the control panel.

To add a PostgreSQL agent resource to your server first see Add FortiMonitor Agent checks if you have not already.

First select “PostgreSQL” from the monitoring catalog.

The metric drop-down will have the following options:

  • Blocks read from buffer cache

  • Blocks read from disk

  • Buffer cache hit rate (%)

  • DELETES

  • INSERTS

  • Number of active backends

  • SELECTS (from index)

  • SELECTS (from scans)

  • Total queries

  • Total transactions

  • Transactions committed

  • Transactions rolled back

  • UPDATES

  • Total database checkpoints

  • Minutes between database checkpoints

  • Total connections

  • Active connections

  • Idle connections

  • Idle in transaction connections

  • Connections waiting for lock

  • Max transaction age

  • Temp files generated

  • Temp bytes generated

 

PostgreSQL

The PostgreSQL plugin allows you to monitor a number of metrics about the PostgreSQL database running on your server. If you can not find this plugin in the /usr/lib/panopta-agent/plugins folder, then your version of the Agent is out of date and you should update it to gain access to this feature.

Please note that at this time the PostgreSQL plugin can only monitor one database and only supports password or md5 authentication.

PostgreSQL Configuration

You will need to add a panopta-agent user to PostgreSQL. You can do this by typing in your psql shell:

CREATE USER "panopta-agent" WITH PASSWORD 'XXXXX';

You should also give this user access to the database you would like to monitor.

Agent Configuration

In addition you will need to add your PostgreSQL username and password to the /etc/panopta-agent/panopta_agent.cfg file as shown below:

[postgresql]
hostname = localhost
port = 5432
username = panopta-agent
password = XXXXX
database = SomeDatabase
unix_sock = /tmp/.s.PGSQL.5432 (optional for unix socket based connections)

Make sure that the password in the configuration file matches that of the panopta-agent user in PostgreSQL.

Unix socket connections are also supported. If you choose to use this option, the hostname parameter will be ignored.

Control Panel Configuration

After making this change, give the agent a few minutes to sync with our FortiMonitor’s server then you should see new server resources available to add for the server in the control panel.

To add a PostgreSQL agent resource to your server first see Add FortiMonitor Agent checks if you have not already.

First select “PostgreSQL” from the monitoring catalog.

The metric drop-down will have the following options:

  • Blocks read from buffer cache

  • Blocks read from disk

  • Buffer cache hit rate (%)

  • DELETES

  • INSERTS

  • Number of active backends

  • SELECTS (from index)

  • SELECTS (from scans)

  • Total queries

  • Total transactions

  • Transactions committed

  • Transactions rolled back

  • UPDATES

  • Total database checkpoints

  • Minutes between database checkpoints

  • Total connections

  • Active connections

  • Idle connections

  • Idle in transaction connections

  • Connections waiting for lock

  • Max transaction age

  • Temp files generated

  • Temp bytes generated