Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
ops
Overview
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangwei
ops
Commits
0b1de333
Commit
0b1de333
authored
Mar 16, 2017
by
zhangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改输出
zabbix触发器按输出值判断
parent
c8db9588
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
8 deletions
+19
-8
check_pay_stat.py
cms_log/cms_log/check_pay_stat.py
+10
-6
cms_check_log.sh
cms_log/cms_log/cms_check_log.sh
+1
-1
cms_log.sh
cms_log/cms_log/cms_log.sh
+1
-1
cms_pay_failure.sh
cms_log/cms_log/cms_pay_failure.sh
+4
-0
cms_pay_stat.sh
cms_log/cms_log/cms_pay_stat.sh
+3
-0
No files found.
cms_log/cms_log/check_pay_stat.py
View file @
0b1de333
...
@@ -37,8 +37,10 @@ def action(interval):
...
@@ -37,8 +37,10 @@ def action(interval):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
user_info
=
{}
user_info
=
{}
count
=
0
dbname
=
"summer_hill"
dbname
=
"summer_hill"
d
=
db
.
openMysql
(
host
,
port
,
user
,
password
,
dbname
)
d
=
db
.
openMysql
(
host
,
port
,
user
,
password
,
dbname
)
#sql='''select id,product_id,user_id,state,ctime,mtime from summer_hill.order where state='new';'''
sql
=
'''select id,product_id,user_id,state,ctime,mtime from summer_hill.order where state='closed';'''
sql
=
'''select id,product_id,user_id,state,ctime,mtime from summer_hill.order where state='closed';'''
c
=
d
.
cursor
()
c
=
d
.
cursor
()
c
.
execute
(
sql
)
c
.
execute
(
sql
)
...
@@ -46,9 +48,11 @@ if __name__ == '__main__':
...
@@ -46,9 +48,11 @@ if __name__ == '__main__':
d
.
close
()
d
.
close
()
if
len
(
rs
)
>
0
:
if
len
(
rs
)
>
0
:
for
line
in
rs
:
for
line
in
rs
:
print
(
"[product_id]:
%
s,[user_id]:
%
s,[state]:
%
s"
)
%
(
line
[
1
],
line
[
2
],
line
[
3
])
#
print("[product_id]:%s,[user_id]:%s,[state]:%s") % (line[1],line[2],line[3])
interval
=
get_interval
(
line
[
4
])
interval
=
get_interval
(
line
[
4
])
action
(
interval
)
count
=
count
+
1
else
:
#action(interval)
interval
=
0
print
(
count
)
action
(
interval
)
# else:
\ No newline at end of file
# interval=0
# action(interval)
\ No newline at end of file
cms_log/cms_log/cms_check_log.sh
View file @
0b1de333
#!/bin/bash
#!/bin/bash
cd
/
opt/neo/script/cms_log
/
cd
/
data/script/zabbix
/
#(nginx php book video-center user-center summer-hill)
#(nginx php book video-center user-center summer-hill)
/usr/bin/python cms_check_log.py
$1
/usr/bin/python cms_check_log.py
$1
cms_log/cms_log/cms_log.sh
View file @
0b1de333
#!/bin/bash
#!/bin/bash
cd
/
opt/neo/script/cms_log
/
cd
/
data/script/zabbix
/
#name=(book books go sks userc users videocs)
#name=(book books go sks userc users videocs)
/usr/bin/python cms_log.py
--type
$1
/usr/bin/python cms_log.py
--type
$1
cms_log/cms_log/cms_pay_failure.sh
0 → 100644
View file @
0b1de333
#!/bin/bash
cd
/data/script/zabbix/
/usr/bin/python check_pay_failure.py
\ No newline at end of file
cms_log/cms_log/cms_pay_stat.sh
0 → 100644
View file @
0b1de333
#!/bin/bash
cd
/data/script/zabbix/
/usr/bin/python check_pay_stat.py
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