|
119 | 119 | "policy": "default", |
120 | 120 | "query": "", |
121 | 121 | "rawQuery": true, |
122 | | - "rawSql": "select\n $__timeGroup(time, $__interval),\n avg((c - c_lag) / extract(epoch from time - time_lag)) as tps\nfrom (\n select \n (data->>'total_xact_count')::int8 as c, lag((data->>'total_xact_count')::int8) over w as c_lag,\n time, lag(time) over w as time_lag\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1\norder by 1", |
| 122 | + "rawSql": "select\n $__timeGroup(time, $__interval),\n avg((c - c_lag) / extract(epoch from time - time_lag)) as tps\nfrom (\n select \n (data->>'total_xact_count')::int8 as c, lag((data->>'total_xact_count')::int8) over w as c_lag,\n time, lag(time) over w as time_lag\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1\norder by 1", |
123 | 123 | "refId": "A", |
124 | 124 | "resultFormat": "time_series", |
125 | 125 | "select": [ |
|
261 | 261 | "policy": "default", |
262 | 262 | "query": "", |
263 | 263 | "rawQuery": true, |
264 | | - "rawSql": "select\n $__timeGroup(time, $__interval),\n avg((c - c_lag) / extract(epoch from time - time_lag)) as tps\nfrom (\n select \n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time, lag(time) over w as time_lag\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1\norder by 1", |
| 264 | + "rawSql": "select\n $__timeGroup(time, $__interval),\n avg((c - c_lag) / extract(epoch from time - time_lag)) as tps\nfrom (\n select \n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time, lag(time) over w as time_lag\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1\norder by 1", |
265 | 265 | "refId": "A", |
266 | 266 | "resultFormat": "time_series", |
267 | 267 | "select": [ |
|
401 | 401 | "orderByTime": "ASC", |
402 | 402 | "policy": "default", |
403 | 403 | "rawQuery": true, |
404 | | - "rawSql": "select\n$__timeGroup(time, $__interval),\navg((tt-tt_lag)::numeric / (c-c_lag))\n\nfrom (\n\n select \n (data->>'total_query_time')::float8 as tt, lag((data->>'total_query_time')::float8) over w as tt_lag,\n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time)\n) x\nwhere c > c_lag and tt >= tt_lag\ngroup by 1\norder by 1", |
| 404 | + "rawSql": "select\n$__timeGroup(time, $__interval),\navg((tt-tt_lag)::numeric / (c-c_lag))\n\nfrom (\n\n select \n (data->>'total_query_time')::float8 as tt, lag((data->>'total_query_time')::float8) over w as tt_lag,\n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time)\n) x\nwhere c > c_lag and tt >= tt_lag\ngroup by 1\norder by 1", |
405 | 405 | "refId": "A", |
406 | 406 | "resultFormat": "time_series", |
407 | 407 | "select": [ |
|
530 | 530 | "orderByTime": "ASC", |
531 | 531 | "policy": "default", |
532 | 532 | "rawQuery": true, |
533 | | - "rawSql": "select\n$__timeGroup(time, $__interval),\navg((tt-tt_lag)::numeric / (c-c_lag))\n\nfrom (\n\n select \n (data->>'total_wait_time')::float8 as tt, lag((data->>'total_wait_time')::float8) over w as tt_lag,\n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time)\n) x\nwhere c > c_lag and tt >= tt_lag\ngroup by 1\norder by 1", |
| 533 | + "rawSql": "select\n$__timeGroup(time, $__interval),\navg((tt-tt_lag)::numeric / (c-c_lag))\n\nfrom (\n\n select \n (data->>'total_wait_time')::float8 as tt, lag((data->>'total_wait_time')::float8) over w as tt_lag,\n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time)\n) x\nwhere c > c_lag and tt >= tt_lag\ngroup by 1\norder by 1", |
534 | 534 | "refId": "A", |
535 | 535 | "resultFormat": "time_series", |
536 | 536 | "select": [ |
|
671 | 671 | "orderByTime": "ASC", |
672 | 672 | "policy": "default", |
673 | 673 | "rawQuery": true, |
674 | | - "rawSql": "select\n $__timeGroup(time, $__interval),\n avg((c - c_lag) / extract(epoch from time - time_lag)) as tps\nfrom (\n select \n (data->>'total_received')::int8 as c, lag((data->>'total_received')::int8) over w as c_lag,\n time, lag(time) over w as time_lag\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1\norder by 1", |
| 674 | + "rawSql": "select\n $__timeGroup(time, $__interval),\n avg((c - c_lag) / extract(epoch from time - time_lag)) as tps\nfrom (\n select \n (data->>'total_received')::int8 as c, lag((data->>'total_received')::int8) over w as c_lag,\n time, lag(time) over w as time_lag\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1\norder by 1", |
675 | 675 | "refId": "A", |
676 | 676 | "resultFormat": "time_series", |
677 | 677 | "select": [ |
|
811 | 811 | "orderByTime": "ASC", |
812 | 812 | "policy": "default", |
813 | 813 | "rawQuery": true, |
814 | | - "rawSql": "select\n $__timeGroup(time, $__interval),\n avg((c - c_lag) / extract(epoch from time - time_lag)) as tps\nfrom (\n select \n (data->>'total_sent')::int8 as c, lag((data->>'total_sent')::int8) over w as c_lag,\n time, lag(time) over w as time_lag\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1\norder by 1", |
| 814 | + "rawSql": "select\n $__timeGroup(time, $__interval),\n avg((c - c_lag) / extract(epoch from time - time_lag)) as tps\nfrom (\n select \n (data->>'total_sent')::int8 as c, lag((data->>'total_sent')::int8) over w as c_lag,\n time, lag(time) over w as time_lag\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1\norder by 1", |
815 | 815 | "refId": "A", |
816 | 816 | "resultFormat": "time_series", |
817 | 817 | "select": [ |
|
985 | 985 | "orderByTime": "ASC", |
986 | 986 | "policy": "default", |
987 | 987 | "rawQuery": true, |
988 | | - "rawSql": "select\n $__timeGroup(time, $__interval), \n database,\n avg((c - c_lag) / extract(epoch from time - time_lag)) as \"TPS\"\nfrom (\n select \n (data->>'total_xact_count')::int8 as c, lag((data->>'total_xact_count')::int8) over w as c_lag,\n time, lag(time) over w as time_lag, data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1, 2\norder by 1", |
| 988 | + "rawSql": "select\n $__timeGroup(time, $__interval), \n database,\n avg((c - c_lag) / extract(epoch from time - time_lag)) as \"TPS\"\nfrom (\n select \n (data->>'total_xact_count')::int8 as c, lag((data->>'total_xact_count')::int8) over w as c_lag,\n time, lag(time) over w as time_lag, data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1, 2\norder by 1", |
989 | 989 | "refId": "A", |
990 | 990 | "resultFormat": "time_series", |
991 | 991 | "select": [ |
|
1190 | 1190 | "orderByTime": "ASC", |
1191 | 1191 | "policy": "default", |
1192 | 1192 | "rawQuery": true, |
1193 | | - "rawSql": "select\n$__timeGroup(time, $__interval),\ndatabase,\navg((tt-tt_lag)::numeric / (c-c_lag)) as \"Pool wait time\"\n\nfrom (\n\n select \n (data->>'total_wait_time')::float8 as tt, lag((data->>'total_wait_time')::float8) over w as tt_lag,\n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time, data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time)\n) x\nwhere c > c_lag and tt >= tt_lag\ngroup by 1, 2\norder by 1", |
| 1193 | + "rawSql": "select\n$__timeGroup(time, $__interval),\ndatabase,\navg((tt-tt_lag)::numeric / (c-c_lag)) as \"Pool wait time\"\n\nfrom (\n\n select \n (data->>'total_wait_time')::float8 as tt, lag((data->>'total_wait_time')::float8) over w as tt_lag,\n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time, data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time)\n) x\nwhere c > c_lag and tt >= tt_lag\ngroup by 1, 2\norder by 1", |
1194 | 1194 | "refId": "A", |
1195 | 1195 | "resultFormat": "time_series", |
1196 | 1196 | "select": [ |
|
1412 | 1412 | "orderByTime": "ASC", |
1413 | 1413 | "policy": "default", |
1414 | 1414 | "rawQuery": true, |
1415 | | - "rawSql": "select\n $__timeGroup(time, $__interval),\n database,\n avg((c - c_lag) / extract(epoch from time - time_lag)) as \"QPS\"\nfrom (\n select \n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time, lag(time) over w as time_lag, data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1, 2\norder by 1", |
| 1415 | + "rawSql": "select\n $__timeGroup(time, $__interval),\n database,\n avg((c - c_lag) / extract(epoch from time - time_lag)) as \"QPS\"\nfrom (\n select \n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time, lag(time) over w as time_lag, data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1, 2\norder by 1", |
1416 | 1416 | "refId": "A", |
1417 | 1417 | "resultFormat": "time_series", |
1418 | 1418 | "select": [ |
|
1639 | 1639 | "orderByTime": "ASC", |
1640 | 1640 | "policy": "default", |
1641 | 1641 | "rawQuery": true, |
1642 | | - "rawSql": "select\n $__timeGroup(time, $__interval),\n database,\n avg((c - c_lag) / extract(epoch from time - time_lag)) as \"Incoming rate\"\nfrom (\n select \n (data->>'total_received')::int8 as c, lag((data->>'total_received')::int8) over w as c_lag,\n time, lag(time) over w as time_lag, data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1, 2\norder by 1", |
| 1642 | + "rawSql": "select\n $__timeGroup(time, $__interval),\n database,\n avg((c - c_lag) / extract(epoch from time - time_lag)) as \"Incoming rate\"\nfrom (\n select \n (data->>'total_received')::int8 as c, lag((data->>'total_received')::int8) over w as c_lag,\n time, lag(time) over w as time_lag, data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1, 2\norder by 1", |
1643 | 1643 | "refId": "A", |
1644 | 1644 | "resultFormat": "time_series", |
1645 | 1645 | "select": [ |
|
1822 | 1822 | "orderByTime": "ASC", |
1823 | 1823 | "policy": "default", |
1824 | 1824 | "rawQuery": true, |
1825 | | - "rawSql": "select\n$__timeGroup(time, $__interval),\ndatabase,\navg((tt-tt_lag)::numeric / (c-c_lag)) as \"Avg. runtime\"\nfrom (\n\n select \n (data->>'total_query_time')::float8 as tt, lag((data->>'total_query_time')::float8) over w as tt_lag,\n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time,\n data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time)\n) x\nwhere c > c_lag and tt >= tt_lag\ngroup by 1, 2\norder by 1", |
| 1825 | + "rawSql": "select\n$__timeGroup(time, $__interval),\ndatabase,\navg((tt-tt_lag)::numeric / (c-c_lag)) as \"Avg. runtime\"\nfrom (\n\n select \n (data->>'total_query_time')::float8 as tt, lag((data->>'total_query_time')::float8) over w as tt_lag,\n (data->>'total_query_count')::int8 as c, lag((data->>'total_query_count')::int8) over w as c_lag,\n time,\n data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time)\n) x\nwhere c > c_lag and tt >= tt_lag\ngroup by 1, 2\norder by 1", |
1826 | 1826 | "refId": "A", |
1827 | 1827 | "resultFormat": "time_series", |
1828 | 1828 | "select": [ |
|
2030 | 2030 | "orderByTime": "ASC", |
2031 | 2031 | "policy": "default", |
2032 | 2032 | "rawQuery": true, |
2033 | | - "rawSql": "select\n $__timeGroup(time, $__interval),\n database,\n avg((c - c_lag) / extract(epoch from time - time_lag)) as \"Outgoing rate\"\nfrom (\n select \n (data->>'total_sent')::int8 as c, lag((data->>'total_sent')::int8) over w as c_lag,\n time, lag(time) over w as time_lag, data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in ($databases) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1, 2\norder by 1", |
| 2033 | + "rawSql": "select\n $__timeGroup(time, $__interval),\n database,\n avg((c - c_lag) / extract(epoch from time - time_lag)) as \"Outgoing rate\"\nfrom (\n select \n (data->>'total_sent')::int8 as c, lag((data->>'total_sent')::int8) over w as c_lag,\n time, lag(time) over w as time_lag, data->>'database' as database\n from pgbouncer_stats\n where data->>'database' in (${databases:sqlstring}) and dbname = '$monitoredsource' and $__timeFilter(time)\n window w as (order by data->>'database', time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1, 2\norder by 1", |
2034 | 2034 | "refId": "A", |
2035 | 2035 | "resultFormat": "time_series", |
2036 | 2036 | "select": [ |
|
0 commit comments