linkedin / queryanalyzeragent Goto Github PK
View Code? Open in Web Editor NEWAnalyze MySQL queries with negligible overhead
License: BSD 2-Clause "Simplified" License
Analyze MySQL queries with negligible overhead
License: BSD 2-Clause "Simplified" License
Is there any way to deploy this to AWS?
I mean, my database is an RDS instance. I can't install it on that host, since it's a managed service.
How do I monitor an RDS instance using this app?
I guess the UI developed by LinkedIn for this is not open source right?
Is there any open source UI for this project? Even a basic one?
Testing Query Analyzer over a Google Cloud compute instance , Debian Buster and mySQL 8
Running the tool always results in : ERROR: Failed to open device: : No such device exists (SIOCGIFHWADDR: No such device)
So I have mysql and the agent running on localhost.
I also have another mysql running in a virtual machine, that's the remote db.
The agent is running, and I'm generating mysql traffic using AB, making 1000 reqs. Yet, I can't see any queries captured. The logs shows only this:
2021-01-30 17:57:54
Number of queries more than Capture Length: 0
Number of aborted connections: 0
Number of access denied requests: 0
Length of Query Info Hashmap: 0
The agent produces no output.
I'm new to this tool. Shouldn't it capture all queries? The local mysql is v5.7.32 while the remote one is 8.x. Is this a problem?
My qan.toml:
[sniffer]
# Database type. As of now only MySQL is supported
Database = "MySQL"
# Port to sniff
ListenPort = 3306
# interface to listen on (ex: eth0, eth1, bond0 etc)
ListenInterface = "en0"
# The max payload of TCP is 64K, but it will be a big CPU overhead to capture 64K.
# The capture length can be reduced (most of the queries won't take full payload length) to suit your query length
CaptureLength = 8192
# You can get packets bigger than the capture length and logging the number of such packets helps us in tuning the capture length.
# You can also get number of aborted connections due to timeout, reset connections etc
# Print such instances every ReportStatsInterval seconds
ReportStatsInterval = 60
# Comma separated list of IPs to be ignored from sniffing
IgnoreIPs = ""
[qan-agent]
# Comma separated debug levels
# Example:
# DebugLevels = "2,3,4,5,9,10"
# 1 - Processed query info, this can be used if you do not send results to remote server
# 2 - Source, Query, Query Time
# 3 - Queries greater than capture length
# 4 - User and connection related information, memory related info
# 5 - MySQL packet info
# 6 - Query Response info
# 7 - Orphan packets garbage collection information
# 8 - Orphan packets garbage collection detailed information
# 9 - Access denied requests
# 10 - Processlist
DebugLevels = "1,2,3,4,5,6,7,8,9,10"
# If the query is bigger than MaxRequestLength, it will be ignored. Probably it is a huge insert
MaxRequestLength = 524288
# Maximum number of db connections. This decides the connection buffer for qan agent. Buffer will be set to 1.5 times the max connections. It is fine to have connections to db more than what is specified here.
MaxDBConnections = 1024
# Send the query report to remote server every ReportInterval seconds
ReportInterval = 20
# Log file to print
LogFile = "/var/log/qan.log"
[localDB]
# Some connections might have been established before the sniffer was started. It is not possbile to get those connection details like user and db. If enabled, agent connects to the local database, checks the processlist and gets the user and db info
# 0 - Do not check processlist
# 1 - Check processlist only once at startup
# 2 - Check processlist as and when required
Enabled = 0
# Username to connect to the local database
LocalUsername = "qan_ro"
# Password to connect to the local database
LocalPassword = "xxxx"
# Socket to connect to the local database
LocalSocket = "/var/lib/mysql/mysql.sock"
### Send the query reports to remote database server
[remoteDB]
Enabled = 1
# remote database hostname to send results to. If it is IPv6, enclose with [] example: [::1]
Hostname = "10.211.55.6"
# remote database port to send results to
Port = 3306
# remote database username to send results to
Username = "qan_rw"
# remote database password to send results to
Password = "Complex_P@ssw0rd"
# remote database name to send results to
DBName = "query_analyzer"
# Sample query is the query which took maximum time for that fingerprint.
# Sample query contains data. If you do not want to send data, disable this
IncludeSample = 1
# send the reports over SSL
# 0 - disabled
# 1 - enabled with skip verify
# 2 - self signed SSL certificates taken from Ca_cert, Client_cert, Client_key config
# 3 - SSL certificates taken from Ca_cert, Client_cert, Client_key config
SSLEnabled = 0
# SSL certificate details
Ca_cert = ""
Client_cert = ""
Client_key = ""
### post to remote API instead of remote database (not implemented yet)
[remoteAPI]
Enabled = 0
URL = "https://xxxx"
apikey = "xxxx"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.