Postgresql metrics are collected by the crunchy-collect container. To start collection of metrics on a Postgres database, you add the crunchy-collect container into the pod that holds the crunchy-pg container.
Metrics are stored in the crunchy-scope container. crunchy-scope runs the prometheus time series database, the prometheus pushgateway, and the grafana web application. An example of starting the crunchy-scope container is in examples/openshift/scope.json.
To start the crunchy-scope container, run the following:
oc process -f scope.json | oc create -f -
The crunchy-scope data in this example is stored in emptyDir volume types. To persist the data and grafana templates long term, you will want to use NFS volume types as specified in examples/openshift/scope-nfs.json.
When running crunchy-scope, the following ports are available: * crunchy-scope:9090 - the prometheus web user interface * crunchy-scope:9091 - the prometheus pushgateway REST API * crunchy-scope:3000 - the grafana web user interface
-
POLL_INT - number of minutes to sleep until metrics are collected. defaults to 15 minutes
-
PROM_GATEWAY - the http URL of the prometheus pushgateway into which the metrics will be pushed. defaults to http://crunchy-scope:9091
Metric | Description | Scope | Unit |
---|---|---|---|
crunchy_connections |
the number of active connections |
database/cluster |
count |
Metric | Description | Scope | Unit |
---|---|---|---|
crunchy_connectionutil |
the percent utilization of max connections |
cluster |
percent |
Metric | Description | Scope | Unit |
---|---|---|---|
crunchy_databasesize |
the size in Megabytes of a database |
database |
megabytes |
Metric | Description | Scope | Unit |
---|---|---|---|
crunchy_xact_commit |
Number of transactions in this database that have been committed |
database |
count |
crunchy_xact_rollback |
Number of transactions in this database that have been rolled back |
database |
count |
crunchy_tup_returned |
tup_returned |
database |
count |
crunchy_tup_fetched |
tup_fetched |
database |
count |
crunchy_tup_inserted |
tup_inserted |
database |
count |
crunchy_tup_updated |
tup_updated |
database |
count |
crunchy_tup_deleted |
tup_deleted |
database |
count |
crunchy_conflicts |
conflicts |
database |
count |
crunchy_temp_files |
temp_files |
database |
count |
crunchy_temp_bytes |
temp_bytes |
database |
count |
crunchy_deadlocks |
deadlocks |
database |
count |
crunchy_blks_read |
blks_read |
database |
count |
crunchy_blks_hit |
blks_hit |
database |
count |
crunchy_hit_ratio |
hit_ratio |
database |
percent |
crunchy_blk_read_time |
blk_read_time |
database |
time |
crunchy_blk_write_time |
blk_write_time |
database |
time |
Metric | Description | Scope | Unit |
---|---|---|---|
crunchy_checkpoints_timed |
checkpoints_timed |
cluster |
count |
crunchy_checkpoints_req |
checkpoints_req |
cluster |
count |
crunchy_checkpoint_write_time |
checkpoint_write_time |
cluster |
count |
crunchy_checkpoint_sync_time |
checkpoint_sync_time |
cluster |
count |
crunchy_buffers_checkpoint |
buffers_checkpoint |
cluster |
count |
crunchy_buffers_clean |
buffers_clean |
cluster |
count |
crunchy_maxwritten_clean |
maxwritten_clean |
cluster |
count |
crunchy_buffers_backend |
buffers_backend |
cluster |
count |
crunchy_buffers_backend_fsync |
buffers_backend_fsync |
cluster |
count |
crunchy_buffers_alloc |
buffers_alloc |
cluster |
count |
Metric | Description | Scope | Unit |
---|---|---|---|
crunchy_database_size |
database_size in megs |
database |
megabytes |
crunchy_table_size |
table size in megs |
database |
megabytes |
crunchy_index_size |
index size in megs |
database |
megabytes |
crunchy_total_size |
total size in megs |
database |
megabytes |
Metric | Description | Scope | Unit |
---|---|---|---|
crunchy_pct_dead |
percentage dead rows in table |
database |
item |
Metric | Description | Scope | Unit |
---|---|---|---|
crunchy_lock_count |
locks held for a database |
database |
count |
Metric | Description | Scope | unit |
---|---|---|---|
crunchy_xlog_count |
count of pg_xlog archive files |
cluster |
count |
Copyright © 2016 Crunchy Data Solutions, Inc.
CRUNCHY DATA SOLUTIONS, INC. PROVIDES THIS GUIDE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Crunchy, Crunchy Data Solutions, Inc. and the Crunchy Hippo Logo are trademarks of Crunchy Data Solutions, Inc.