Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
540d1d9b
Unverified
Commit
540d1d9b
authored
Apr 01, 2020
by
Carl Bergquist
Committed by
GitHub
Apr 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support using multiple datasources for testing bulk alerting. (#23258)
parent
27dc0b0f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
196 additions
and
172 deletions
+196
-172
.gitignore
+2
-0
devenv/bulk_alerting_dashboards/bulkdash_alerting.jsonnet
+0
-169
devenv/bulk_alerting_dashboards/dashboard.libsonnet
+170
-0
devenv/bulk_alerting_dashboards/datasources.jsonnet
+14
-0
devenv/setup.sh
+10
-3
No files found.
.gitignore
View file @
540d1d9b
...
@@ -84,6 +84,8 @@ debug.test
...
@@ -84,6 +84,8 @@ debug.test
/devenv/bulk-dashboards/*.json
/devenv/bulk-dashboards/*.json
/devenv/bulk_alerting_dashboards/*.json
/devenv/bulk_alerting_dashboards/*.json
/devenv/datasources_bulk.yaml
/devenv/bulk_alerting_dashboards/bulk_alerting_datasources.yaml
/scripts/build/release_publisher/release_publisher
/scripts/build/release_publisher/release_publisher
*.patch
*.patch
...
...
devenv/bulk_alerting_dashboards/bulkdash_alerting.jsonnet
deleted
100644 → 0
View file @
27dc0b0f
{
"editable"
:
true
,
"gnetId"
:
null
,
"graphTooltip"
:
0
,
"id"
:
null
,
"links"
:
[],
"panels"
:
[
{
"alert"
:
{
"conditions"
:
[
{
"evaluator"
:
{
"params"
:
[
65
],
"type"
:
"gt"
},
"operator"
:
{
"type"
:
"and"
},
"query"
:
{
"params"
:
[
"A"
,
"5m"
,
"now"
]
},
"reducer"
:
{
"params"
:
[],
"type"
:
"avg"
},
"type"
:
"query"
}
],
"executionErrorState"
:
"alerting"
,
"frequency"
:
"10s"
,
"handler"
:
1
,
"name"
:
"bulk alerting"
,
"noDataState"
:
"no_data"
,
"notifications"
:
[]
},
"aliasColors"
:
{},
"bars"
:
false
,
"dashLength"
:
10
,
"dashes"
:
false
,
"datasource"
:
"gdev-prometheus"
,
"fill"
:
1
,
"gridPos"
:
{
"h"
:
9
,
"w"
:
12
,
"x"
:
0
,
"y"
:
0
},
"id"
:
2
,
"legend"
:
{
"avg"
:
false
,
"current"
:
false
,
"max"
:
false
,
"min"
:
false
,
"show"
:
true
,
"total"
:
false
,
"values"
:
false
},
"lines"
:
true
,
"linewidth"
:
1
,
"nullPointMode"
:
"null"
,
"percentage"
:
false
,
"pointradius"
:
5
,
"points"
:
false
,
"renderer"
:
"flot"
,
"seriesOverrides"
:
[],
"spaceLength"
:
10
,
"stack"
:
false
,
"steppedLine"
:
false
,
"targets"
:
[
{
"$$hashKey"
:
"object:117"
,
"expr"
:
"go_goroutines"
,
"format"
:
"time_series"
,
"intervalFactor"
:
1
,
"refId"
:
"A"
}
],
"thresholds"
:
[
{
"colorMode"
:
"critical"
,
"fill"
:
true
,
"line"
:
true
,
"op"
:
"gt"
,
"value"
:
50
}
],
"timeFrom"
:
null
,
"timeShift"
:
null
,
"title"
:
"Panel Title"
,
"tooltip"
:
{
"shared"
:
true
,
"sort"
:
0
,
"value_type"
:
"individual"
},
"type"
:
"graph"
,
"xaxis"
:
{
"buckets"
:
null
,
"mode"
:
"time"
,
"name"
:
null
,
"show"
:
true
,
"values"
:
[]
},
"yaxes"
:
[
{
"format"
:
"short"
,
"label"
:
null
,
"logBase"
:
1
,
"max"
:
null
,
"min"
:
null
,
"show"
:
true
},
{
"format"
:
"short"
,
"label"
:
null
,
"logBase"
:
1
,
"max"
:
null
,
"min"
:
null
,
"show"
:
true
}
]
}
],
"schemaVersion"
:
16
,
"style"
:
"dark"
,
"tags"
:
[],
"templating"
:
{
"list"
:
[]
},
"time"
:
{
"from"
:
"now-6h"
,
"to"
:
"now"
},
"timepicker"
:
{
"refresh_intervals"
:
[
"5s"
,
"10s"
,
"30s"
,
"1m"
,
"5m"
,
"15m"
,
"30m"
,
"1h"
,
"2h"
,
"1d"
],
"time_options"
:
[
"5m"
,
"15m"
,
"1h"
,
"6h"
,
"12h"
,
"24h"
,
"2d"
,
"7d"
,
"30d"
]
},
"timezone"
:
""
,
"title"
:
"New dashboard"
,
"uid"
:
null
,
"version"
:
0
}
\ No newline at end of file
devenv/bulk_alerting_dashboards/dashboard.libsonnet
0 → 100644
View file @
540d1d9b
{
alertingDashboard(dashboardCounter, datasourceCounter):: {
title: "alerting-title-" + dashboardCounter,
editable: true,
gnetId: null,
graphTooltip: 0,
id: null,
links: [],
panels: [
{
alert: {
conditions: [
{
evaluator: {
params: [
65
],
type: "gt"
},
operator: {
type: "and"
},
query: {
params: [
"A",
"5m",
"now"
]
},
reducer: {
params: [],
type: "avg"
},
type: "query"
}
],
executionErrorState: "alerting",
frequency: "24h",
handler: 1,
name: "bulk alerting " + dashboardCounter,
noDataState: "no_data",
notifications: []
},
aliasColors: {},
bars: false,
dashLength: 10,
dashes: false,
datasource: "gfdev-bulkalerting-" + datasourceCounter,
fill: 1,
gridPos: {
h: 9,
w: 12,
x: 0,
y: 0
},
id: 1,
legend: {
avg: false,
current: false,
max: false,
min: false,
show: true,
total: false,
values: false
},
lines: true,
linewidth: 1,
nullPointMode: "null",
percentage: false,
pointradius: 5,
points: false,
renderer: "flot",
seriesOverrides: [],
spaceLength: 10,
stack: false,
steppedLine: false,
targets: [
{
expr: "go_goroutines",
format: "time_series",
intervalFactor: 1,
refId: "A"
}
],
thresholds: [
{
colorMode: "critical",
fill: true,
line: true,
op: "gt",
value: 50
}
],
timeFrom: null,
timeShift: null,
title: "Panel Title",
tooltip: {
shared: true,
sort: 0,
value_type: "individual"
},
type: "graph",
xaxis: {
buckets: null,
mode: "time",
name: null,
show: true,
values: []
},
yaxes: [
{
format: "short",
label: null,
logBase: 1,
max: null,
min: null,
show: true
},
{
format: "short",
label: null,
logBase: 1,
max: null,
min: null,
show: true
}
]
}
],
schemaVersion: 16,
style: "dark",
tags: [],
templating: {
list: []
},
time: {
from: "now-6h",
to: "now"
},
timepicker: {
refresh_intervals: [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
time_options: [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
timezone: "",
uid: null,
version: 0
},
}
devenv/bulk_alerting_dashboards/datasources.jsonnet
0 → 100644
View file @
540d1d9b
local
arr
=
std
.
range
(
1
,
100
);
{
"apiVersion"
:
1
,
"datasources"
:
[
{
"name"
:
'gfdev-bulkalerting-'
+
counter
,
"type"
:
"prometheus"
,
"access"
:
"proxy"
,
"url"
:
"http://localhost:9090"
}
for
counter
in
arr
],
}
devenv/setup.sh
View file @
540d1d9b
...
@@ -18,14 +18,21 @@ bulkAlertingDashboard() {
...
@@ -18,14 +18,21 @@ bulkAlertingDashboard() {
requiresJsonnet
requiresJsonnet
COUNTER
=
0
jsonnet
-o
"bulk_alerting_dashboards/bulk_alerting_datasources.yaml"
./bulk_alerting_dashboards/datasources.jsonnet
MAX
=
100
COUNTER
=
1
DS
=
1
MAX
=
1000
while
[
$COUNTER
-lt
$MAX
]
;
do
while
[
$COUNTER
-lt
$MAX
]
;
do
jsonnet
-o
"bulk_alerting_dashboards/alerting_dashboard
${
COUNTER
}
.json"
-e
"local bulkDash = import 'bulk_alerting_dashboards/bulkdash_alerting.jsonnet'; bulkDash + { uid: 'bd-
${
COUNTER
}
', title: 'alerting-title-
${
COUNTER
}
' }"
jsonnet
-o
"bulk_alerting_dashboards/alerting_dashboard
${
COUNTER
}
.json"
\
-e
"local bulkDash = import 'bulk_alerting_dashboards/dashboard.libsonnet'; bulkDash.alertingDashboard(
${
COUNTER
}
,
${
DS
}
)"
let
COUNTER
=
COUNTER+1
let
COUNTER
=
COUNTER+1
let
DS
=
COUNTER/10
let
DS
=
DS+1
done
done
ln
-s
-f
../../../devenv/bulk_alerting_dashboards/bulk_alerting_dashboards.yaml ../conf/provisioning/dashboards/custom.yaml
ln
-s
-f
../../../devenv/bulk_alerting_dashboards/bulk_alerting_dashboards.yaml ../conf/provisioning/dashboards/custom.yaml
ln
-s
-f
../../../devenv/bulk_alerting_dashboards/bulk_alerting_datasources.yaml ../conf/provisioning/datasources/custom.yaml
}
}
requiresJsonnet
()
{
requiresJsonnet
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment