当前位置: 首页 > news >正文

网站建设与网页设计制作书籍/合肥网络推广软件系统

网站建设与网页设计制作书籍,合肥网络推广软件系统,如何做自己的播报网站,做物流的网站都有什么风险安装mysql之后,需要对mysql服务进行监控。nagios开源自带的check_mysql 对 mysql 的slave 机监控倒是不错。但是对数据库主机监控就略显不足了。使用一个监控插件:check_mysql_health下载和使用方法见:http://exchange.nagios.org/directory/…

安装mysql之后,需要对mysql服务进行监控。

nagios开源自带的check_mysql 对 mysql 的slave 机监控倒是不错。但是对数据库主机监控就略显不足了。

使用一个监控插件:check_mysql_health

下载和使用方法见:

http://exchange.nagios.org/directory/MySQL/check_mysql_health/details

具体监控:

对于slave 机 ,使用nagios 自带的 check_mysql 监控

command[check_mysql_slave]=/usr/local/nagios/libexec/check_mysql -H localhost -s /tmp/mysql.sock -uroot-pxxx-S -w 1 -c 3

其中用户和密码有可能会更改。延迟1秒警告,延迟3秒报警。

check_mysql_health 监控mysql master 服务器

/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是否可以链接查询)

举例:

nrpe.cfg:

command[check_mysql_health]=/usr/local/nagios/libexec/custom/check_mysql_health --hostname localhost --socket /tmp/mysql.sock --usernamexxxxx--passwordxxxxx--mode $ARG1$ --warning $ARG2$ --critical $ARG3$

xxx.cfg:

define service{

use                     xxxxxx

host_name               xxxxxx

service_description     mysql数据库连接数

check_command           check_nrpe_args!check_mysql_health!threads-connected!80!120

}

define service{

use                     xxxxx

host_name               xxxxx

service_description     mysql数据库innodb缓存命中

check_command           check_nrpe_args!check_mysql_health!bufferpool-hitrate

}

define service{

use                     xxxxx

host_name               xxxxx

service_description     mysql数据库innodb缓冲池等待清理的页

check_command           check_nrpe_args!check_mysql_health!bufferpool-wait-free

}

define service{

use                     xxxxx

host_name               xxxxx

service_description     mysql数据库innodblog写入等待时间

check_command           check_nrpe_args!check_mysql_health!log-waits

}

define service{

use                     xxxxx

host_name               xxxxx

service_description     mysql数据库锁表率

check_command           check_nrpe_args!check_mysql_health!table-lock-contention

}

define service{

use                     xxxxx

host_name               xxxxx

service_description     mysql数据库打开文件数

check_command           check_nrpe_args!check_mysql_health!open-files!80!90

}

define service{

use                     xxxxx

host_name               xxxxx

service_description     mysql数据库慢查询率

check_command           check_nrpe_args!check_mysql_health!slow-queries!5!10

}

搞定。

PS:对 warnging 和 critical 的值 :  10 就是 大于10%报警, 10: 就是小于10%报警, 不填就是默认的数值。

mode 一个语句只能一个,

--mode xxx1  xxx2    : xxx1 生效

--mode xxx1  --mode xxx2  : xxx2 生效

http://www.jmfq.cn/news/5238505.html

相关文章:

  • 购物网站怎么做SEO/品牌营销策划怎么写
  • 企业网站建设规划的基本原则有哪些/搜索百度一下
  • wordpress+显示异常/东莞seo建站投放
  • 江西网站建设费用/人员优化方案
  • 做网站要求什么软件/品牌推广与传播方案
  • 网页制作与网站建设宝典pdf/大型网站建设
  • 无代码网站开发/百度推广运营这个工作好做吗
  • 网站建设预算明细/百度小程序入口
  • 沈阳做网站最好的公司/经典软文案例
  • 全网视频合集网站建设/如何推广品牌
  • 做五金有哪些网站推广/广告设计与制作需要学什么
  • 做网站有多赚钱/站长之家查询工具
  • 长春制作门户网站的公司/网站推广软件免费版
  • 付费推广方式有哪些/长沙seo优化推荐
  • 肇庆企业免费建站/推广发帖网站
  • 做网站的图片分类/seo排名资源
  • c 做网站怎么显示歌词/产品推广宣传方案
  • 做网站页面怎么做/seo排名优化工具
  • 苹果做封面下载网站/seo顾问服务 品达优化
  • 大型网站设计公司/哪里有永久免费建站
  • 做网站要学哪些/seo优化关键词放多少合适
  • 外贸专业网站制作/网络软文案例
  • 好看的网站颜色搭配/爱站网络挖掘词
  • 汽车app网站建设/云搜索神器
  • 网站开发工具安卓版/sem数据分析
  • 动态网站开发与全程实例/优化网站教程
  • 教学网站/抖音关键词排名
  • 做合法的海外购网站需要什么手续/广州网站排名优化公司
  • 设置本机外网ip做网站/百度关键词指数查询
  • 湖南的商城网站建设/专门开发小程序的公司