netdata-cloud icon indicating copy to clipboard operation
netdata-cloud copied to clipboard

[Bug]: Outdated Troubleshooting Documentation for 'postgres_db_transactions_rollback_ratio' Metric

Open GGontijo opened this issue 1 year ago • 0 comments

Bug description

Hi there!

I noticed that the troubleshooting documentation for the postgres_db_transactions_rollback_ratio metric seems to be outdated. In particular, the total_time field in the query should be updated to use (total_plan_time + total_exec_time) AS total_time. I found a similar issue in prometheus-community/postgres_exporter#541, which helped point me to the solution, but it's not an official fix related to PostgreSQL or the exporter itself.

I'm opening this as a bug because I couldn't find a dedicated section for documentation-related issues, nor did I see where I could contribute directly to update it. I just want to help improve the documentation and make sure it's accurate for everyone.

Thanks for all your hard work on Netdata! Let me know if I can assist further.

Best regards!

Expected behavior

The troubleshooting documentation for the postgres_db_transactions_rollback_ratio metric should provide the correct query. Instead of using the current total_time field, it should be updated to use (total_plan_time + total_exec_time) AS total_time.

Steps to reproduce

Ensure that the pg_stat_statements extension is installed and activated in PostgreSQL, using version 1.10. The PostgreSQL version in use is 16.2.

Use the provided query in the troubleshooting documentation for the postgres_db_transactions_rollback_ratio metric. Observe that the query still uses total_time instead of the recommended calculation (total_plan_time + total_exec_time).

Screenshots

Uploading Netdata Console - Google Chrome.jpg…

Error Logs

Uploading image.png…

Desktop

OS: Debian 12.2.0-14 Browser: Chrome Browser Version: 129

Additional context

No response

GGontijo avatar Oct 01 '24 14:10 GGontijo