Giter VIP home page Giter VIP logo

mysql_perf_analyzer's Introduction

MySQL Performance Analyzer

MySQL Performance Analyzer is an open source project for MySQL performance monitoring and analysis. This repository includes two sub projects:

  • Java web application project myperf
  • Java web server jetty wrapper

Build

MySQL Performance Analyzer is a Java Maven project. JDK and Maven 3.0 or later are required to build it.

Although JDK 8 is specified in pom.xml, this project does not use Java 8 specific features, so the user can modify pom.xml files of the two sub projects to use different JDK version. For example, if the build host only has JDK 7, modify the file myperf/pom.xml, change the lines

  	<source>1.8</source>
	<target>1.8</target>

to

	<source>1.7</source>
	<target>1.7</target>

The build will create a zip file named as myperfserver-server.zip under directory perfJettyServer/target. To build it, at top level, run

  mvn clean package

Installation and Usage Instructions

  1. Requirement: Java JDK 8, or the one specified by in pom.xml if changed during build time.

  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.

    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.

  3. For a more formal installation, it is recommended to have a MySQL database server as back store to store the metrics. Otherwise, use the built-in derby db.

    • Create a database, for example, named as metrics, with the MySQL database server.
    • 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.
    • The above information will be required when you first login to the analyzer to setup metrics gathering.
  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

    • -f: config, configuration file path. If used, the values inside configuration file will be loaded first, but can be overwritten by command line agruments.
    • -j: jettyHome, leave it as it is
    • -p: http port to be used, 9092 by default
    • -w: war (web archive) file, has to be myperf.war
    • -k: working directory, if not specified, it will use ./work
    • -c: url context, default to /myperf, leave it as is.

    The following are the list allowed in configuration file, which uses Java property file format (name=value pairs)

    • jettyHome
    • useHttps: value yes/y/no/n/true/false
    • port
    • webcontextroot
    • workdir
    • logpath
    • warfile
    • certKeyStorePath
    • certKeyStorePassword

    To support https, SSL certificate should be provided (either self signed or signed by third party) and stored in Java keystore using Java keytool (see https://wiki.eclipse.org/Jetty/Howto/Configure_SSL). If encounter login issue when switch between SSL and non SSL, you have to remove the browser cookie originated from the server host this application, using any cookie tool provided by the browser.

    Modify java command path inside start_myperf.sh, if needed, for example, when there are multiple JDK packages installed.

  5. Start up:

       ./start_myperf.sh
    

    Check nohup.out and logs directory for any error logs.

  6. Shutdown:

       ./stop_myperf.sh
    
  7. First time Login and Setup

After startup, point your browser to http://your_host:9092/myperf (or the port number you changed). Or https://your_host:9092/myperf if https is correctly configured.

The initial login user and credential are myperf/change.

After login, you will be directed to setup page:

  • You can add an email address for notifications. The email uses OS "mailx" command.

  • Configure the metrics storage database, using the one that you created in the earlier steps.

    A metrics scan interval of 1 or 5 minutes should be good enough.

  • If use built-in derbydb, choose short retention days.

  • After configuration is done, you need to start the scanner ("Start Scanner" button on top of the page).

    Everytime you change the configuration, you need to restart the scanner.

  • If the scanner does not work as expected, restart the analyzer

       ./stop_myperf.sh
    

    then

       ./start_myperf.sh
    
  • If your SNMP uses non default community, or not version v2c, use "SNMP Settings" tab to configure SNMP. Currently only Linux based SNMP is supported. If your MySQL servers are not running on Linux, use "Alert Settings" tab to disable SNMP metrics polling.

  1. For each database server you want to monitor, you need to create a MySQL user with the following privileges:

    • process
    • replication client
    • show databases
    • show view
    • select on all (if you want to use it to check data dictionary or run explain plans)
  2. The analyzer relies on Linux SNMP to gather OS level data. Check snmpd service status.

  3. Hipchat integration: if you use hipchat for work related collaboration, you can create a hipchat room to receive alerts from MySQL Perf Analyzer. Check https://developer.atlassian.com/hipchat/tutorials/building-a-simple-add-on-using-a-wizard regarding how to setup hipchat integration. After you have hipchat notification URL and auth token, you can configure MySQL Perf Analyzer to send notification to your room, using Settings page.

Known Limitations

  1. SNMP is based on the Linux specification.
  2. Email notification uses Linux's "mailx" command.

License

This code licensed under the Apache license. See the LICENSE file for terms.

mysql_perf_analyzer's People

Contributors

ashwinnellore avatar jimbly avatar jlleitschuh avatar xrao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mysql_perf_analyzer's Issues

myperf won't start

myperf started absolutely fine day 1 but won't start anymore.

Error: There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (mmap) failed to map 2555904 bytes for committing reserved memory.

Server:
CentOS 6.7 64-bit
Xeon E5450
32GB RAM
Percona 5.6
JRE version: (8.0_51-b16) (build )
Java VM: OpenJDK 64-Bit Server VM (25.51-b03 mixed mode linux-amd64 compressed oops)

--------------- T H R E A D ---------------

Current thread (0x0000029610008800): JavaThread "Unknown thread" [_thread_in_vm, id=8769, stack(0x000002961805d000,0x000002961815e000)]

Stack: [0x000002961805d000,0x000002961815e000], sp=0x000002961815c6e0, free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

垃圾呀,下来都跑不了

Thu May 11 18:11:12 CST 2017 Usage: java -classpath ... com.yahoo.dba.tools.myperfserver.App -f config_file_path -j jettyhome -p port -c webcontextroot -k workingDir -l logpath -w war_file
Use configuration file: config_sample.properties
java.io.FileNotFoundException: myperf.pid (没有那个文件或目录)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at java.io.FileInputStream.(FileInputStream.java:93)
at java.io.FileReader.(FileReader.java:58)
at com.yahoo.dba.tools.myperfserver.App.getHistoryPid(App.java:468)
at com.yahoo.dba.tools.myperfserver.App.checksRunningOfAnotherServerInstance(App.java:111)
at com.yahoo.dba.tools.myperfserver.App.main(App.java:93)
Thu May 11 18:11:13 CST 2017 Create working dir at /usr/local/myperfserver/./work
Thu May 11 18:11:13 CST 2017 Use working directory /usr/local/myperfserver/./work
Thu May 11 18:11:13 CST 2017 Create log directory at /usr/local/myperfserver/./logs
Thu May 11 18:11:13 CST 2017 Use log directory /usr/local/myperfserver/./logs
Thu May 11 18:11:13 CST 2017 Use jetty home /home/xrao/mpa
Thu May 11 18:11:13 CST 2017 Cannot find war file at location /home/xrao/mpa/webapps/myperf.war
Server not started.
Thu May 11 18:11:43 CST 2017 Usage: java -classpath ... com.yahoo.dba.tools.myperfserver.App -f config_file_path -j jettyhome -p port -c webcontextroot -k workingDir -l logpath -w war_file
Use configuration file: config_sample.properties
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:542)
at java.lang.Integer.parseInt(Integer.java:615)
at com.yahoo.dba.tools.myperfserver.App.getHistoryPid(App.java:472)
at com.yahoo.dba.tools.myperfserver.App.checksRunningOfAnotherServerInstance(App.java:111)
at com.yahoo.dba.tools.myperfserver.App.main(App.java:93)
Thu May 11 18:11:43 CST 2017 Use working directory /usr/local/myperfserver/./work
Thu May 11 18:11:43 CST 2017 Use log directory /usr/local/myperfserver/./logs
Thu May 11 18:11:43 CST 2017 Use jetty home /home/xrao/mpa
Thu May 11 18:11:43 CST 2017 Cannot find war file at location /home/xrao/mpa/webapps/myperf.war
Server not started.

Not able to do clean package

Hi,
I tried to run the following statement:========================
echo $JAVA_HOME
/export/apps/jdk/JDK-1_8_0_40
cd mysql_perf_analyzer-master
/apache-maven-3.0.5/bin/mvn clean package

When I run as non-root user, I get below error message:=====================
Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

When I run as root, I get further but still error:===========================
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.yahoo.dba.perf:myperf:war:2.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 131, column 12
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.yahoo.dba.tools:myperfserver:jar:2.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 92, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 104, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] MySQL Performance Analyzer
[INFO] MySQL Database Performance Tool
[INFO] myperfserver
[INFO] MySQL Perf Analyzer
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MySQL Performance Analyzer 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ myperf-project ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MySQL Database Performance Tool 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ myperf ---
[INFO] Deleting /home/bxu/Downloads/mysql_perf_analyzer-master/myperf/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ myperf ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ myperf ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 106 source files to /home/bxu/Downloads/mysql_perf_analyzer-master/myperf/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] MySQL Performance Analyzer ........................ SUCCESS [0.175s]
[INFO] MySQL Database Performance Tool ................... FAILURE [1.286s]
[INFO] myperfserver ...................................... SKIPPED
[INFO] MySQL Perf Analyzer ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.590s
[INFO] Finished at: Wed Jun 24 10:01:00 PDT 2015
[INFO] Final Memory: 7M/359M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project myperf: Compilation failure -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :myperf

Please advice

Please explain what this tool is exactly

There is 0 information on the web about the tool.
Couldn't even find any slides or recording from the Percona conf.
README on github is just about installation.
What exactly is it analyzing? How can I determine if it is even useful?

run normal, access error

shell run output

2015-05-29 17:20:08.828:INFO:D:/ProgramFiles/Git/myperf:main: Initializing Spring FrameworkServlet 'dispatcher'
五月 29, 2015 5:20:09 下午 com.yahoo.dba.perf.myperf.meta.KeyTool maskFileReadonly
信息: Execute shell command to change file permission
2015-05-29 17:20:10.001:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@2778a6a{D:/ProgramFiles/Git/myperf,file:/E:/myperfserver-server/work/weba
p/,AVAILABLE}{.\webapps\myperf.war}
2015-05-29 17:20:10.017:INFO:oejs.ServerConnector:main: Started ServerConnector@89ce410{HTTP/1.1}{0.0.0.0:9092}
2015-05-29 17:20:10.018:INFO:oejs.Server:main: Started @2194ms
org.eclipse.jetty.server.Server@1f9907ee - STARTED
+= qtp1710951419{STARTED,8<=8<=200,i=3,q=0} - STARTED
| +- 10 qtp1710951419-10-selector-ServerConnectorManager@4316d666/0 RUNNABLE @ sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 11 qtp1710951419-11-selector-ServerConnectorManager@4316d666/3 RUNNABLE @ sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 12 qtp1710951419-12-selector-ServerConnectorManager@4316d666/2 RUNNABLE @ sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 13 qtp1710951419-13-selector-ServerConnectorManager@4316d666/1 RUNNABLE @ sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
| +- 14 qtp1710951419-14 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
| +- 15 qtp1710951419-15 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
| +- 16 qtp1710951419-16 TIMED_WAITING @ sun.misc.Unsafe.park(Native Method) IDLE
| +- 17 qtp1710951419-17-acceptor-0@7440dada-ServerConnector@89ce410{HTTP/1.1}{0.0.0.0:9092} RUNNABLE @ sun.nio.ch.ServerSocketChannelImpl.accept0(Native Me
hod)
+= ServerConnector@89ce410{HTTP/1.1}{0.0.0.0:9092} - STARTED
| +~ org.eclipse.jetty.server.Server@1f9907ee - STARTED
| +~ qtp1710951419{STARTED,8<=8<=200,i=3,q=0} - STARTED
| += org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@37c039d1 - STARTED
| +- org.eclipse.jetty.io.ArrayByteBufferPool@3927dd17
| += HttpConnectionFactory@68242e51{HTTP/1.1} - STARTED
| | +- HttpConfiguration@1f5cfd41{32768/8192,8192/8192,https://:0,[]}
| += org.eclipse.jetty.server.ServerConnector$ServerConnectorManager@4316d666 - STARTED
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@7381d4e0 keys=0 selected=0 id=0
| | | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:596)
| | | +- sun.nio.ch.WindowsSelectorImpl@676ef6f3 keys=0
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@26170092 keys=0 selected=0 id=1
| | | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:596)
| | | +- sun.nio.ch.WindowsSelectorImpl@30d73d83 keys=0
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@3077c82 keys=0 selected=0 id=2
| | | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:596)
| | | +- sun.nio.ch.WindowsSelectorImpl@4153abdb keys=0
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@5c37d85e keys=0 selected=0 id=3
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:596)
| | +- sun.nio.ch.WindowsSelectorImpl@424d4f5e keys=0
| +- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:9092]
| +- qtp1710951419-17-acceptor-0@7440dada-ServerConnector@89ce410{HTTP/1.1}{0.0.0.0:9092}
+= o.e.j.w.WebAppContext@2778a6a{D:/ProgramFiles/Git/myperf,file:/E:/myperfserver-server/work/webapp/,AVAILABLE}{.\webapps\myperf.war} - STARTED
| += org.eclipse.jetty.server.session.SessionHandler@53268e44 - STARTED
| | += org.eclipse.jetty.server.session.HashSessionManager@3f581b8c - STARTED
| | | +~ com.yahoo.dba.perf.myperf.springmvc.ResourceSessionListener@8463d02
| | | += org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@3b4f528c - STARTED
| | | +~ org.eclipse.jetty.server.session.HashSessionIdManager@54b483bf - STARTED
| | | +~ org.eclipse.jetty.security.SecurityHandler$1@17359c0b
| | += org.eclipse.jetty.security.ConstraintSecurityHandler@4097a214 - STARTED
| | +- org.eclipse.jetty.security.DefaultAuthenticatorFactory@2311f02d
| | += org.eclipse.jetty.servlet.ServletHandler@6eaf2c57 - STARTED
| | | += jsp@19c47==org.eclipse.jetty.jsp.JettyJspServlet,0,true - STARTED
| | | | +- fork=false
| | | | +- logVerbosityLevel=DEBUG
| | | | +- keepgenerated=true
| | | | +- scratchdir=E:\myperfserver-server\work\jsp
| | | | +- xpoweredBy=false
| | | | +- compilerSourceVM=1.7
| | | | +- compilerTargetVM=1.7
| | | | +- com.sun.appserv.jsp.classpath=E:\myperfserver-server\myperfserver-executable-jar-with-dependencies.jar;D:\ProgramFiles\Java\jdk1.7.0_75
jre\lib\ext\access-bridge-64.jar;D:\ProgramFiles\Java\jdk1.7.0_75\jre\lib\ext\dnsns.jar;D:\ProgramFiles\Java\jdk1.7.0_75\jre\lib\ext\jaccess.jar;D:\ProgramFile
\Java\jdk1.7.0_75\jre\lib\ext\localedata.jar;D:\ProgramFiles\Java\jdk1.7.0_75\jre\lib\ext\sunec.jar;D:\ProgramFiles\Java\jdk1.7.0_75\jre\lib\ext\sunjce_provide
.jar;D:\ProgramFiles\Java\jdk1.7.0_75\jre\lib\ext\sunmscapi.jar;D:\ProgramFiles\Java\jdk1.7.0_75\jre\lib\ext\zipfs.jar
| | | +- [.jsp]=>jsp
| | | += org.eclipse.jetty.servlet.ListenerHolder@2e883c86 - STARTED
| | | += org.eclipse.jetty.servlet.ListenerHolder@723d9947 - STARTED
| | | += default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true - STARTED
| | | | +- maxCacheSize=256000000
| | | | +- etags=false
| | | | +- dirAllowed=true
| | | | +- gzip=false
| | | | +- maxCachedFileSize=200000000
| | | | +- redirectWelcome=false
| | | | +- acceptRanges=true
| | | | +- welcomeServlets=false
| | | | +- aliases=false
| | | | +- useFileMappedBuffer=true
| | | | +- maxCachedFiles=2048
| | | +- [/]=>default
| | | +- [
.jsp, .jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp
| | | += org.eclipse.jetty.servlet.ListenerHolder@2a1a3ee9 - STARTED
| | | += sitemesh - STARTED
| | | += GzipFilter - STARTED
| | | | +- mimeTypes=application/json
| | | += dispatcher@b7ba1aa7==org.springframework.web.servlet.DispatcherServlet,1,true - STARTED
| | | +- [
.jsp]/[]==0=>sitemesh
| | | +- [.htm]/[]==0=>sitemesh
| | | +- [
.html]/[]==0=>GzipFilter
| | | +- [.json]=>dispatcher
| | | +- [
.htm]=>dispatcher
| | | +- [.html]=>dispatcher
| | | +- [
.html/]=>dispatcher
| | |
| | +> null
| | +> null
| | +> null
| | +> []
| | +> /={TRACE.omission={RoleInfo[],None}, TRACE={RoleInfo,F,C[],None}}
| += org.eclipse.jetty.servlet.ErrorPageErrorHandler@21184897 - STARTED
| += org.eclipse.jetty.annotations.ServletContainerInitializersStarter@4145c27a - STARTED
| |
| +> WebAppClassLoader=MySQL Database Performance Tool@500bb303
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/classes/
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/aopalliance-1.0.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/commons-logging-1.1.3.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/derby-10.8.1.2.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/javax.json-1.0.4.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/javax.json-api-1.0.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/jetty-continuation-9.2.7.v20150116.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/jetty-http-9.2.7.v20150116.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/jetty-io-9.2.7.v20150116.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/jetty-servlets-9.2.7.v20150116.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/jetty-util-9.2.7.v20150116.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/jstl-1.2.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/log4j-1.2.9.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/mysql-connector-java-5.1.34.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/sitemesh-2.4.2.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/snmp4j-1.10.1.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/spring-aop-3.2.9.RELEASE.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/spring-beans-3.2.9.RELEASE.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/spring-context-3.2.9.RELEASE.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/spring-core-3.2.9.RELEASE.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/spring-expression-3.2.9.RELEASE.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/spring-web-3.2.9.RELEASE.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/spring-webmvc-3.2.9.RELEASE.jar
| | +- file:/E:/myperfserver-server/work/webapp/WEB-INF/lib/standard-1.1.2.jar
| | +- sun.misc.Launcher$AppClassLoader@1ebdff3b
| | +- file:/E:/myperfserver-server/myperfserver-executable-jar-with-dependencies.jar
| | +- sun.misc.Launcher$ExtClassLoader@4bbf8a41
| +> org.eclipse.jetty.containerInitializers=[ContainerInitializer{org.eclipse.jetty.apache.jsp.JettyJasperInitializer,interested=[],applicable=[],annotated
[]}]
| +> javax.servlet.context.tempdir=E:\myperfserver-server\work
| +> org.apache.catalina.jsp_classpath=E:\myperfserver-server\work\webapp\WEB-INF\classes;E:\myperfserver-server\work\webapp\WEB-INF\lib\aopalliance-1.0.jar
E:\myperfserver-server\work\webapp\WEB-INF\lib\commons-logging-1.1.3.jar;E:\myperfserver-server\work\webapp\WEB-INF\lib\derby-10.8.1.2.jar;E:\myperfserver-serv
r\work\webapp\WEB-INF\lib\javax.json-1.0.4.jar;E:\myperfserver-server\work\webapp\WEB-INF\lib\javax.json-api-1.0.jar;E:\myperfserver-server\work\webapp\WEB-INF
lib\jetty-continuation-9.2.7.v20150116.jar;E:\myperfserver-server\work\webapp\WEB-INF\lib\jetty-http-9.2.7.v20150116.jar;E:\myperfserver-server\work\webapp\WEB
INF\lib\jetty-io-9.2.7.v20150116.jar;E:\myperfserver-server\work\webapp\WEB-INF\lib\jetty-servlets-9.2.7.v20150116.jar;E:\myperfserver-server\work\webapp\WEB-I
F\lib\jetty-util-9.2.7.v20150116.jar;E:\myperfserver-server\work\webapp\WEB-INF\lib\jstl-1.2.jar;E:\myperfserver-server\work\webapp\WEB-INF\lib\log4j-1.2.9.jar
E:\myperfserver-server\work\webapp\WEB-INF\lib\mysql-connector-java-5.1.34.jar;E:\myperfserver-server\work\webapp\WEB-INF\lib\sitemesh-2.4.2.jar;E:\myperfserve
-server\work\webapp\WEB-INF\lib\snmp4j-1.10.1.jar;E:\myperfserver-server\work\webapp\WEB-INF\lib\spring-aop-3.2.9.RELEASE.jar;E:\myperfserver-server\work\webap
\WEB-INF\lib\spring-beans-3.2.9.RELEASE.jar;E:\myperfserver-server\work\webapp\WEB-INF\lib\spring-context-3.2.9.RELEASE.jar;E:\myperfserver-server\work\webapp
EB-INF\lib\spring-core-3.2.9.RELEASE.jar;E:\myperfserver-server\work\webapp\WEB-INF\lib\spring-expression-3.2.9.RELEASE.jar;E:\myperfserver-server\work\webapp
EB-INF\lib\spring-web-3.2.9.RELEASE.jar;E:\myperfserver-server\work\webapp\WEB-INF\lib\spring-webmvc-3.2.9.RELEASE.jar;E:\myperfserver-server\work\webapp\WEB-I
F\lib\standard-1.1.2.jar
| +> org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern=.
/[^/]servlet-api-[^/].jar$|./javax.servlet.jsp.jstl-..jar$|._/._taglibs.*.jar$
| +> org.eclipse.jetty.server.Executor=qtp1710951419{STARTED,8<=8<=200,i=3,q=0}
| +> org.apache.tomcat.InstanceManager=org.apache.tomcat.SimpleInstanceManager@7b4dafd8
| +> org.springframework.web.context.support.ServletContextScope=org.springframework.web.context.support.ServletContextScope@2953cd26
| +> org.apache.jasper.compiler.TldCache=org.apache.jasper.compiler.TldCache@3cc18efc
| +> org.springframework.web.servlet.FrameworkServlet.CONTEXT.dispatcher=WebApplicationContext for namespace 'dispatcher-servlet': startup date [Fri May 29
7:20:08 CST 2015]; root of context hierarchy
+- {}
+- {}
+- {}
+= org.eclipse.jetty.server.session.HashSessionIdManager@54b483bf - STARTED
|
+> sun.misc.Launcher$AppClassLoader@1ebdff3b
+- file:/E:/myperfserver-server/myperfserver-executable-jar-with-dependencies.jar
+- sun.misc.Launcher$ExtClassLoader@4bbf8a41

Fri May 29 17:20:10 CST 2015 Server URI: http://localhost:9092/

access in the browser, reported 404

http://localhost:9092/myperf

Reflective xss vulnerability

The parameter in the request was received at the seventh line in the dbsearch.jsp file and output directly in the page, resulting in a reflective xss vulnerability.
图片

SSH Tunneling

I am trying to connect to DB using SSH Tunneling.
However, there is an error, as shown below.

Action : Add a DB Server
Group Name : local
Host Name : 192.168.56.161
Port Number : 3306
Database Name : information_schema
SSH Tunneling? YES
Local Host Name : 192.168.56.161
Local Port : 22
Add DB Credentail? YES
DB User Name : admin
DB Password : •••••
Retype DB Password : •••••
Test Connection? YES

RESULT### -> Connection test to jdbc:mysql://192.168.56.161:22/information_schema failed: Packet for query is too large (4739923 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable

What's the problem?

LOG

Sep 05, 2016 6:00:18 PM com.yahoo.dba.perf.myperf.springmvc.DbController handleRequestImpl
INFO: action: 2, db [local,192.168.56.161,0,0,3306,information_schema, ssh: true,192.168.56.161,22,virtual:false,admin], by user myperf
Sep 05, 2016 6:00:18 PM com.yahoo.dba.perf.myperf.common.DBUtils testConnection
INFO: Test connection to ([local,192.168.56.161,0,0,3306,information_schema, ssh: true,192.168.56.161,22,virtual:false,admin]): jdbc:mysql://192.168.56.161:22/information_schema
Sep 05, 2016 6:00:18 PM com.yahoo.dba.perf.myperf.common.DBUtils testConnection
SEVERE: Exception
com.mysql.jdbc.PacketTooBigException: Packet for query is too large (4739923 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:569)

API to add servers?

Hi,

is there an API or command line that can be used to automatically add/discover hosts?

Invalid user name or password.

Hi,

where is "The initial login user and credential are myperf/change."
i've not see the credential file.

http://web01:9092/myperf/signin.htm
Login Failed:
Invalid user name or password.

need ur help.
Thanks

I'm running:

  1. OS
    root@web01:/var/www# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04.2 LTS
    Release: 14.04
    Codename: trusty
  2. MySQL
    Your MySQL connection id is 54
    Server version: 5.6.24-72.2 Percona Server (GPL), Release 72.2, Revision 8d0f85b
  3. TOOLs
    . ij version 10.10
    . derby-tools 10.10.1.1-1 all Apache Derby Tools
    . openjdk-7-jdk:amd64 7u79-2.5.5-0ubuntu0.14.04.2 amd64 OpenJDK Development Kit (JDK)
    . maven 3.0.5-1 all Java software project management and comprehension tool
    . mailx (GNU Mailutils) 2.99.98

I've created:
. Create a database to store metrics. CREATE DATABASE my_metrics;
. Create a MySQL user to access the metrics database GRANT ALL PRIVILEGES ON my_metrics.* to 'metricsuser'@'localhost' identified by 'metricsuserpassword';

+--------------------------------------------------------------------------------------------------------------------+
| Grants for metricsuser@localhost |
+--------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON . TO 'metricsuser'@'localhost' IDENTIFIED BY PASSWORD 'C658BF6B3A41AC470A51510B3240D999D2905845' |
| GRANT ALL PRIVILEGES ON my_metrics.
TO 'metricsuser'@'localhost' |
+--------------------------------------------------------------------------------------------------------------------+

NOHUP.out log info:

root@web01:/var/www# tailf nohup.out
+- {}
+- {}
+- {}
+= org.eclipse.jetty.server.session.HashSessionIdManager@3a754386 - STARTED
|
+> sun.misc.Launcher$AppClassLoader@6132b73b
+- file:/var/www/myperfserver-executable-jar-with-dependencies.jar
+- sun.misc.Launcher$ExtClassLoader@489bb457

Sat May 30 09:19:30 UTC 2015 Server URI: http://localhost:9092/
May 30, 2015 9:20:54 AM com.yahoo.dba.perf.myperf.meta.MetaDB getConnection
SEVERE: Exception
java.sql.SQLNonTransientConnectionException: Connection authentication failure occurred. Reason: Invalid authentication..
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.checkUserCredentials(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection30.(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection40.(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)

snapshot2

Can't store port number larger than 32767 when using built-in derby db

I inputted my database information in myperf/db.htm, HostName = 192.168.198.214 and Port = 32768.
After submit, logs/myperf.log.0 says

May 22, 2015 7:13:34 PM com.yahoo.dba.perf.myperf.metrics.MetricsDbBase upsertDBInfo
INFO: Store or update db [56,192.168.198.214,0,0,32768,information_schema, ssh: false,localhost,null,virtual:false,]

That seem ok, but next log says

May 22, 2015 7:13:45 PM com.yahoo.dba.perf.myperf.process.MetricScannerRunner tryConnect
WARNING: Failed second attempt to connect to [56,192.168.198.214,1,0,null,information_schema, ssh: false,localhost,null,virtual:false,null]

MetricScannerRunner tried to connect port "null".

I confirmed port number which is less equal than 32767, MetricScannerRunner handles port number correctly.

Db details are not properly saved when Test Connection is checked

Hi,

When adding new database and if the test connection is checked in, it adds the server to the list but with incorrect information and when i try to connect, it throws error as I can see db credentials are not stored properly. by removing checkbox its working properly.

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.