You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-34
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@ MySQL Performance Analyzer
3
3
4
4
MySQL Performance Analyzer is an open source project for MySQL performance monitoring and analysis.
5
5
This repository includes two sub projects:
6
-
Java web application project myperf
7
-
Java web server jetty wrapper
6
+
*Java web application project myperf
7
+
*Java web server jetty wrapper
8
8
9
9
Build
10
10
------
@@ -33,64 +33,81 @@ Installation and Usage Instructions
33
33
1. Requirement: Java JDK 8, or the one specified by in pom.xml if changed during build time.
34
34
35
35
2. Unzip myperfserver-server.zip to the desired installation directory. If you intend to install on Windows host, please review two shell scripts and create Windows equivalent.
36
+
37
+
For future updates, most of the time you only need to copy myperf/target/myperf.war to webapps directory under the installation directory, then restart.
36
38
37
-
3. For a more formal installation, it is recommended to have a MySQL database server to store the metrics.
39
+
3. For a more formal installation, it is recommended to have a MySQL database server as back store to store the metrics.
38
40
Otherwise, use the built-in derby db.
39
-
a. Create a database, for example, named as metrics, with the MySQL database server.
40
-
b. Create a MySQL user (for example, 'metrics'@'my_host' -> here my_host is the machine where you MySQL perf analyzer) with all privileges on above schema.
41
-
c. The above information will be required when you first login to the analyzer to setup metrics gathering.
41
+
42
+
* Create a database, for example, named as metrics, with the MySQL database server.
43
+
* Create a MySQL user (for example, 'metrics'@'my_host' -> here my_host is the machine where you MySQL perf analyzer) with all privileges on above schema.
44
+
* The above information will be required when you first login to the analyzer to setup metrics gathering.
42
45
43
46
4. Review script start_myperf.sh to see if you need to modify any command line settings. Usually, port number is the only one you need change
44
-
-j: jettyHome, leave it as it is
45
-
-p: http port to be used, 9092 by default
46
-
-w: war (web archive) file, has to be myperf.war
47
-
-k: working directory, if not specified, it will use ./work
48
-
-c: url context, default to /myperf, leave it as is.
47
+
*-j: jettyHome, leave it as it is
48
+
*-p: http port to be used, 9092 by default
49
+
*-w: war (web archive) file, has to be myperf.war
50
+
*-k: working directory, if not specified, it will use ./work
51
+
*-c: url context, default to /myperf, leave it as is.
49
52
50
-
Modify java command path inside start_myperf.sh, if needed.
53
+
Modify java command path inside start_myperf.sh, if needed, for example, when there are multiple JDK packages installed.
51
54
52
55
5. Start up:
53
-
./start_myperf.sh
56
+
```
57
+
./start_myperf.sh
58
+
```
54
59
Check nohup.out and logs directory for any error logs.
55
60
56
61
6. Shutdown:
57
-
./stop_myperf.sh
62
+
```
63
+
./stop_myperf.sh
64
+
```
58
65
59
66
7. First time Login and Setup
67
+
60
68
After startup, point your browser to http://your_host:9092/myperf (or the port number you changed).
69
+
61
70
The initial login user and credential are myperf/change.
62
71
63
-
After login, you will be directed to setup page:
72
+
After login, you will be directed to setup page:
64
73
65
-
You can add an email address for notifications. The email uses OS "mailx" command.
74
+
*You can add an email address for notifications. The email uses OS "mailx" command.
66
75
67
-
Configure the metrics storage database, using the one that you created in the earlier steps.
68
-
A metrics scan interval of 1 or 5 minutes should be good enough.
76
+
* Configure the metrics storage database, using the one that you created in the earlier steps.
77
+
78
+
A metrics scan interval of 1 or 5 minutes should be good enough.
69
79
70
-
If use built-in derbydb, choose short retention days.
80
+
*If use built-in derbydb, choose short retention days.
71
81
72
82
73
-
After configuration is done, you need to start the scanner ("Start Scanner" button on top of the page).
74
-
75
-
Everytime you change the configuration, you need to restart the scanner.
76
-
77
-
If the scanner does not work as expected, restart the analyzer
78
-
./stop_myperf.sh
79
-
then
80
-
./start_myperf.sh
81
-
83
+
* After configuration is done, you need to start the scanner ("Start Scanner" button on top of the page).
84
+
85
+
Everytime you change the configuration, you need to restart the scanner.
86
+
87
+
* If the scanner does not work as expected, restart the analyzer
88
+
```
89
+
./stop_myperf.sh
90
+
```
91
+
then
92
+
```
93
+
./start_myperf.sh
94
+
```
95
+
* If your SNMP uses non default community, or not version v2c, use "SNMP Settings" tab to configure SNMP.
96
+
Currently only Linux based SNMP is supported. If your MySQL servers are not running on Linux, use
97
+
"Alert Settings" tab to disable SNMP metrics polling.
98
+
82
99
8. For each database server you want to monitor, you need to create a MySQL user with the following privileges:
83
-
a. process
84
-
b. replication client
85
-
c. show databases
86
-
d. show view
87
-
e. select on all (if you want to use it to check data dictionary or run explain plans)
100
+
* process
101
+
* replication client
102
+
* show databases
103
+
* show view
104
+
* select on all (if you want to use it to check data dictionary or run explain plans)
88
105
89
106
9. The analyzer relies on Linux SNMP to gather OS level data. Check snmpd service status.
0 commit comments