Hi everybody,
Have anyone good solution to monitor avg query runtime (or the same query on each database to compare it) on each postgres databases?
At this moment to monitor postgres I use check_postgres but i can't find solution for this.
Regards,
Edward
Monitoring postgres on linux
Re: Monitoring postgres on linux
You will most likely need to write a wrapper script to run multiple queries (and maybe even bash time the query) and then compare the results.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Monitoring postgres on linux
Ok it's good idea but it takes me to much time I need something quite simple. Check_postgres plugin have a few actions with queries but I don't know how to use it right.
For example when i use query_time on 30GB postgres db i get output: POSTGRES_QUERY_TIME CRITICAL: (host IP) longest query: 52533s
Why this action give me information about the longest query?
It's possible to run action: query_runtime which some standard query for postgres. Standard query because i want have some output to compare a few databases.
Thanks for any idea:)
Regards,
Edward
For example when i use query_time on 30GB postgres db i get output: POSTGRES_QUERY_TIME CRITICAL: (host IP) longest query: 52533s
Why this action give me information about the longest query?
It's possible to run action: query_runtime which some standard query for postgres. Standard query because i want have some output to compare a few databases.
Thanks for any idea:)
Regards,
Edward
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Monitoring postgres on linux
You should be able to run the plugin and pass it a -h flag to see the usage/help output, this may help you sculpt a proper check command:
Code: Select all
/path/to/plugin/check_postgres -h