Commit 0b1de333 by zhangwei

修改输出

zabbix触发器按输出值判断
parent c8db9588
......@@ -37,8 +37,10 @@ def action(interval):
if __name__ == '__main__':
user_info={}
count=0
dbname="summer_hill"
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';'''
c=d.cursor()
c.execute(sql)
......@@ -46,9 +48,11 @@ if __name__ == '__main__':
d.close()
if len(rs) > 0:
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])
action(interval)
else:
interval=0
action(interval)
\ No newline at end of file
count = count +1
#action(interval)
print(count)
# else:
# interval=0
# action(interval)
\ No newline at end of file
#!/bin/bash
cd /opt/neo/script/cms_log/
cd /data/script/zabbix/
#(nginx php book video-center user-center summer-hill)
/usr/bin/python cms_check_log.py $1
#!/bin/bash
cd /opt/neo/script/cms_log/
cd /data/script/zabbix/
#name=(book books go sks userc users videocs)
/usr/bin/python cms_log.py --type $1
#!/bin/bash
cd /data/script/zabbix/
/usr/bin/python check_pay_failure.py
\ No newline at end of file
#!/bin/bash
cd /data/script/zabbix/
/usr/bin/python check_pay_stat.py
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment