GithubHelp home page GithubHelp logo

yinluobing / mysql_grafana Goto Github PK

View Code? Open in Web Editor NEW

This project forked from why444216978/mysql_grafana

0.0 1.0 0.0 1.04 MB

PHP实现的MySQL监控组件,包含数据采集和web端可视化监控,可灵活扩展监控指标。

PHP 56.98% HTML 42.86% JavaScript 0.16%

mysql_grafana's Introduction

mysql_grafana

PHP实现的MySQL监控组件,包含数据采集和web端可视化监控,可灵活扩展监控指标。
PS:代码还在完善中,后续会进行封装,以及部分可配置化。


有疑问随时联系本人
QQ群:909211071
个人QQ:444216978
微信:AbleYu_

数据库:monitor

数据表:database.sql文件

修改 config.php 中的 status 和 variables_fields 监控指标字段

配置增长字段进行分钟减法计算

load_class.php 的 $diffFields 变量

插入监控实例(可多个)

INSERT INTO `monitor`.`instance_info`(`id`, `host`, `port`, `user`, `password`, `monitor`, `send_mail`, `send_mail_to_list`) VALUES (1, '127.0.0.1', 3306, 'root', '123456', 1, 1, '[email protected]');

修改数据库连接

db_conn.php

配置ajax请求host

config.js

配置定时任务

crontab -e

* * * * * /usr/bin/php /Users/why/Desktop/php/mysql_grafana/save_status.php

修改展示页面请求url为自己的

查看数据

浏览器:http://localhost/mysql_grafana/index.html

监控图

https://github.com/why444216978/mysql_grafana/blob/master/threads_connected.png https://github.com/why444216978/mysql_grafana/blob/master/select.png

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.