Skip to content
daamien edited this page Dec 13, 2012 · 5 revisions

HTML5 Overhaul

Current Report Design

Check out a sample report here : http://nawak.taadeem.net/out.html

As of version 2.2, pgBadger reports are not structured. The information is displayed inline.

The reports contain a list of "items". An item can be a list, a table, a graph or both.

We have currently 24 items :

  1. About (list)
  • Overall statistics (list)
  • Hourly statistics (table)
  • Queries by seconds (graph)
  • Connections by seconds (graph)
  • All queries (graph)
  • SELECT queries (graph)
  • Write queries (graph)
  • Checkpoints (table)
  • Checkpoints write buffers (graph)
  • Checkpoints wal files usage (graph)
  • Queries by type (table + graph)
  • Sessions per database (table + graph)
  • Sessions per user (table + graph)
  • Sessions per host (table + graph)
  • Connections per database (table + graph)
  • Connections per user (table + graph)
  • Connections per host (table + graph)
  • Slowest Queries (table)
  • Queries that took up the most time / Normalized (table)
  • Most frequent queries / Normalized (table)
  • Slowest queries / Normalized (table)
  • Most frequent events (table)
  • Logs per type (table + graph)

New Design

Sections

We need to dispatch the blocks in 6 sections.

A. Overview

  • 01 About (list)
  • 02 Overall statistics
  • 04 Queries per second
  • 03 Hourly statistics

B. Connections

  • 05 Connections per second
  • 16 Connections per database
  • 17 Connections per user
  • 18 Connections per host

C. Sessions

  • 13 Sessions per database
  • 14 Sessions per user
  • 15 Sessions per host

D. Queries

  • 06 All Queries
  • 07 SELECT Queries
  • 08 Write Queries
  • 12 Queries by type
  • 19 Slowest queries
  • 20 Queries that took up the most time
  • 21 Most frequent queries
  • 22 Normalized Slowest queries

E. Events

  • 23 Most frequent errors/events
  • 24 Logs per type

F. Checkpoints

  • 10 Checkpoints write buffers (graph)
  • 11 Checkpoints wal files usage (graph)
  • 09 Checkpoints (tables)

(G. Temp Files ?)

Key Values

For each item key values must be emphasized. This is a number that aggregates information from an item. For exemple : a percentage, a max value or an average.

There may be several key values for one item : the most important is call "First Key Value", the next one is called "Second Key Value", etc.

Tables

Tables contain too many information. They should be fully displayed only if the readers ask for it.

For example, we could display only the first 10 lines of a table and let readers expand the table if needed.

Items

01 About

  • current name : NONE
  • new name : About
  • First Key Value : "FROM 2012-12-11 11:00:00"
  • Second Key Value : "TO 2012-12-12 11:00:00"

02 Overall statistics

  • current name : Overall statistics
  • new name : Global stats
  • First Key Value : "14 499 queries"
  • Second Key Value : "in 4h56m"

03 Hourly statistics

  • current name : Hourly statistics
  • new name : General Activity

04 Queries per second

  • current name : Queries per second
  • new name : SQL Traffic
  • First Key Value : "Query Peak : 111 queries/s"

05 Connections per second

  • current name : Connections per second
  • new name : Simultaneous connections
  • First Key Value : "Connection Peak : 200 connections"
  • Second Key Value : "Date : 2012-12-11 11:00:00"

06 All Queries

TODO

07 SELECT Queries

  • current name : SELECT Queries
  • new name : SELECT
  • First Key Value : "Peak : 1500 SELECT queries"
  • Second Key Value : "Date : 2012-12-11 11:00:00"

08 Write Queries

  • current name : Write Queries
  • new name : INSERT / UPDATE / DELETE
  • First Key Value : "Peak : 2000 UPDATE queries"
  • Second Key Value : "Date : 2012-12-11 11:00:00"

09 Checkpoints

  • current name : NONE
  • new name : Checkpoint Activity

10 Checkpoints write buffers

  • First Key Value : "Peak : 2400 buffers"
  • Second Key Value : "Date : 2012-12-11 11:00:00"

11 Checkpoints WAL files usage

  • First Key Value : "Peak : 2400 recycled WAL files"
  • Second Key Value : "Date : 2012-12-11 11:00:00"

12 Queries by type

  • First Key Value : "SELECT : 48%"

13 Sessions per database

  • First Key Value : "Most Popular db : foo"
  • Second Key Value : "Total duration : 281 days 18 hours 8 min"

14 Sessions per user

  • First Key Value : "Main user : bar"
  • Second Key Value : "Total duration : 281 days 18 hours 8 min"

15 Sessions per host

  • First Key Value : "Main host : 10.0.0.42"
  • Second Key Value : "Total duration : 281 days 18 hours 8 min"

16 Connections per database

  • First Key Value : "Most Popular db : foo"
  • Second Key Value : "135 456 connections"

17 Connections per user

  • First Key Value : "Main user : bar"
  • Second Key Value : "Total : 4 019 132 connections"

18 Connections per host

  • First Key Value : "Main host : 10.0.0.42"
  • Second Key Value : "Total : 4 019 132 connections "

19 Slowest queries

  • new name : Slowest individual query
  • First Key Value : "Slowest Query : 33 min 17s"
  • Second Key Value : "Average : 2 min 10s"

20 Queries that took up the most time

  • new name : Time Consuming queries
  • First Key Value : "Most consuming query : 1 h 34 min 10 s"
  • Second Key Value : "times executed : 45"

21 Most frequent queries

  • First Key Value : "Most frequent query : 3 689 times"
  • Second Key Value : "total duration : 1 h 10 min 47 s"

22 Normalized Slowest queries

  • new name : TODO
  • First Key Value : "Slowest Query : 33 min 17s"
  • Second Key Value : "times executed : 45"

23 Most frequent errors/events

  • First Key Value : "The same error was reported 700 times"
  • Second Key Value : "total errors found : 2 500"

24 Logs per type

  • new name : log levels
  • First Key Value : " 5 745 WARNING messages"
  • Second Key Value : "among 10 256 messages"