MetricBeat statements metricset

Is there any reason there is no metricset that relates to pg_stat_statements?

I've never done GO but I looked at, for example, the activity metricset and I think I might be able to make one for pg_stat_statements. Would there be any interest in something like that?

Hello @zinefer, it's been a long time since I've used PostgreSQL, but aren't these stats provided by the database metricset?

I think there is some overlap, but pg_stat_statements gives much more detailed information. For example, with pg_stat_statements I can:

  • Calculate a Query Per Second
  • Identify Long running Queries
  • Calculate cpu usage per query
  • Count unique queries
  • Get blk data per query

Seems like a nice improvements, I think you should create an issue on the official beats repository to discuss it with us, nothing stop you for creating a PR too :slight_smile:

Thank you!

I've taken the first step of creating an issue here: https://github.com/elastic/beats/issues/7048

I will continue to look into making the necessary changes for a pull request.

If you have any problem problem with configuring your environment don't hesitate to create a post in discuss.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.