Skip to content

Commit

Permalink
Adjust README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasscherman committed Mar 10, 2021
1 parent c4c4340 commit e39c822
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,21 @@ Called once per your Postgres cluster.
per each slave. If the slave and the master are in synchronous state,
the replication delay is zero.


### Database Local Directory Based (Global) Metrics

* **get_stats_wal_file_amount**:
This graph shows the amount of files in your database clusters WAL log
directory (pg_wal or pg_xlog). If the WAL file amount starts to suddenly
increase, you probably have issues with your WAL archiving process, which
might lead to the disk filling up, and you database cluster crashing.

* **get_xid_remaining_ratio, get_multixact_remaining_ratio, get_multixact_members_remaining_ratio**:
These metric shows the corresponding remaining % of transaction ids ("xid"), multixact ids ("mxid"),
and multixact members that are available for postgres to use before exhaustion.
Useful for ensuring that the vacuuming is working as intended for your postgres instance.

* **get_multixact_members_per_mxid**:
This metric emits the number of multixact members there are per multixact ID. A larger number means
that it'll be quicker for the multixact members exhaustion to happen (as can
be seen in **get_multixact_members_usage_ratio**).


## Short Overview of Python Modules
Expand Down
2 changes: 1 addition & 1 deletion etc/postgresql-metrics/default/postgresql-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ global_db_functions:
- ["get_stats_heap_hit_statistics", 60]
- ["get_stats_replication_delays", 60]
- ["get_stats_wal_file_amount", 180]
- ["get_multixact_members_usage_ratio", 60]
- ["get_multixact_members_per_mxid", 60]
- ["get_multixact_members_remaining_ratio", 60]
- ["get_multixact_remaining_ratio", 60]
- ["get_xid_remaining_ratio", 60]
2 changes: 1 addition & 1 deletion postgresql_metrics/metrics_gatherer.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def get_multixact_members_per_mxid(data_dir, db_connection):
return [metric_multixact_members_per_mxid(members_per_id)]


def get_multixact_members_usage_ratio(data_dir, _db_connection):
def get_multixact_members_remaining_ratio(data_dir, _db_connection):
members = _get_multixact_members(data_dir)
ratio = round(members / MAX_MULTIXACT_MEMBERS, 2)
percentage_remaining = (1.0 - ratio) * 100
Expand Down

0 comments on commit e39c822

Please sign in to comment.