MetricBeat statements metricset


(zinefer) #1

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?


(Pier-Hugues Pellerin) #2

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


(zinefer) #3

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

(Pier-Hugues Pellerin) #4

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:


(zinefer) #5

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.


(Pier-Hugues Pellerin) #6

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


(system) #7

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