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
a5a2b9e3
authored
Apr 09, 2022
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update elk返回判断
parent
5f5fab00
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
crawler_process.py
crawler_process.py
View file @
a5a2b9e3
...
@@ -67,10 +67,8 @@ def get_error_ratio(task_code, time_range=30):
...
@@ -67,10 +67,8 @@ def get_error_ratio(task_code, time_range=30):
res
=
requests
.
post
(
url
,
json
=
query
)
res
=
requests
.
post
(
url
,
json
=
query
)
# value = response['aggregations']['avgFailRate']['value']
# value = response['aggregations']['avgFailRate']['value']
print
(
task_code
)
value
=
res
.
json
()[
'aggregations'
][
'avgFailRate'
][
'value'
]
if
res
.
status_code
==
200
and
res
.
json
()[
'aggregations'
][
'avgFailRate'
][
'value'
]
else
0.0
value
=
res
.
json
()[
'aggregations'
][
'avgFailRate'
][
'value'
]
if
res
.
status_code
==
200
and
res
.
json
()[
'aggregations'
][
'avgFailRate'
][
'value'
]
else
0.0
print
(
value
)
print
(
res
.
json
())
return
round
(
value
,
3
)
return
round
(
value
,
3
)
...
...
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