Day Rabbit (Lepus) database monitoring System rapid installation and deployment

Source: Internet
Author: User
Tags administrator password

Day Rabbit (Lepus) database monitoring System Installation

Actual combat

Part1: written in the first

Lepus installation needs lamp environment, lamp environment installation personally think more laborious, xampp one key deployment lamp environment worry and effort, Lepus official website manual also recommended xampp way to install, Lepus is also in XAMPP research and development, crossing network installation manual, Watched for a long while did not succeed, after days of fighting, and finally realize lepus fast, light weight deployment, and can be monitored with IE browser.

Note that XAMPP will install apache,mysql,php, so to install in a clean environment, so as not to install two MySQL, two MySQL is also possible, I am here is clean environment.

Overall environment:

192.168.1.250 HE3 Monitoring Machine

192.168.1.248 HE1 master Monitored machine

192.168.1.249 HE2 from the monitored machine

Part2: LNMP Environment Construction

Installing XAMPP

Xampp:https://www.apachefriends.org/download.html

Note Your version number, the higher version of XAMPP may not be Mysql but MariaDB

[Email protected]]# chmod +x Xampp-linux-x64-1.8.2-5-installer.run

[Email protected]]#./xampp-linux-x64-1.8.2-5-installer.run

[[Email protected]]#/opt/lampp/lampp Start

[[email protected] home] #vi/etc/profile additional environment variables

Export path= $PATH:/opt/lampp/bin/

Export Ld_library_path= $LD _library_path:/opt/lampp/lib

[[email protected]] #source/etc/profile

Part3: Installing Lepus

Download Mysqldb-python.zip is required to monitor MySQL after Lepus installation

[[email protected] home] #wget Http://cdn.lepus.cc/cdncache/software/MySQLdb-python.zip

If you can't download it, I uploaded it in the last attachment of this article

[[email protected] home] #unzip Mysqldb-python.zip

[Email protected] home]# CD mysqldb1-master/

[Email protected]]# which mysql_config

/opt/lampp/bin/mysql_config

[Email protected]]# VI site.cfg

mysql_config=/opt/lampp/bin/mysql_config

[[Email protected]~] #yum install gcc libffi-devel python-devel openssl-devel

[Email protected]~]# yum Install URPMI xterm

[[Email protected]]# python setup.py build

[[Email protected]]# python setup.py Install

Note: Lepus installation process If the error, according to the error information to operate such as

[Email protected] lepus]# ln-s/usr/lib64/libssl.so.1.0.1e/usr/lib64/libssl.so.1.0.0

[Email protected] lepus]# ln-s/usr/lib64/libcrypto.so.1.0.1e/usr/lib64/libcrypto.so.1.0.0

Lepus installation collector (Lepus download)

[[email protected] home] #unzip Lepus3.7.zip

PART4: Database Configuration

Monitoring Library

Mysql> CREATE DATABASE Lepus default character set UTF8;

Mysql>grant select,insert,update,delete,create on lepus.* to ' lepus_user ' @ '% ' identified by ' MANAGER ';

mysql> flush Privileges;

[Email protected]_v3.7]# mysql-uroot-p Lepus < Sql/lepus_table.sql

[Email protected]_v3.7]# mysql-uroot-p Lepus < Sql/lepus_data.sql

Mysql>use Lepus

Mysql>alter table mysql_status Modify column max_connect_errors bigint (18);

Mysql>alter table mysql_status_history Modify column max_connect_errors bigint (18);

Monitored library he1,he2 only need to create Lepus_monitor account

Mysql> Grant Select,super,process,reload,show databases,replication Client on * * to ' lepus_monitor ' @ '% ' identified By ' MANAGER ';

mysql> flush Privileges;

Part5: Lepus configuration

[[Email protected]_v3.7]# CD python/

[[email protected] python] #chmod +x install.sh

[Email protected] python]#./install.sh

[[email protected] python] #vi/usr/local/lepus/etc/config.ini

123456 [monitor_server]host="192.168.1.250"port=3306user="lepus_user"passwd="MANAGER"dbname="lepus"

[Email protected]_v3.7]# cp-r php/*/opt/lampp/htdocs/

[[Email protected]_v3.7]# vi/opt/lampp/htdocs/application/config/database.php

123456 $db[‘default‘][‘hostname‘]= ‘192.168.1.250‘;$db[‘default‘][‘port‘]     = ‘3306‘;$db[‘default‘][‘username‘]= ‘lepus_user‘;$db[‘default‘][‘password‘]= ‘MANAGER‘;$db[‘default‘][‘database‘]= ‘lepus‘;$db[‘default‘][‘dbdriver‘]= ‘mysql‘;

[[Email protected]_v3.7]# cd/usr/local/lepus/

[[email protected] Lepus] #lepus start

Nohup:appendingoutput to ' nohup.out '

Lepus server startsuccess!

Have a question to look at the log

[Email protected] ~]# tail-f/usr/local/lepus/nohup.out

[Email protected] ~]# tail-f/usr/local/lepus/logs/lepus.log

[[Email protected]~]# vi/opt/lampp/etc/extra/httpd-vhosts.conf

Delete the original, instead

12345678910111213 <VirtualHost*:80>    AddDefaultCharset UTF-8    DocumentRoot "/opt/lampp/htdocs"    ServerName mysqlmtop1.ikongjian.com    <Directory"/opt/lampp/htdocs">        Options FollowSymLinks        AllowOverride All        Order allow,deny        Allow from All    </Directory>    ErrorLog"|/usr/local/apache/bin/rotatelogs /home/logs/apache/php_%Y%m%d_error.log86400 480"    CustomLog"|/usr/local/apache/bin/rotatelogs /home/logs/apache/php_%Y%m%d_access.log86400 480"common</VirtualHost>

Part6: Linux Department Unified Configuration

[[Email protected]~]# vi/etc/hosts

127.0.0.1 localhost Localhost.localdomain

:: 1 Localhost6 localhost6.localdomain6

192.168.1.248 HE1

192.168.1.249 HE2

192.168.1.250 HE3 mysqlmtop1.ikongjian.com

192.168.1.251 HE4

You can log into the system by opening the monitoring interface via the browser input mysqlmtop1.ikongjian.com. Default Administrator account password admin/lepusadmin after login, please modify the administrator password to increase the normal account.

Let Xampp boot up automatically

sudo ln-s/opt/lampp/lampp/etc/init.d/lampp

sudo chkconfig--add lampp

Part7: Windows System Configuration

To edit the hosts in Windows

C:\Windows\System32\drivers\etc

Add to

192.168.1.250 mysqlmtop1.ikongjian.com

You can do it in IE browser.

XAMPP 's help document can be consulted

Https://www.apachefriends.org/faq_linux.html

Lepus Official Installation manual

Http://www.lepus.cc/manual/index

BUG FIX

---------------------Redis----------------------

[[email protected] Lepus] #vi check_redis.py

148
149 except Exception, E:
logger_msg= "Check Redis%s:%s:%s"% (host,port,e)
151 #logger. Warning (logger_msg)
152
153 Try:
154 connect=0
155 sql= "INSERT into Redis_status (server_id,host,port,tags,connect) values (% s,%s,%s,%s,%s)"

151 lines of comments out to solve the redis can't monitor slave bug

--------------------MySQL Replication monitoring diagram Exception--------------------

Graphics cannot be viewed---mysql replication monitoring

VI /opt/lampp/htdocs/application/controllers/lp_mysql.php

337 Line, remove ' mysql/replication ', change to Parent::check_privilege ();

Originally for parent::check_privilege (' mysql/replication ');

--- fix mysql copy chart time offset results in inaccurate data

Impact: Line chart time offset

FIX: Modify vi /opt/lampp/htdocs/application/controllers/lp_mysql.php

352 Find the $chart of the Public Function replication () _reslut[$i [' Delay ']= $dbdata [' delay ']and fix it as:

$chart _reslut[$i [' delay '] =!empty ($dbdata [' delay '])? $dbdata [' delay ']: 0;

--- repair mysql5.7 replication Monitoring No data

mysql> set global show_compatibility_56=on;

----------------------------nginx.conf-------------------------

Default with Nginx Run Web console will have a problem, need to add a rewrite
Location/{if (!-e $request _filename) {rewrite ^ (. *) $/index.php?s=$1 last;break;}}



After joining, still reported File not found .... Error, can you send a normal lepus,nginx.conf configuration file under Nginx, share the next

@: reply

vijay2015 @: 1022xiyang2015Years04Month28Day09:29:16#
After I've added this,OkThe configuration is as follows:

server {
Listen 8001;
server_name Lepus;

Location/{
if (!-e $request _filename)
{
Rewrite ^ (. *) $/index.php?s=$1 last;
Break
}
root/usr/local/www;
Index index.php index.html index.htm;
}
Location ~ \.php$ {
root/usr/local/www;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param script_filename $document _root$fastcgi_script_name;
Include Fastcgi_params;
}

}

This article is from the "He Lei Technology Blog" blog, make sure to keep this source http://suifu.blog.51cto.com/9167728/1770493

Day Rabbit (Lepus) database monitoring System rapid installation and deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.