Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
tas_monitor
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8b226b51
authored
Nov 21, 2019
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add mongo_none_data_rate_monitor
parent
d7eb5d44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
monitor.py
monitor.py
View file @
8b226b51
...
...
@@ -58,6 +58,18 @@ def task_running_flag_monitor():
dd_send_msg
(
traceback
.
format_exc
())
time
.
sleep
(
60
*
5
)
def
mongo_none_data_rate_monitor
():
while
True
:
try
:
msg
=
mongo
.
get_platform_none_data_rate
()
if
msg
:
logger
.
info
(
msg
)
dd_send_msg
(
msg
)
time
.
sleep
(
3
*
60
*
60
)
except
Exception
:
logger
.
error
(
traceback
.
format_exc
())
dd_send_msg
(
traceback
.
format_exc
())
time
.
sleep
(
60
*
5
)
def
main
():
thread_monitor1
=
threading
.
Thread
(
target
=
task_fail_rate_monitor
)
...
...
@@ -66,6 +78,8 @@ def main():
thread_monitor2
.
start
()
thread_monitor3
=
threading
.
Thread
(
target
=
task_running_flag_monitor
)
thread_monitor3
.
start
()
thread_monitor4
=
threading
.
Thread
(
target
=
mongo_none_data_rate_monitor
)
thread_monitor4
.
start
()
if
__name__
==
"__main__"
:
...
...
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