open-falcon (Mysql監控)mymon安裝

原文鏈接:https://github.com/open-falcon/mymon

Introduction

mymon(MySQL-Monitor) -- MySQL數據庫運行狀態數據采集腳本,采集包括global status, global variables, slave status等。

Installation

#set $GOPATH and $GOROOT

mkdir -p$GOPATH/src/github.com/open-falcon

cd$GOPATH/src/github.com/open-falcon

git clone https://github.com/open-falcon/mymon.git

cd mymon

go get ./...

go build -o mymonecho'* * * * * cd $GOPATH/src/github.com/open-falcon/mymon && ./mymon -c etc/mon.cfg'>/etc/cron.d/mymon

Configuration

? ? [default]

? ? log_file=mymon.log # 日志路徑和文件名

? ? # Panic 0

? ? # Fatal 1

? ? # Error 2

? ? # Warn 3

? ? # Info 4

? ? # Debug 5

? ? log_level=4 # 日志級別

? ? falcon_client=http://127.0.0.1:1988/v1/push # falcon agent連接地址

? ? #自定義endpoint

? ? endpoint=127.0.0.1 #若不設置則使用OS的hostname

? ? [mysql]

? ? user=root # 數據庫用戶名

? ? password= # 數據庫密碼

? ? host=127.0.0.1 # 數據庫連接地址

? ? port=3306 # 數據庫端口

MySQL metrics

請參考./metrics.txt,其中的內容,僅供參考,根據MySQL的版本、配置不同,采集到的metrics也有差別。

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。