Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5272379
  • 博文数量: 1144
  • 博客积分: 11974
  • 博客等级: 上将
  • 技术积分: 12312
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-13 20:06
文章存档

2017年(2)

2016年(14)

2015年(10)

2014年(28)

2013年(23)

2012年(29)

2011年(53)

2010年(86)

2009年(83)

2008年(43)

2007年(153)

2006年(575)

2005年(45)

分类: Mysql/postgreSQL

2013-07-10 01:09:51

check_mysql_health 监控mysql 服务器


/usr/local/nagios/libexec/custom/check_mysql_health --hostname localhost --socket /tmp/mysql.sock --username root --password xxxxxx --mode xxxxx --warning xxxxx --criticalxxxxx


mode:
connection-time (Time to connect to the server)

uptime (Time the server is running)

threads-connected (Number of currently open connections)

threadcache-hitrate (线程缓存命中率)

slave-lag (Seconds behind master)

slave-io-running (Slave io running: Yes)

slave-sql-running (Slave sql running: Yes)

qcache-hitrate (查询命中率,如果这个值接近100%,说明服务器select的优化就越好)

qcache-lowmem-prunes (因为内存小,从内存删除缓存查询的数量,可以增大query_cache_size,减小lowmem,增加命中率的优化)

keycache-hitrate (MyISAM key 缓存命中率,如果命中率太低,增大key_buffer_size)

bufferpool-hitrate (InnoDB 缓冲池命中率)

bufferpool-wait-free (InnoDB 缓冲池等待清理的页面)

log-waits (InnoDB log 等待写入时间,如果这个等待时间太大,增大log缓冲池大小)

tablecache-hitrate (Table 缓存命中率)

table-lock-contention (Table 的lock率)

index-usage (索引使用率,越大说明索引越好,越小说明索引优化不充分)

tmp-disk-tables (临时表创建的数量)

slow-queries (慢查询占所有查询的比率,这个值如果很高说明mysql数据库优化不够)

long-running-procs (长期运行的进程)

cluster-ndbd-running (mysql集群监控)

sql (执行一个返回一个数字的SQL,检查mysql是否可以链接查询)

 

 

阅读(1697) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~