Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-common
Overview
Overview
Details
Activity
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
bltdc
dc-common
Commits
86cd50b9
Commit
86cd50b9
authored
Mar 06, 2020
by
yinyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update config
parent
49ea655a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
3 deletions
+33
-3
data-skywalking.iml
data-skywalking/data-skywalking.iml
+2
-0
pom.xml
data-skywalking/pom.xml
+6
-0
SkyWalkingNotice.java
.../main/java/com/bailuntec/controller/SkyWalkingNotice.java
+7
-3
AlarmMessageDto.java
...king/src/main/java/com/bailuntec/dto/AlarmMessageDto.java
+14
-0
alarm-settings.yml
docker-skywalking/6/6.6/oap-es7/alarm-settings.yml
+4
-0
No files found.
data-skywalking/data-skywalking.iml
View file @
86cd50b9
...
...
@@ -82,5 +82,6 @@
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.xmlunit:xmlunit-core:2.5.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: javax.mail:mail:1.4.5"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: javax.activation:activation:1.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.projectlombok:lombok:1.16.22"
level=
"project"
/>
</component>
</module>
\ No newline at end of file
data-skywalking/pom.xml
View file @
86cd50b9
...
...
@@ -41,6 +41,12 @@
<artifactId>
mail
</artifactId>
<version>
1.4.5
</version>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<optional>
true
</optional>
</dependency>
</dependencies>
<build>
...
...
data-skywalking/src/main/java/com/bailuntec/controller/SkyWalkingNotice.java
View file @
86cd50b9
package
com
.
bailuntec
.
controller
;
import
com.bailuntec.dto.AlarmMessageDto
;
import
com.bailuntec.service.SkyWalkingNoticeService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.mail.MessagingException
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.security.GeneralSecurityException
;
import
java.util.List
;
@RestController
public
class
SkyWalkingNotice
{
...
...
@@ -16,8 +20,8 @@ public class SkyWalkingNotice {
@Autowired
private
SkyWalkingNoticeService
skyWalkingNoticeService
;
@
Ge
tMapping
(
value
=
"notice"
)
public
void
notice
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
GeneralSecurityException
,
MessagingException
{
skyWalkingNoticeService
.
send
(
"邮件主题"
,
"邮件内容"
);
@
Reques
tMapping
(
value
=
"notice"
)
public
void
notice
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@RequestBody
List
<
AlarmMessageDto
>
alarmMessageList
)
throws
GeneralSecurityException
,
MessagingException
{
skyWalkingNoticeService
.
send
(
alarmMessageList
);
}
}
data-skywalking/src/main/java/com/bailuntec/dto/AlarmMessageDto.java
0 → 100644
View file @
86cd50b9
package
com
.
bailuntec
.
dto
;
import
lombok.Data
;
@Data
public
class
AlarmMessageDto
{
private
Integer
scopeId
;
private
String
name
;
private
Integer
id0
;
private
Integer
id1
;
private
String
alarmMessage
;
private
long
startTime
;
}
docker-skywalking/6/6.6/oap-es7/alarm-settings.yml
View file @
86cd50b9
...
...
@@ -19,6 +19,7 @@ rules:
# Rule unique name, must be ended with `_rule`.
service_resp_time_rule
:
indicator-name
:
service_resp_time
metrics-name
:
service_resp_time
op
:
"
>"
threshold
:
1000
period
:
10
...
...
@@ -28,6 +29,7 @@ rules:
service_sla_rule
:
# Indicator value need to be long, double or int
indicator-name
:
service_sla
metrics-name
:
service_sla
op
:
"
<"
threshold
:
8000
# The length of time to evaluate the metric
...
...
@@ -40,6 +42,7 @@ rules:
service_p90_sla_rule
:
# Indicator value need to be long, double or int
indicator-name
:
service_p90
metrics-name
:
service_p90
op
:
"
>"
threshold
:
1000
period
:
10
...
...
@@ -48,6 +51,7 @@ rules:
message
:
90% response time of service {name} is more than 1000ms in 3 minutes of last 10 minutes
service_instance_resp_time_rule
:
indicator-name
:
service_instance_resp_time
metrics-name
:
service_instance_resp_time
op
:
"
>"
threshold
:
1000
period
:
10
...
...
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