Skip to content

Commit

Permalink
[Metricbeat][Postgresql][Database] Fix fields not being parsed correc…
Browse files Browse the repository at this point in the history
…tly (#37720) (#38411)

* change blk_read_time and blk_write_time from long to double type

* add changelog entry

* remove unnecessary changes

(cherry picked from commit a9dfc67)

Co-authored-by: Kush Rana <89848966+kush-elastic@users.noreply.github.com>
  • Loading branch information
mergify[bot] and kush-elastic committed Mar 20, 2024
1 parent 5d98ccf commit 2f1fce1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Expand Up @@ -111,6 +111,7 @@ fields added to events containing the Beats version. {pull}37553[37553]

*Metricbeat*

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

*Osquerybeat*

Expand Down
4 changes: 2 additions & 2 deletions metricbeat/docs/fields.asciidoc
Expand Up @@ -56448,7 +56448,7 @@ type: long
Time spent reading data file blocks by backends in this database, in milliseconds.


type: long
type: double

--

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


type: long
type: double

--

Expand Down
4 changes: 2 additions & 2 deletions metricbeat/module/postgresql/database/_meta/fields.yml
Expand Up @@ -36,12 +36,12 @@
that a read was not necessary (this only includes hits in the PostgreSQL
buffer cache, not the operating system's file system cache).
- name: blocks.time.read.ms
type: long
type: double
description: >
Time spent reading data file blocks by backends in this database, in
milliseconds.
- name: blocks.time.write.ms
type: long
type: double
description: >
Time spent writing data file blocks by backends in this database, in
milliseconds.
Expand Down
4 changes: 2 additions & 2 deletions metricbeat/module/postgresql/database/data.go
Expand Up @@ -37,8 +37,8 @@ var schema = s.Schema{
"read": c.Int("blks_read"),
"hit": c.Int("blks_hit"),
"time": s.Object{
"read": s.Object{"ms": c.Int("blk_read_time")},
"write": s.Object{"ms": c.Int("blk_write_time")},
"read": s.Object{"ms": c.Float("blk_read_time")},
"write": s.Object{"ms": c.Float("blk_write_time")},
},
},
"rows": s.Object{
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/postgresql/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2f1fce1

Please sign in to comment.