Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metricbeat] [PostgreSQL] module [database] metricset - wrong mapping for blk_read_time and blk_write_time #25301

Closed
fkalinowski opened this issue Apr 26, 2021 · 1 comment · Fixed by #37720
Assignees
Labels
bug Team:Integrations Label for the Integrations team

Comments

@fkalinowski
Copy link

  1. in Metricbeat: enable PostgreSQL module
  2. in PostgreSQL: enable track_io_timing via postgresql.conf --> uncomment or add track_io_timing = on
  3. in Metricbeat: connect the Metricbeat instance with PostgreSQL module to your PostgreSQL database + enable database metricset
  4. check that fields postgresql.database.blocks.time.read.ms and postgresql.database.blocks.time.write.ms are missing while expected (due to step n°2).
  • Detailed description:

According to beats/metricbeat/module/postgresql/database/data.go, the following fields are mapped as Integer:

	    "blocks": s.Object{
...
		"time": s.Object{
			"read":  s.Object{"ms": c.Int("blk_read_time")},
			"write": s.Object{"ms": c.Int("blk_write_time")},
		},
...

But according to the official PostgreSQL documentation, theses columns are double precision - see PostgreSQL: Documentation: 9.2: The Statistics Collector

Due to this wrong mapping, once the "track_io_timing" feature is enabled at PostgreSQL side then the fields postgresql.database.blocks.time.read.ms and postgresql.database.blocks.time.write.ms are always missing (more than probably due to an error while mapping).

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 26, 2021
@jsoriano jsoriano added bug Team:Integrations Label for the Integrations team labels Apr 26, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:Integrations Label for the Integrations team
Projects
None yet
5 participants