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
88a0d0da
authored
Apr 08, 2022
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
切换elk
parent
d49d2dbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
crawler_process.py
crawler_process.py
View file @
88a0d0da
...
...
@@ -17,7 +17,7 @@ from utils.tas_redis import task_redis
logger
=
get_logger
(
'crawler_process'
)
dashboard
=
MySqlOperator
(
'dashboard'
)
ichunt_elk
=
Elasticsearch
(
host
=
"1
27.0.0.1
"
,
port
=
9200
,
timeout
=
20
)
ichunt_elk
=
Elasticsearch
(
host
=
"1
72.18.137.50
"
,
port
=
9200
,
timeout
=
20
)
def
get_process_task
(
task_code
):
...
...
@@ -30,7 +30,7 @@ def get_process_task(task_code):
def
get_error_ratio
(
task_code
,
time_range
=
30
):
utc_since
=
datetime
.
utcnow
()
-
timedelta
(
minutes
=
time_range
)
index
=
'
logstash
-'
+
utc_since
.
strftime
(
'
%
Y.
%
m.
%
d'
)
index
=
'
spider_logs
-'
+
utc_since
.
strftime
(
'
%
Y.
%
m.
%
d'
)
query
=
{
"size"
:
0
,
"query"
:
{
...
...
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