Convert to timeseries from old graph

This commit is contained in:
Vitaly Zhuravlev 2022-05-11 16:40:39 +04:00
parent fcb39cfa04
commit b00cf5bf48

View file

@ -216,50 +216,36 @@ local graphPanel = grafana.graphPanel;
timeShift: null, timeShift: null,
}, },
{ {
aliasColors: {}, id: 3,
bars: false,
dashLength: 10,
dashes: false,
datasource: {
uid: '${datasource}',
},
decimals: 2,
fill: 1,
fillGradient: 0,
gridPos: { gridPos: {
h: 10, h: 10,
w: 12, w: 12,
x: 0, x: 0,
y: 3, y: 3,
}, },
hiddenSeries: false, type: 'timeseries',
id: 3, title: 'Bytes sent',
legend: { datasource: {
alignAsTable: true, uid: '${datasource}',
avg: true,
current: true,
max: true,
min: true,
show: true,
total: false,
values: true,
}, },
lines: true,
linewidth: 1,
links: [],
nullPointMode: 'null',
options: {
alertThreshold: true,
},
percentage: false,
pluginVersion: '8.4.5', pluginVersion: '8.4.5',
pointradius: 5, links: [],
points: false, options: {
renderer: 'flot', tooltip: {
seriesOverrides: [], mode: 'multi',
spaceLength: 10, sort: 'none',
stack: false, },
steppedLine: false, legend: {
displayMode: 'table',
placement: 'bottom',
calcs: [
'mean',
'lastNotNull',
'max',
'min',
],
},
},
targets: [ targets: [
{ {
expr: 'rate(apache_sent_kilobytes_total{instance=~"$instance"}[$__rate_interval]) * 1000', expr: 'rate(apache_sent_kilobytes_total{instance=~"$instance"}[$__rate_interval]) * 1000',
@ -270,81 +256,91 @@ local graphPanel = grafana.graphPanel;
step: 240, step: 240,
}, },
], ],
thresholds: [], fieldConfig: {
timeRegions: [], defaults: {
title: 'Bytes sent', custom: {
tooltip: { drawStyle: 'line',
shared: true, lineInterpolation: 'linear',
sort: 0, barAlignment: 0,
value_type: 'individual', lineWidth: 1,
fillOpacity: 10,
gradientMode: 'none',
spanNulls: true,
showPoints: 'never',
pointSize: 5,
stacking: {
mode: 'none',
group: 'A',
}, },
type: 'graph', axisPlacement: 'auto',
xaxis: { axisLabel: '',
mode: 'time', scaleDistribution: {
show: true, type: 'linear',
values: [],
}, },
yaxes: [ hideFrom: {
tooltip: false,
viz: false,
legend: false,
},
thresholdsStyle: {
mode: 'off',
},
},
color: {
mode: 'palette-classic',
},
mappings: [],
thresholds: {
mode: 'absolute',
steps: [
{ {
format: 'Bps', value: null,
logBase: 1, color: 'green',
show: true,
}, },
{ {
format: 'short', value: 80,
logBase: 1, color: 'red',
show: false,
}, },
], ],
yaxis: {
align: false,
}, },
unit: 'Bps',
},
overrides: [],
},
timeFrom: null,
timeShift: null,
}, },
{ {
aliasColors: {}, id: 5,
bars: false,
dashLength: 10,
dashes: false,
datasource: {
uid: '${datasource}',
},
decimals: 2,
fill: 1,
fillGradient: 0,
gridPos: { gridPos: {
h: 10, h: 10,
w: 12, w: 12,
x: 12, x: 12,
y: 3, y: 3,
}, },
hiddenSeries: false, type: 'timeseries',
id: 1, title: 'Apache accesses',
legend: { datasource: {
alignAsTable: true, uid: '${datasource}',
avg: true,
current: true,
max: true,
min: true,
show: true,
total: false,
values: true,
}, },
lines: true,
linewidth: 1,
links: [],
nullPointMode: 'null',
options: {
alertThreshold: true,
},
percentage: false,
pluginVersion: '8.4.5', pluginVersion: '8.4.5',
pointradius: 5, links: [],
points: false, options: {
renderer: 'flot', tooltip: {
seriesOverrides: [], mode: 'multi',
spaceLength: 10, sort: 'none',
stack: false, },
steppedLine: false, legend: {
displayMode: 'table',
placement: 'bottom',
calcs: [
'mean',
'lastNotNull',
'max',
'min',
],
},
},
targets: [ targets: [
{ {
expr: 'rate(apache_accesses_total{instance=~"$instance"}[$__rate_interval])', expr: 'rate(apache_accesses_total{instance=~"$instance"}[$__rate_interval])',
@ -355,82 +351,93 @@ local graphPanel = grafana.graphPanel;
step: 240, step: 240,
}, },
], ],
thresholds: [], fieldConfig: {
timeRegions: [], defaults: {
title: 'Apache accesses', custom: {
tooltip: { drawStyle: 'line',
shared: true, lineInterpolation: 'linear',
sort: 0, barAlignment: 0,
value_type: 'individual', lineWidth: 1,
fillOpacity: 10,
gradientMode: 'none',
spanNulls: true,
showPoints: 'never',
pointSize: 5,
stacking: {
mode: 'none',
group: 'A',
}, },
type: 'graph', axisPlacement: 'auto',
xaxis: { axisLabel: '',
mode: 'time', scaleDistribution: {
show: true, type: 'linear',
values: [],
}, },
yaxes: [ hideFrom: {
tooltip: false,
viz: false,
legend: false,
},
thresholdsStyle: {
mode: 'off',
},
},
color: {
mode: 'palette-classic',
},
mappings: [],
thresholds: {
mode: 'absolute',
steps: [
{ {
format: 'reqps', value: null,
logBase: 1, color: 'green',
show: true,
}, },
{ {
format: 'short', value: 80,
logBase: 1, color: 'red',
show: false,
}, },
], ],
yaxis: {
align: false,
}, },
unit: 'reqps',
},
overrides: [],
},
timeFrom: null,
timeShift: null,
}, },
{ {
aliasColors: {}, id: 2,
bars: false,
dashLength: 10,
dashes: false,
datasource: {
uid: '${datasource}',
},
decimals: 2,
fill: 1,
fillGradient: 0,
gridPos: { gridPos: {
h: 10, h: 10,
w: 24, w: 24,
x: 0, x: 0,
y: 13, y: 13,
}, },
hiddenSeries: false, type: 'timeseries',
id: 2, title: 'Apache scoreboard statuses',
legend: { datasource: {
alignAsTable: true, uid: '${datasource}',
avg: true,
current: true,
max: true,
min: true,
rightSide: true,
show: true,
total: false,
values: true,
}, },
lines: true,
linewidth: 1,
links: [],
nullPointMode: 'null',
options: {
alertThreshold: true,
},
percentage: false,
pluginVersion: '8.4.5', pluginVersion: '8.4.5',
pointradius: 5, links: [],
points: false, options: {
renderer: 'flot', tooltip: {
seriesOverrides: [], mode: 'multi',
spaceLength: 10, sort: 'desc',
stack: true, },
steppedLine: false, legend: {
displayMode: 'table',
placement: 'right',
calcs: [
'mean',
'lastNotNull',
'max',
'min',
],
sortBy: 'Last *',
sortDesc: true,
},
},
targets: [ targets: [
{ {
expr: 'apache_scoreboard{instance=~"$instance"}', expr: 'apache_scoreboard{instance=~"$instance"}',
@ -441,81 +448,91 @@ local graphPanel = grafana.graphPanel;
step: 240, step: 240,
}, },
], ],
thresholds: [], fieldConfig: {
timeRegions: [], defaults: {
title: 'Apache scoreboard statuses', custom: {
tooltip: { drawStyle: 'line',
shared: true, lineInterpolation: 'linear',
sort: 0, barAlignment: 0,
value_type: 'individual', lineWidth: 1,
fillOpacity: 10,
gradientMode: 'none',
spanNulls: true,
showPoints: 'never',
pointSize: 5,
stacking: {
mode: 'normal',
group: 'A',
}, },
type: 'graph', axisPlacement: 'auto',
xaxis: { axisLabel: '',
mode: 'time', scaleDistribution: {
show: true, type: 'linear',
values: [],
}, },
yaxes: [ hideFrom: {
tooltip: false,
viz: false,
legend: false,
},
thresholdsStyle: {
mode: 'off',
},
},
color: {
mode: 'palette-classic',
},
mappings: [],
thresholds: {
mode: 'absolute',
steps: [
{ {
format: 'short', value: null,
logBase: 1, color: 'green',
show: true,
}, },
{ {
format: 'short', value: 80,
logBase: 1, color: 'red',
show: false,
}, },
], ],
yaxis: {
align: false,
}, },
unit: 'short',
},
overrides: [],
},
timeFrom: null,
timeShift: null,
}, },
{ {
aliasColors: {}, id: 7,
bars: false,
dashLength: 10,
dashes: false,
datasource: {
uid: '${datasource}',
},
decimals: 2,
fill: 1,
fillGradient: 0,
gridPos: { gridPos: {
h: 10, h: 10,
w: 12, w: 12,
x: 0, x: 0,
y: 23, y: 23,
}, },
hiddenSeries: false, type: 'timeseries',
id: 7, title: 'Apache worker statuses',
legend: { datasource: {
alignAsTable: true, uid: '${datasource}',
avg: true,
current: true,
max: true,
min: true,
show: true,
total: false,
values: true,
}, },
lines: true,
linewidth: 1,
links: [],
nullPointMode: 'null',
options: {
alertThreshold: true,
},
percentage: false,
pluginVersion: '8.4.5', pluginVersion: '8.4.5',
pointradius: 5, links: [],
points: false, options: {
renderer: 'flot', tooltip: {
seriesOverrides: [], mode: 'multi',
spaceLength: 10, sort: 'none',
stack: true, },
steppedLine: false, legend: {
displayMode: 'table',
placement: 'bottom',
calcs: [
'mean',
'lastNotNull',
'max',
'min',
],
},
},
targets: [ targets: [
{ {
expr: 'apache_workers{instance=~"$instance"}\n', expr: 'apache_workers{instance=~"$instance"}\n',
@ -526,81 +543,91 @@ local graphPanel = grafana.graphPanel;
step: 240, step: 240,
}, },
], ],
thresholds: [], fieldConfig: {
timeRegions: [], defaults: {
title: 'Apache worker statuses', custom: {
tooltip: { drawStyle: 'line',
shared: true, lineInterpolation: 'linear',
sort: 0, barAlignment: 0,
value_type: 'individual', lineWidth: 1,
fillOpacity: 10,
gradientMode: 'none',
spanNulls: true,
showPoints: 'never',
pointSize: 5,
stacking: {
mode: 'normal',
group: 'A',
}, },
type: 'graph', axisPlacement: 'auto',
xaxis: { axisLabel: '',
mode: 'time', scaleDistribution: {
show: true, type: 'linear',
values: [],
}, },
yaxes: [ hideFrom: {
tooltip: false,
viz: false,
legend: false,
},
thresholdsStyle: {
mode: 'off',
},
},
color: {
mode: 'palette-classic',
},
mappings: [],
thresholds: {
mode: 'absolute',
steps: [
{ {
format: 'short', value: null,
logBase: 1, color: 'green',
show: true,
}, },
{ {
format: 'short', value: 80,
logBase: 1, color: 'red',
show: false,
}, },
], ],
yaxis: {
align: false,
}, },
unit: 'short',
},
overrides: [],
},
timeFrom: null,
timeShift: null,
}, },
{ {
aliasColors: {}, id: 8,
bars: false,
dashLength: 10,
dashes: false,
datasource: {
uid: '${datasource}',
},
decimals: 2,
fill: 1,
fillGradient: 0,
gridPos: { gridPos: {
h: 10, h: 10,
w: 12, w: 12,
x: 12, x: 12,
y: 23, y: 23,
}, },
hiddenSeries: false, type: 'timeseries',
id: 4, title: 'Apache CPU load',
legend: { datasource: {
alignAsTable: true, uid: '${datasource}',
avg: true,
current: true,
max: true,
min: true,
show: true,
total: false,
values: true,
}, },
lines: true,
linewidth: 1,
links: [],
nullPointMode: 'null',
options: {
alertThreshold: true,
},
percentage: false,
pluginVersion: '8.4.5', pluginVersion: '8.4.5',
pointradius: 5, links: [],
points: false, options: {
renderer: 'flot', tooltip: {
seriesOverrides: [], mode: 'multi',
spaceLength: 10, sort: 'none',
stack: false, },
steppedLine: false, legend: {
displayMode: 'table',
placement: 'bottom',
calcs: [
'mean',
'lastNotNull',
'max',
'min',
],
},
},
targets: [ targets: [
{ {
expr: 'apache_cpuload{instance=~"$instance"}', expr: 'apache_cpuload{instance=~"$instance"}',
@ -611,36 +638,60 @@ local graphPanel = grafana.graphPanel;
step: 240, step: 240,
}, },
], ],
thresholds: [], fieldConfig: {
timeRegions: [], defaults: {
title: 'Apache CPU load', custom: {
tooltip: { drawStyle: 'line',
shared: true, lineInterpolation: 'linear',
sort: 0, barAlignment: 0,
value_type: 'individual', lineWidth: 1,
fillOpacity: 10,
gradientMode: 'none',
spanNulls: true,
showPoints: 'never',
pointSize: 5,
stacking: {
mode: 'none',
group: 'A',
}, },
type: 'graph', axisPlacement: 'auto',
xaxis: { axisLabel: '',
mode: 'time', scaleDistribution: {
show: true, type: 'linear',
values: [],
}, },
yaxes: [ hideFrom: {
tooltip: false,
viz: false,
legend: false,
},
thresholdsStyle: {
mode: 'off',
},
},
color: {
mode: 'palette-classic',
},
mappings: [],
thresholds: {
mode: 'absolute',
steps: [
{ {
format: 'short', value: null,
logBase: 1, color: 'green',
min: '0',
show: true,
}, },
{ {
format: 'short', value: 80,
logBase: 1, color: 'red',
show: false,
}, },
], ],
yaxis: {
align: false,
}, },
unit: 'short',
min: 0,
},
overrides: [],
},
timeFrom: null,
timeShift: null,
}, },
]), ]),