Skip to content

Commit a9dfc67

Browse files
authored
[Metricbeat][Postgresql][Database] Fix fields not being parsed correctly (#37720)
* change blk_read_time and blk_write_time from long to double type * add changelog entry * remove unnecessary changes
1 parent 0797a64 commit a9dfc67

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

CHANGELOG.next.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ fields added to events containing the Beats version. {pull}37553[37553]
109109

110110
*Metricbeat*
111111

112+
- Fix fields not being parsed correctly in postgresql/database {issue}25301[25301] {pull}37720[37720]
112113

113114
*Osquerybeat*
114115

metricbeat/docs/fields.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56448,7 +56448,7 @@ type: long
5644856448
Time spent reading data file blocks by backends in this database, in milliseconds.
5644956449

5645056450

56451-
type: long
56451+
type: double
5645256452

5645356453
--
5645456454

@@ -56458,7 +56458,7 @@ type: long
5645856458
Time spent writing data file blocks by backends in this database, in milliseconds.
5645956459

5646056460

56461-
type: long
56461+
type: double
5646256462

5646356463
--
5646456464

metricbeat/module/postgresql/database/_meta/fields.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
that a read was not necessary (this only includes hits in the PostgreSQL
3737
buffer cache, not the operating system's file system cache).
3838
- name: blocks.time.read.ms
39-
type: long
39+
type: double
4040
description: >
4141
Time spent reading data file blocks by backends in this database, in
4242
milliseconds.
4343
- name: blocks.time.write.ms
44-
type: long
44+
type: double
4545
description: >
4646
Time spent writing data file blocks by backends in this database, in
4747
milliseconds.

metricbeat/module/postgresql/database/data.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ var schema = s.Schema{
3737
"read": c.Int("blks_read"),
3838
"hit": c.Int("blks_hit"),
3939
"time": s.Object{
40-
"read": s.Object{"ms": c.Int("blk_read_time")},
41-
"write": s.Object{"ms": c.Int("blk_write_time")},
40+
"read": s.Object{"ms": c.Float("blk_read_time")},
41+
"write": s.Object{"ms": c.Float("blk_write_time")},
4242
},
4343
},
4444
"rows": s.Object{

metricbeat/module/postgresql/fields.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)