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
8f72d621
Unverified
Commit
8f72d621
authored
Jun 01, 2020
by
Sofia Papagiannaki
Committed by
GitHub
Jun 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: Add example for updating dashboard panel alert rule (#25260)
parent
78febbbe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
157 additions
and
0 deletions
+157
-0
docs/sources/http_api/dashboard.md
+157
-0
No files found.
docs/sources/http_api/dashboard.md
View file @
8f72d621
...
...
@@ -60,6 +60,163 @@ JSON Body schema:
-
**overwrite**
– Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
-
**message**
- Set a commit message for the version history.
For adding or updating an alert rule for a dashboard panel the user should declare a
`dashboard.panels.alert`
block.
**Example Request for updating dashboard alert rule**
:
```
http
HTTP
/
1.1
200
OK
Content-Type
:
application/json; charset=UTF-8
Content-Length
:
78
{
"dashboard"
:
{
"id"
:
104
,
"panels"
:
[
{
"alert"
:
{
"alertRuleTags"
:
{},
"conditions"
:
[
{
"evaluator"
:
{
"params"
:
[
25
],
"type"
:
"gt"
},
"operator"
:
{
"type"
:
"and"
},
"query"
:
{
"params"
:
[
"A"
,
"5m"
,
"now"
]
},
"reducer"
:
{
"params"
:
[],
"type"
:
"avg"
},
"type"
:
"query"
}
],
"executionErrorState"
:
"alerting"
,
"for"
:
"5m"
,
"frequency"
:
"1m"
,
"handler"
:
1
,
"name"
:
"Panel Title alert"
,
"noDataState"
:
"no_data"
,
"notifications"
:
[]
},
"aliasColors"
:
{},
"bars"
:
false
,
"dashLength"
:
10
,
"dashes"
:
false
,
"datasource"
:
null
,
"fieldConfig"
:
{
"defaults"
:
{
"custom"
:
{}
},
"overrides"
:
[]
},
"fill"
:
1
,
"fillGradient"
:
0
,
"gridPos"
:
{
"h"
:
9
,
"w"
:
12
,
"x"
:
0
,
"y"
:
0
},
"hiddenSeries"
:
false
,
"id"
:
2
,
"legend"
:
{
"avg"
:
false
,
"current"
:
false
,
"max"
:
false
,
"min"
:
false
,
"show"
:
true
,
"total"
:
false
,
"values"
:
false
},
"lines"
:
true
,
"linewidth"
:
1
,
"nullPointMode"
:
"null"
,
"options"
:
{
"dataLinks"
:
[]
},
"percentage"
:
false
,
"pointradius"
:
2
,
"points"
:
false
,
"renderer"
:
"flot"
,
"seriesOverrides"
:
[],
"spaceLength"
:
10
,
"stack"
:
false
,
"steppedLine"
:
false
,
"targets"
:
[
{
"refId"
:
"A"
,
"scenarioId"
:
"random_walk"
}
],
"thresholds"
:
[
{
"colorMode"
:
"critical"
,
"fill"
:
true
,
"line"
:
true
,
"op"
:
"gt"
,
"value"
:
50
}
],
"timeFrom"
:
null
,
"timeRegions"
:
[],
"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
}
],
"yaxis"
:
{
"align"
:
false
,
"alignLevel"
:
null
}
}
],
"title"
:
"Update alert rule via API"
,
"uid"
:
"dHEquNzGz"
,
"version"
:
1
}
}
```
**Example Response**
:
```
http
...
...
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