Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saasio
Project
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
reyun
saasio
Commits
b40a173e
Commit
b40a173e
authored
6 years ago
by
carrieyzzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
receiver log
parent
f4b034a3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
2 deletions
+50
-2
pom.xml
pom.xml
+13
-2
LogController.java
src/main/java/com/reyun/controller/LogController.java
+33
-0
Constant.java
src/main/java/com/reyun/util/Constant.java
+2
-0
common.properties
src/main/resources/common.properties
+2
-0
No files found.
pom.xml
View file @
b40a173e
...
@@ -63,8 +63,12 @@
...
@@ -63,8 +63,12 @@
<report.url>
http://172.31.1.122:9010
</report.url>
<report.url>
http://172.31.1.122:9010
</report.url>
<admin.url>
http://localhost:8080
</admin.url>
<admin.url>
http://localhost:8080
</admin.url>
<receiver.host>
172.31.30.1,172.31.22.39,172.31.22.38,172.31.4.0,172.31.3.123,172.31.16.68,172.31.30.154,172.31.2
6.177
</receiver.host>
<receiver.host>
172.31.30.1,172.31.22.39,172.31.22.38,172.31.4.0,172.31.3.123,172.31.16.68,172.31.30.154,172.31.2
7.121,172.31.17.216
</receiver.host>
<receiver.port>
8080
</receiver.port>
<receiver.port>
8080
</receiver.port>
<io.receiver.host>
172.31.4.0,172.31.3.123
</io.receiver.host>
<io.receiver.port>
8222
</io.receiver.port>
<trackingio.url>
http://52.80.113.103:8002
</trackingio.url>
<trackingio.url>
http://52.80.113.103:8002
</trackingio.url>
<demo.url>
http://localhost:9010
</demo.url>
<demo.url>
http://localhost:9010
</demo.url>
...
@@ -182,7 +186,11 @@
...
@@ -182,7 +186,11 @@
<report.url>
http://localhost:8003/
</report.url>
<report.url>
http://localhost:8003/
</report.url>
<admin.url>
http://localhost:9020
</admin.url>
<admin.url>
http://localhost:9020
</admin.url>
<receiver.host>
ec2-54-223-170-25.cn-north-1.compute.amazonaws.com.cn
</receiver.host>
<receiver.host>
ec2-54-223-170-25.cn-north-1.compute.amazonaws.com.cn
</receiver.host>
<receiver.port>
8081
</receiver.port>
<receiver.port>
8080
</receiver.port>
<io.receiver.host>
ec2-54-223-170-25.cn-north-1.compute.amazonaws.com.cn
</io.receiver.host>
<io.receiver.port>
8081
</io.receiver.port>
<trackingio.url>
http://localhost:8002
</trackingio.url>
<trackingio.url>
http://localhost:8002
</trackingio.url>
<demo.url>
http://localhost:9003
</demo.url>
<demo.url>
http://localhost:9003
</demo.url>
...
@@ -264,6 +272,9 @@
...
@@ -264,6 +272,9 @@
<receiver.host>
172.31.30.1,172.31.22.39,172.31.22.38,172.31.4.0,172.31.3.123,172.31.16.68,172.31.30.154,172.31.27.121,172.31.17.216
</receiver.host>
<receiver.host>
172.31.30.1,172.31.22.39,172.31.22.38,172.31.4.0,172.31.3.123,172.31.16.68,172.31.30.154,172.31.27.121,172.31.17.216
</receiver.host>
<receiver.port>
8080
</receiver.port>
<receiver.port>
8080
</receiver.port>
<io.receiver.host>
172.31.4.0,172.31.3.123
</io.receiver.host>
<io.receiver.port>
8222
</io.receiver.port>
<profile.table>
kudu.default.profile_
</profile.table>
<profile.table>
kudu.default.profile_
</profile.table>
<event.table>
tkio_bigtable_view.event_
</event.table>
<event.table>
tkio_bigtable_view.event_
</event.table>
<usergroup.table>
tkio_bigtable.tkio_user_group
</usergroup.table>
<usergroup.table>
tkio_bigtable.tkio_user_group
</usergroup.table>
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/controller/LogController.java
View file @
b40a173e
...
@@ -91,6 +91,39 @@ public class LogController {
...
@@ -91,6 +91,39 @@ public class LogController {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"url: {}"
,
url
,
e
);
logger
.
error
(
"url: {}"
,
url
,
e
);
try
{
try
{
MailUtils
.
sendSimpleEmail
(
"io日志流服务"
,
"日志流服务暂不可用, url: "
+
url
+
", message:"
+
e
.
getMessage
(),
Constant
.
mlist
);
}
catch
(
Exception
e1
)
{
logger
.
error
(
"邮件服务不可用 getLogs()"
);
}
continue
;
}
}
String
[]
ioHostArray
=
Constant
.
ioreceiverHost
.
split
(
","
);
for
(
String
host
:
ioHostArray
)
{
String
url
=
"http://"
+
host
.
trim
()+
":"
+
Constant
.
receiverPort
+
"/receive/newlylogs/"
+
appId
;
try
{
String
httpresult
=
HttpClientUtil
.
doHttpGetRequest
(
url
,
host
);
if
(!
StringUtil
.
isEmpty
(
httpresult
))
{
try
{
JSONObject
httpresultObject
=
new
JSONObject
(
httpresult
);
if
(
httpresultObject
.
has
(
"result"
))
{
JSONArray
resultArray
=
httpresultObject
.
getJSONArray
(
"result"
);
for
(
int
i
=
0
;
i
<
resultArray
.
length
();
i
++)
{
JSONObject
ob
=
resultArray
.
getJSONObject
(
i
);
obList
.
add
(
ob
);
}
}
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"url: {}"
,
url
,
e
);
try
{
MailUtils
.
sendSimpleEmail
(
"日志流服务"
,
"日志流服务暂不可用, url: "
+
url
+
", message:"
+
e
.
getMessage
(),
Constant
.
mlist
);
MailUtils
.
sendSimpleEmail
(
"日志流服务"
,
"日志流服务暂不可用, url: "
+
url
+
", message:"
+
e
.
getMessage
(),
Constant
.
mlist
);
}
catch
(
Exception
e1
)
{
}
catch
(
Exception
e1
)
{
logger
.
error
(
"邮件服务不可用 getLogs()"
);
logger
.
error
(
"邮件服务不可用 getLogs()"
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/reyun/util/Constant.java
View file @
b40a173e
...
@@ -37,6 +37,8 @@ public class Constant {
...
@@ -37,6 +37,8 @@ public class Constant {
public
static
String
trackingUrl
=
commonBundle
.
getString
(
"trackingio.url"
);
public
static
String
trackingUrl
=
commonBundle
.
getString
(
"trackingio.url"
);
public
static
String
receiverHost
=
commonBundle
.
getString
(
"receiver.host"
);
public
static
String
receiverHost
=
commonBundle
.
getString
(
"receiver.host"
);
public
static
String
receiverPort
=
commonBundle
.
getString
(
"receiver.port"
);
public
static
String
receiverPort
=
commonBundle
.
getString
(
"receiver.port"
);
public
static
String
ioreceiverHost
=
commonBundle
.
getString
(
"io.receiver.host"
);
public
static
String
ioreceiverPort
=
commonBundle
.
getString
(
"io.receiver.port"
);
public
static
String
demoUrl
=
commonBundle
.
getString
(
"demo.url"
);
public
static
String
demoUrl
=
commonBundle
.
getString
(
"demo.url"
);
public
static
String
flowneed
=
commonBundle
.
getString
(
"flowneed"
);
public
static
String
flowneed
=
commonBundle
.
getString
(
"flowneed"
);
public
static
String
reportExportTask
=
commonBundle
.
getString
(
"report.export.task"
);
public
static
String
reportExportTask
=
commonBundle
.
getString
(
"report.export.task"
);
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/common.properties
View file @
b40a173e
...
@@ -6,6 +6,8 @@ report.export.task=${report.export.task}
...
@@ -6,6 +6,8 @@ report.export.task=${report.export.task}
receiver.host
=
${receiver.host}
receiver.host
=
${receiver.host}
receiver.port
=
${receiver.port}
receiver.port
=
${receiver.port}
io.receiver.host
=
${io.receiver.host}
io.receiver.port
=
${io.receiver.port}
report.url
=
${report.url}
report.url
=
${report.url}
awsneed
=
${awsneed}
awsneed
=
${awsneed}
iscache
=
${iscache}
iscache
=
${iscache}
...
...
This diff is collapsed.
Click to expand it.
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