bundles/grafana: add "traffic per interface" graphs, fix naming of values
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
0f387102b3
commit
fe668fd5d4
4 changed files with 616 additions and 292 deletions
|
@ -23,6 +23,11 @@ def dashboard_row_postgresql(panel_id, node):
|
|||
r["_field"] == "xact_{measurement}" and
|
||||
r["host"] == "{node.name}"
|
||||
)
|
||||
|> map(fn: (r) => ({{
|
||||
r with
|
||||
_field: "{measurement}"
|
||||
}})
|
||||
)
|
||||
|> derivative(unit: 1s)
|
||||
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|
||||
|> yield(name: "{measurement}")""",
|
||||
|
@ -55,6 +60,11 @@ def dashboard_row_postgresql(panel_id, node):
|
|||
r["_field"] == "tup_{measurement}" and
|
||||
r["host"] == "{node.name}"
|
||||
)
|
||||
|> map(fn: (r) => ({{
|
||||
r with
|
||||
_field: "{measurement}"
|
||||
}})
|
||||
)
|
||||
|> derivative(unit: 1s)
|
||||
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|
||||
|> yield(name: "{measurement}")""",
|
||||
|
@ -113,6 +123,11 @@ def dashboard_row_postgresql(panel_id, node):
|
|||
r["_field"] == "blks_{measurement}" and
|
||||
r["host"] == "{node.name}"
|
||||
)
|
||||
|> map(fn: (r) => ({{
|
||||
r with
|
||||
_field: "{measurement}"
|
||||
}})
|
||||
)
|
||||
|> derivative(unit: 1s)
|
||||
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|
||||
|> yield(name: "{measurement}")""",
|
||||
|
@ -124,13 +139,13 @@ def dashboard_row_postgresql(panel_id, node):
|
|||
"tags": []
|
||||
})
|
||||
|
||||
for measurement in [
|
||||
'alloc',
|
||||
'backend',
|
||||
'backend_fsync',
|
||||
'checkpoint',
|
||||
'clean'
|
||||
]:
|
||||
for measurement, alias in {
|
||||
'alloc': 'allocated',
|
||||
'backend': 'written by backend',
|
||||
'backend_fsync': 'fsync by backend',
|
||||
'checkpoint': 'written during checkpoints',
|
||||
'clean': 'written by background writer',
|
||||
}.items():
|
||||
queries_buffers.append({
|
||||
'groupBy': [
|
||||
{'type': 'time', 'params': ['$__interval']},
|
||||
|
@ -145,6 +160,11 @@ def dashboard_row_postgresql(panel_id, node):
|
|||
r["_field"] == "buffers_{measurement}" and
|
||||
r["host"] == "{node.name}"
|
||||
)
|
||||
|> map(fn: (r) => ({{
|
||||
r with
|
||||
_field: "{alias}"
|
||||
}})
|
||||
)
|
||||
|> derivative(unit: 1s)
|
||||
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|
||||
|> yield(name: "{measurement}")""",
|
||||
|
@ -160,7 +180,7 @@ def dashboard_row_postgresql(panel_id, node):
|
|||
'title': 'postgresql',
|
||||
'collapse': False,
|
||||
'editable': False,
|
||||
'height': '250px',
|
||||
'height': '200px',
|
||||
'panels': [
|
||||
{
|
||||
'aliasColors': {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue