惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
月光博客
月光博客
WordPress大学
WordPress大学
C
Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园 - 【当耐特】
大猫的无限游戏
大猫的无限游戏
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
The Cloudflare Blog
有赞技术团队
有赞技术团队
Microsoft Azure Blog
Microsoft Azure Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
小众软件
小众软件
H
Heimdal Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
W
WeLiveSecurity
量子位
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
F
Fortinet All Blogs
T
Threat Research - Cisco Blogs
Attack and Defense Labs
Attack and Defense Labs
P
Privacy & Cybersecurity Law Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
NISL@THU
NISL@THU
Forbes - Security
Forbes - Security
L
Lohrmann on Cybersecurity
C
CERT Recently Published Vulnerability Notes
L
LINUX DO - 热门话题
Google Online Security Blog
Google Online Security Blog
S
Security Affairs
V2EX - 技术
V2EX - 技术
TaoSecurity Blog
TaoSecurity Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
S
Security @ Cisco Blogs
宝玉的分享
宝玉的分享
Project Zero
Project Zero
The Hacker News
The Hacker News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
PCI Perspectives
PCI Perspectives
G
GRAHAM CLULEY
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Y
Y Combinator Blog
N
Netflix TechBlog - Medium
S
Schneier on Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 聂微东

博客园 - 蛙蛙王子

蛙蛙推荐: TensorFlow Hello World 之平面拟合 [蛙蛙推荐]SICP第一章学习笔记-编程入门 快速学习C语言四: 造轮子,ArrayList 快速学习C语言三: 开发环境, VIM配置, TCP基础,Linux开发基础,Socket开发基础 快速学习C语言二: 编译自动化, 静态分析, 单元测试,coredump调试,性能剖析 快速学习C语言一: Hello World 转:python获取linux系统及性能信息 转帖:Python应用性能分析指南 蛙蛙推荐:快速自定义Boostrap样式 蛙蛙推荐:WEB安全入门 蛙蛙推荐:五分钟搞定网站前端性能优化 蛙蛙推荐:AngularJS学习笔记 蛙蛙推荐:Backbone和seajs搭配最佳实践探讨 蛙蛙推荐:让SecureCRT好使起来 蛙蛙推荐:笨办法提高代码质量 蛙蛙推荐:一个程序员2012年技术学习总结 时髦的互联网公司都在用什么技术? 蛙蛙推荐:如何编写高质量的python程序 蛙蛙推荐:第一堂编程课提纲
蛙蛙推荐:如何实时监控MySql状态
蛙蛙王子 · 2013-08-07 · via 博客园 - 蛙蛙王子

大多网站的性能瓶颈都会出在数据库上,所以想把Mysql监控起来,就搜索了下相关资料。

后来和同事讨论了下cacti和nagios有些老套和过时,graphite比较时尚,然后就搜了下相关的资料,最后搞出来了,效果如下

可以实时查看mysql打开的table数,文件数,正在执行,已经创建,已经连接的线程数,锁,查询缓存,表扫描相关的计数器,以及已经完成的select,insert, delete, update的sql数等,总之Mysql的各种状态一览无余。

具体各个指标的意思参考如下链接:

http://lxneng.iteye.com/blog/451985

如果已经部署了graphite,再找一个收集mysql状态的agent就行了,如下。

https://github.com/serialx/mysql-statsd

安装运行很简单

# 下载
git clone https://github.com/serialx/mysql-statsd.git
cd mysql-statsd
# 安装依赖
pip install -rrequirements.txt
pip install twisted
# 配置mysql连接字符串,statsd收集器地址
vi config/example.ini
# 运行
python mysql-statsd.py --config config/example.ini

percona的这篇文章也不错,黑了cacti和nagios,并解释额为啥graphite+statsd比较时尚。