随笔- 807
文章- 150
评论- 23
阅读-
151万
随笔分类 - Python 脚本
Python 文件去重(转载)
摘要:Python实现的txt文件去重功能示例 更新时间:2018年07月07日 09:00:36 作者:人饭子 我要评论 这篇文章主要介绍了Python实现的txt文件去重功能,涉及Python针对txt文本文件的读写、字符串遍历、判断相关操作技巧,需要的朋友可以参考下 本文实例讲述了Python实现的
阅读全文
Oracle 监控
摘要:cat oracle_status_output.py from prometheus_client import Gauge,start_http_serverimport randomimport subprocessimport timeimport cx_Oracle class Oracl
阅读全文
Mysql 监控脚本
摘要:cat mysql_status_output.py #coding=utf-8import jaydebeapiimport sysimport pymysqlimport osfrom prometheus_client import Gauge,start_http_serverimport
阅读全文
Python Threading多线程简单例子
摘要:业务监控,多线程例子,实现每类个监控项的不同监控间隔。 #coding=utf-8import sysimport pymysqlimport osfrom prometheus_client import Gauge,start_http_serverimport timeimport threa
阅读全文
Python Oracle数据库监控
摘要:有的时候无法使用Oracle自带的OEM监控,那么就需要确定一个监控方案。 此方案,使用Python+Prometheus+Grafana+Oracle 1.监控配置表 -- Create tablecreate table DB_MONITOR_TAB( ID NUMBER, MONITOR_CL
阅读全文
Python 数据库之间差异对比
摘要:参考资料: Python 集合(set) 此脚本用于两个数据库之间的表、列、栏位、索引的差异对比。 cat oracle_diff.py #!/home/dba/.pyenv/versions/3.5.2/bin/python#coding=utf-8import cx_Oracleimport t
阅读全文
Python3.5+SQL+Prometheus+Grafana报表/监控
摘要:参考资料: pymysql 单独获取表的栏位名称 pymysql返回数据为字典形式(key:value--列:值) 行列结合,作为prometheus_client的输出。 话不多说,直接上脚本。 cat mysql_ccpay.py #coding=utf-8import sysimport py
阅读全文