Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DAACDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Syed Bilal Raees
DAACDemo
Commits
17fd06f1
Commit
17fd06f1
authored
Apr 19, 2023
by
Rizwan Shakoor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added and updated alert script files
parent
a2c34f55
Pipeline
#4192
failed with stages
in 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
3 deletions
+135
-3
alert_script.sh
alerts-config/alert_script.sh
+5
-3
alert_rule.json
alerts/alert_rule.json
+130
-0
No files found.
alerts-config/alert_script.sh
View file @
17fd06f1
JSONNET_PATH
=
grafonnet-lib
\
JSONNET_PATH
=
grafonnet-lib
\
jsonnet test_alert_new.jsonnet
>
test_alert_new
.json
# jsonnet alert_rule.jsonnet > alert_rule
.json
jsonnet ../alerts/alert_rule.jsonnet
>
../alerts/alert_rule.json
payload
=
"
$(
jq
.
test_alert_new.json
)
"
payload
=
"
$(
jq
.
../alerts/alert_rule.json
)
"
curl
-X
POST
$BASIC_AUTH
\
curl
-X
POST
$BASIC_AUTH
\
-H
'Content-Type: application/json'
\
-H
'Content-Type: application/json'
\
-d
"
${
payload
}
"
\
-d
"
${
payload
}
"
\
"http://admin:admin@localhost:3000/api/v1/provisioning/alert-rules"
"http://admin:admin@20.106.132.29:3001/api/v1/provisioning/alert-rules"
\ No newline at end of file
\ No newline at end of file
alerts/alert_rule.json
0 → 100644
View file @
17fd06f1
{
"annotations"
:
{
"__dashboardUid__"
:
"ABCJVM123"
,
"__panelId__"
:
"6"
,
"description"
:
"Alert is Triggering .. Huhhhh!!!!!"
,
"summary"
:
"This is Test Rule"
},
"condition"
:
"C"
,
"dashboardUid"
:
"ABCJVM123"
,
"data"
:
[
{
"datasourceUid"
:
"Dxn-4VYVk"
,
"model"
:
{
"editorMode"
:
"code"
,
"expr"
:
"http_server_requests_seconds_count"
,
"hide"
:
"false"
,
"intervalMs"
:
2000
,
"legendFormat"
:
"__auto"
,
"maxDataPoints"
:
43200
,
"range"
:
true
,
"refId"
:
"A"
},
"refId"
:
"A"
,
"relativeTimeRange"
:
{
"from"
:
600
,
"to"
:
0
}
},
{
"datasourceUid"
:
"__expr__"
,
"model"
:
{
"conditions"
:
[
{
"evaluator"
:
{
"params"
:
[
null
],
"type"
:
"gt"
},
"operator"
:
{
"type"
:
"and"
},
"query"
:
{
"params"
:
[
"B"
]
},
"reducer"
:
{
"params"
:
[
],
"type"
:
"last"
},
"type"
:
"query"
}
],
"datasource"
:
{
"type"
:
"__expr__"
,
"uid"
:
"__expr__"
},
"expression"
:
"A"
,
"hide"
:
false
,
"intervalMs"
:
1000
,
"maxDataPoints"
:
43200
,
"reducer"
:
"max"
,
"refId"
:
"B"
,
"type"
:
"reduce"
},
"refId"
:
"B"
,
"relativeTimeRange"
:
{
"from"
:
600
,
"to"
:
0
}
},
{
"datasourceUid"
:
"__expr__"
,
"model"
:
{
"conditions"
:
[
{
"evaluator"
:
{
"params"
:
[
100
],
"type"
:
"gt"
},
"operator"
:
{
"type"
:
"and"
},
"query"
:
{
"params"
:
[
"C"
]
},
"reducer"
:
{
"params"
:
[
],
"type"
:
"last"
},
"type"
:
"query"
}
],
"datasource"
:
{
"type"
:
"__expr__"
,
"uid"
:
"__expr__"
},
"expression"
:
"B"
,
"hide"
:
false
,
"intervalMs"
:
1000
,
"maxDataPoints"
:
43200
,
"refId"
:
"C"
,
"type"
:
"threshold"
},
"refId"
:
"C"
,
"relativeTimeRange"
:
{
"from"
:
600
,
"to"
:
0
}
}
],
"execErrState"
:
"Error"
,
"folderUID"
:
"ab_xyz1234"
,
"for"
:
"5m"
,
"id"
:
3345
,
"interval"
:
"2m"
,
"isPaused"
:
false
,
"noDataState"
:
"NoData"
,
"orgID"
:
1
,
"panelId"
:
"6"
,
"ruleGroup"
:
"my_alert-dashboards"
,
"title"
:
"alert-rule_for_spring-boot-jvm"
,
"uid"
:
"test_uid3345"
,
"updated"
:
"2023-04-09T15:52:13+05:00"
}
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