![]() |
2 лет назад | |
---|---|---|
.. | ||
Makefile.inc | 6 лет назад | |
README.md | 2 лет назад | |
postgres.chart.py | 3 лет назад | |
postgres.conf | 3 лет назад |
Warning: This module is deprecated and will be deleted in v1.37.0. Use go.d/postgres.
Collects database health and performance metrics.
python-psycopg2
package. You have to install it manually and make sure that it is available to the netdata
user, either using pip
, the package manager of your Linux distribution, or any other method you prefer.
PostgreSQL v9.4+
Following charts are drawn:
Database size MB
Current Backend Processes processes
Current Backend Process Usage percentage
Write-Ahead Logging Statistics files/s
Checkpoints writes/s
Current connections to db count
Tuples returned from db tuples/s
Tuple reads from db reads/s
Transactions on db transactions/s
Tuples written to db writes/s
Locks on db count per type
Standby delta KB
Standby lag seconds
Average number of blocking transactions in db processes
Edit the python.d/postgres.conf
configuration file using edit-config
from the Netdata config
directory, which is typically at /etc/netdata
.
cd /etc/netdata # Replace this path with your Netdata config directory, if different
sudo ./edit-config python.d/postgres.conf
When no configuration file is found, the module tries to connect to TCP/IP socket: localhost:5432
with the
following collection jobs.
socket:
name : 'socket'
user : 'postgres'
database : 'postgres'
tcp:
name : 'tcp'
user : 'postgres'
database : 'postgres'
host : 'localhost'
port : 5432
Note: Every job collection must have a unique identifier. In cases that you monitor multiple DBs, every job must have it's own name. Use a mnemonic of your preference (e.g us_east_db, us_east_tcp)
To troubleshoot issues with the postgres
collector, run the python.d.plugin
with the debug option enabled. The output
should give you clues as to why the collector isn't working.
First, navigate to your plugins directory, usually at /usr/libexec/netdata/plugins.d/
. If that's not the case on your
system, open netdata.conf
and look for the setting plugins directory
. Once you're in the plugin's directory, switch
to the netdata
user.
cd /usr/libexec/netdata/plugins.d/
sudo su -s /bin/bash netdata
You can now run the python.d.plugin
to debug the collector:
./python.d.plugin postgres debug trace