APMIA Postgres Database extension seems to report wrong value for Checkpoints metric
search cancel

APMIA Postgres Database extension seems to report wrong value for Checkpoints metric

book

Article ID: 409860

calendar_today

Updated On:

Products

DX SaaS

Issue/Introduction

APMIA Postgres Database extension is reporting wrong value for Checkpoints metric:

Metric path: SuperDomain|<hostname>|Infrastructure|Agent|Postgres Databases|<database server IP/hostname>>|postgres|Checkpoints:Time Spent Where Files Are Written To Disk

Resolution

Based on the current Postgres Database extension design, APMIA agent Postgres Database extension is reporting correct value for the metric

Checkpoints:Time Spent Where Files Are Written To Disk (ms).

APMIA agent is reporting checkpoint_write_time value of the following query.

SELECT checkpoint_write_time from pg_stat_bgwriter;

These values from the SQL command and APMIA metric match.

The checkpoint_write_time from above query is cumulative value.

APMIA agent Postgres Database extension metric definition is this:
The total amount of time that has been spent in the portion of checkpoint processing where files are written to disk, in milliseconds

The postgres definition for the value is this:
checkpoint_write_time
Total amount of time that has been spent in the portion of processing checkpoints where files are written to disk, in milliseconds
checkpoint_write_time is a cumulative counter, meaning it accumulates the write time across all checkpoints since the last reset of the statistics