Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
monitor
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
zhaihuitao
monitor
Commits
19dfa8ff
Commit
19dfa8ff
authored
Jan 15, 2021
by
zhaihuitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
6d836133
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
getData.py
dbConfig/getData.py
+4
-3
main.py
dbConfig/main.py
+3
-2
No files found.
dbConfig/getData.py
View file @
19dfa8ff
...
...
@@ -18,7 +18,6 @@ username = "rytestalarm"
# password = "reyun.123"
password
=
"rytestalarm234"
db
=
"tkio_stream"
dt
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
sql
=
"select num_click from tkio_rpt_source_analysis_day where appid ='b563860ef7f3400a5fe7c0a05f4523e6' and "
\
"dt=curdate(); "
...
...
@@ -38,7 +37,7 @@ count = r[0]
p
=
requests
.
get
(
url
=
URL
,
params
=
param
,
timeout
=
30
,
verify
=
False
)
time
.
sleep
(
36
0
)
time
.
sleep
(
25
0
)
mysqlCon
=
MysqlCon
(
host
=
host
,
username
=
username
,
password
=
password
,
db
=
db
)
r
=
mysqlCon
.
get_one
(
sql
=
sql
)
...
...
@@ -47,4 +46,5 @@ print(count, num)
if
count
+
1
==
num
:
print
(
"指标确认正常"
)
else
:
print
(
"指标异常,请关注"
)
# print("指标异常,请关注")
1
/
0
\ No newline at end of file
dbConfig/main.py
View file @
19dfa8ff
...
...
@@ -10,4 +10,5 @@ sys.path.append(rootPath)
sql
=
"select num_click from tkio_rpt_source_analysis_day where appid ='b563860ef7f3400a5fe7c0a05f4523e6' and "
\
"dt=curdate(); "
print
(
sys
.
path
)
print
(
rootPath
)
\ No newline at end of file
print
(
rootPath
)
print
(
1
/
0
)
\ No newline at end of file
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