Skip to content

Commit 674adda

Browse files
Removed duplicated metrics (#8116)
* Removed duplicated metrics * Add new metric * Add metadata.csv * Fix metadata * Update postgres/datadog_checks/postgres/util.py Co-authored-by: Andrew Zhang <31313038+yzhan289@users.noreply.github.com> Co-authored-by: Andrew Zhang <31313038+yzhan289@users.noreply.github.com>
1 parent a8fad97 commit 674adda

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

postgres/datadog_checks/postgres/util.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,10 @@ def build_relations_filter(relations_config, schema_field):
132132

133133
REL_METRICS = {
134134
'descriptors': [('relname', 'table'), ('schemaname', 'schema')],
135-
# This field contains old metrics that need to be deprecated. For now we keep sending them.
136-
'deprecated_metrics': {'idx_tup_fetch': ('postgresql.index_rows_fetched', AgentCheck.rate)},
137135
'metrics': {
138136
'seq_scan': ('postgresql.seq_scans', AgentCheck.rate),
139137
'seq_tup_read': ('postgresql.seq_rows_read', AgentCheck.rate),
140-
'idx_scan': ('postgresql.index_scans', AgentCheck.rate),
138+
'idx_scan': ('postgresql.index_rel_scans', AgentCheck.rate),
141139
'idx_tup_fetch': ('postgresql.index_rel_rows_fetched', AgentCheck.rate),
142140
'n_tup_ins': ('postgresql.rows_inserted', AgentCheck.rate),
143141
'n_tup_upd': ('postgresql.rows_updated', AgentCheck.rate),

postgres/metadata.csv

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ postgresql.bgwriter.sync_time,count,,millisecond,,The total amount of checkpoint
2626
postgresql.locks,gauge,,lock,,The number of locks active for this database.,0,postgres,locks
2727
postgresql.seq_scans,gauge,,,,The number of sequential scans initiated on this table.,0,postgres,seq scans
2828
postgresql.seq_rows_read,gauge,,row,second,The number of live rows fetched by sequential scans.,0,postgres,seq rows rd
29-
postgresql.index_scans,gauge,,,,The number of index scans initiated on this table.,0,postgres,idx scans
29+
postgresql.index_scans,gauge,,,,"The number of index scans initiated on this table, tagged by index.",0,postgres,idx scans
30+
postgresql.index_rel_scans,gauge,,,,The overall number of index scans initiated on this table.,0,postgres,idx scans
3031
postgresql.index_rows_fetched,gauge,,row,second,The number of live rows fetched by index scans.,0,postgres,idx rows fetch
3132
postgresql.index_rel_rows_fetched,gauge,,row,second,The number of live rows fetched by index scans.,0,postgres,idx rows fetch
3233
postgresql.rows_hot_updated,gauge,,row,second,"The number of rows HOT updated, meaning no separate index update was needed.",0,postgres,rows hot updated

0 commit comments

Comments
 (0)