日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

ZABBIX2.4.8监控 Windows Mysql数据库

發(fā)布時間:2023/12/4 数据库 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ZABBIX2.4.8监控 Windows Mysql数据库 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

2019獨角獸企業(yè)重金招聘Python工程師標準>>>

系統(tǒng)環(huán)境:

????? 操作系統(tǒng):Windows Server 2012

????? ZABBIX Server:2.4.8

????? IP地址:192.168.0.77

???? 模板腳本地址:http://pan.baidu.com/s/1eSDaiS6


ZABBIX客戶端操作

1、在zabbix.conf中添加以下字段信息? Include=c:\Program?Files\zabbix_agents\conf.d\*.conf?2、以下目錄中新增一個目錄和一個disk.conf文件 c:\Program?Files\zabbix_agents\conf.d\mysql.conf3、mysql.conf? UserParameter=mysql.status[*],?cscript?/nologo?D:\Zabbix_Monitor\Scripts\MysqlMonitoring\MySQL_Ext-Status_Script.vbs?$1 UserParameter=mysql.ping,?cscript?/nologo?D:\Zabbix_Monitor\Scripts\MysqlMonitoring\MySql_Ping.vbs?4、將網盤中的Zabbix_Monitor文件夾至D盤的根目錄,附MySQL_Ext-Status_Script.vbs、MySQL_Ping.vbs腳本信息4.1、MySQL_Ext-Status_Script.vbs Set?objFS?=?CreateObject("Scripting.FileSystemObject") Set?objArgs?=?WScript.Arguments str1?=?getCommandOutput("E:\MYOA\mysql5\bin\mysqladmin.exe?-uroot?-pmyoa888?--port=3336?extended-status") Arg?=?objArgs(0) str2?=?Split(str1,"|") For?i?=?LBound(str2)?to?UBound(str2) If?Trim(str2(i))?=?Arg?Then? WScript.Echo?TRIM(str2(i+1)) Exit?For End?If nextFunction?getCommandOutput(theCommand) Dim?objShell,?objCmdExec Set?objShell?=?CreateObject("WScript.Shell") Set?objCmdExec?=?objshell.exec(thecommand) getCommandOutput?=?objCmdExec.StdOut.ReadAll end?Function4.2、MySQL_Ping.vbs? Set?objFS?=?CreateObject("Scripting.FileSystemObject") Set?objArgs?=?WScript.Arguments str1?=?getCommandOutput("E:\MYOA\mysql5\bin\mysqladmin.exe?-uroot?-pmyoa888?--port=3336?ping") If?Instr(str1,"alive")?>?0?Then WScript.Echo?1 Else WScript.Echo?0 End?If Function?getCommandOutput(theCommand) Dim?objShell,?objCmdExec Set?objShell?=?CreateObject("WScript.Shell") Set?objCmdExec?=?objshell.exec(thecommand) getCommandOutput?=?objCmdExec.StdOut.ReadAll end?Function5、重啟ZABBIX?Agentd服務、服務端使用zabbix_get測試是是否能抓取到結果。? [root@localhost?~]#?zabbix_get?-s?192.168.0.77?-k?mysql.ping 1

附監(jiān)控狀態(tài)圖

轉載于:https://my.oschina.net/huangweibin/blog/665483

總結

以上是生活随笔為你收集整理的ZABBIX2.4.8监控 Windows Mysql数据库的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。