当前位置:网站首页>Archery database audit platform deployment
Archery database audit platform deployment
2022-07-28 06:54:00 【opreator.ke】
One 【 Introduce 】
Official website :https://archerydms.com/
github:https://github.com/hhyo/Archery
Archery yes archer Branch project of , Located at SQL Audit query platform , Designed to improve DBA Work efficiency , Support multi database SQL Go online and check , At the same time, it supports rich MySQL Operation and maintenance functions , All functions are compatible with mobile phone operation .
Two 【 Deploy 】
download Releases file , Decompress and enter docker-compose Folder # start-up docker-compose -f docker-compose.yml up -d # Table structure initialization docker exec -ti archery /bin/bash cd /opt/archery source /opt/venv4archery/bin/activate python3 manage.py makemigrations sql python3 manage.py migrate # Data initialization python3 manage.py dbshell<sql/fixtures/auth_group.sql python3 manage.py dbshell<src/init_sql/mysql_slow_query_review.sql # Create administrative users python3 manage.py createsuperuser # Restart the service docker restart archery # Log viewing and troubleshooting docker logs archery -f --tail=10 logs/archery.log |
|---|
3、 ... and 【 Feature list 】

Four 【 Plug in processing 】 4.1 Database slow log plug-in The server builds the database mysql processing method :
Archery Cannot automatically collect slow queries , You need to deploy the script manually . according to github The documents on the are as follows :
1 Execute the script to create the table , stay archery The database creates two tables about collecting slow query information :mysql_slow_query_review and mysql_slow_query_review_history
Create database :
route :/opt/archery/src/init_sql/mysql_slow_query_review.sql
pt Tool script execution :
route :/opt/archery/src/script/analysis_slow_query.sh
Copy the script SQL, stay archery The associated mysql In the implementation of
2 Deploy to the target database, that is, the server that needs to view the slow log pt Tools .
install pt Tools
| download wget https://www.percona.com/downloads/percona-toolkit/3.0.12/binary/redhat/6/x86_64/percona-toolkit-3.0.12-1.el6.x86_64.rpm install yum install -y percona-toolkit-3.0.12-1.el6.x86_64.rpm The command defaults to /usr/bin/pt-query-digest Next |
|---|
Modify the script
#!/bin/bash # To configure Archery Database connection address # Slow log location of the analyzed instance , It is recommended to clean the log file regularly , Otherwise, the analysis efficiency will be affected #pt-query-digest Executable file path # Connection information of the analyzed instance # Get the last analysis time , Please delete during initialization last_analysis_time_$hostname file , All log data can be analyzed # Collect the logs if [[ $? -ne 0 ]]; then |
|---|
Adjust the timing task trigger pt Tools synchronized to archery
crontab -e
3.rds Database synchronization
3.1 Alibaba cloud officially provides docking , Just fill in ak/sk key that will do .
3.2 Other cloud databases , For example, Hua Weiyun / Tencent, cloud, etc. ,
Method 1: You can modify the source code yourself slowlog.py The corresponding sdk, Synchronize database slow logs .
Method 2: Get the slow log of Huawei cloud database api Interface , Get slow log file , Through PT Tools synchronized to archery.
边栏推荐
- Analysis of reentrantlock source code of AQS
- 单元测试框架Jest搭配TypeScript的安装与配置
- Question brushing record - linked list
- Teach you three steps to complete the construction of the test monitoring system hand in hand
- NFS shared storage service
- File operation in C language
- JS reverse question 100 - question 1
- Hdu-5805-nanoape loves sequence (thinking questions)
- iptables防火墙
- DNS domain name resolution service
猜你喜欢

技术分享 | 服务端接口自动化测试, Requests 库的这些功能你了解吗?

iptables防火墙

KVM热迁移

How about air conduction Bluetooth headset? It's the most worthwhile air conduction headset to start with

On cookies and session

网络——传输层(详细版)

软件开发中常见模型

Which is the best and most cost-effective air conduction headset recommended

Analysis of reentrantlock source code of AQS

MySQL master master
随机推荐
Hdu-5783 divide the sequence (greedy water question)
How to calculate the size of structure, segment and Consortium (common body)
What's a good gift for Tanabata? Niche and advanced product gift recommendation
Question brushing record -- binary tree
Which brand of air conduction earphones is good and highly praised
Mongodb quick start
什么是线性表?
Pku-2524-ubiquitous relations (parallel search template)
Yapi vulnerability hanging horse program chongfu.sh processing
DNS domain name resolution service
Analysis of the semaphore source code of AQS
ISO 3.0-server three power separation configuration
修复故障扇区
[c language] - step by step to achieve minesweeping games
Source code analysis of countdownlatch of AQS
How to store floating point data in memory
[realize the simple version of minesweeping games]
archery数据库审核平台部署
技术分享 | 接口自动化测试中,如何做断言验证?
iptables防火墙