How to Install and Use JMonitoring Console
JMonitoring Console Installation Prerequisites
Install a Servlet container
You could use Tomcat or WebLogic.
The Servlet container is only use for the monitoring console, not for the monitoring agent.
Configure and deploy the JMonitoring Console
QQQ Redo all this page, and add the HOW TO configure the DataSource.
Configure the file administration_console.xml
TOMCAT_HOME/conf/Catalina/localhost/administration_console.xml
<Context path="/administration_console" > <Resource name="jdbc/jmonitoring" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/jmonitoring"> <parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter> <!-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. --> <parameter> <name>maxActive</name> <value>10</value> </parameter> <!-- Maximum number of idle dB connections to retain in pool. Set to -1 for no limit. See also the DBCP documentation on this and the minEvictableIdleTimeMillis configuration parameter. --> <parameter> <name>maxIdle</name> <value>3</value> </parameter> <!-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. --> <parameter> <name>maxWait</name> <value>10000</value> </parameter> <!-- SqlServerdB username and password for dB connections <parameter> <name>username</name> <value>jmonitoring_con</value> </parameter> <parameter> <name>password</name> <value>jmonitoring_con</value> </parameter> --> <!-- MySql --> <parameter> <name>username</name> <value>root</value> </parameter> <parameter> <name>password</name> <value>mysql</value> </parameter> <!--parameter> <name>username</name> <value>root</value> </parameter> <parameter> <name>password</name> <value>mysql</value> </parameter--> <!-- Class name for the old mm.mysql JDBC driver - uncomment this entry and comment next if you want to use this driver - we recommend using Connector/J though <parameter> <name>driverClassName</name> <value>org.gjt.mm.mysql.Driver</value> </parameter> --> <!-- Class name for the official MySQL Connector/J driver --> <parameter> <name>driverClassName</name> <value>com.mysql.jdbc.Driver</value> <!--value>net.sourceforge.jtds.jdbc.Driver</value--> </parameter> <!-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. --> <parameter> <name>url</name> <value>jdbc:mysql://localhost:3306/jmonitoring?autoReconnect=true</value> <!--value>jdbc:jtds:sqlserver://localhost/JMonitoringFred</value--> </parameter> </ResourceParams> </Context>
Configure the file jmonitoring.properties
jmonitoring.properties
#Class to use for logging MeasurePoint measurepoint.logger.class=org.jmonitoring.core.impl.AsynchroneJdbcLogger #Only for XmlFileLogger xml.logger.dir = d:/temp/log #Allow the logging of the parameters during the method calls log.parameter.defaultvalue = true #Date & Time configuration for user rendered format.ihm.date=dd/MM/yy format.ihm.time=HH:mm:ss #Server name server.name=Babasse # ThreadPool Size for AsynchroneLogger asynchronelogger.threadpool.size=5 ### Color (RGB) for GroupRendering #WHITE = 255, 255, 255 #LIGHT_GRAY = 192, 192, 192 #GRAY = 128, 128, 128 #DARK_GRAY = 64, 64, 64 #BLACK = 0, 0, 0 #RED = 255, 0, 0 #PINK = 255, 175, 175 #ORANGE = 255, 200, 0 #YELLOW = 255, 255, 0 #GREEN = 0, 255, 0 #MAGENTA = 255, 0, 255 #CYAN = 0, 255, 255 #BLUE = 0, 0, 255 #### group.color.Default=0, 255, 255 group.color.SQL=0, 0, 255 group.color.SomeNonStatics=0, 255, 0 group.color.SomeStatics=255, 0, 0
Install and configure the JDBC driver
Jdbc driver for MySql (if you are using MySql)
Download the MySql JdbcDriver.
Jdbc driver for SQL Server (if you are using SQL Server instead of MySQL, with NMonitoring for example)
- Add the jtds-1.2.jar JAR to Tomcat\Common\Lib
- Change the file Tomcat\webapps\administration_console\WEB-INF\classes\hibernate.cfg to something like that (change the url, username and password to your needs):
hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver hibernate.dialect=org.hibernate.dialect.SQLServerDialect hibernate.connection.url=jdbc:jtds:sqlserver://localhost:1433/jmonitoring hibernate.connection.username=jmonitoring hibernate.connection.password=jmonitoring hibernate.show_sql=true hibernate.jdbc.batch_size=30
Add other configuration file
You should have these files into your classpath:
- commons-logging.properties
- log4j.properties
Configure the runtime classpath
You should have these jars into your class path (and the above configuration files):
* jmonitoring/jars/core_monitoring-${monitoring.version}.jar
* jmonitoring/jars/sample_core-$${monitoring.version}.jar
* jmonitoring/jars/sample_aspects-$${monitoring.version}.jar
* concurrent/jars/concurrent-1.3.4.jar
* log4j/jars/log4j-1.2.8
* commons-logging/jars/commons-logging-1.0.4.jar
* commons-digester/jars/commons-digester-1.6.jar
* commons-beanutils/jars/commons-digester-1.7.0.jar
* commons-fileupload/jars/commons-fileupload-1.0.jar
* commons-validator/jars/commons-validator-1.1.4.jar
* aspectj/jars/aspectjrt-1.2.1.jar
* mysql/jars/mysql-connector-java-3.1.11-bin.jar
You can use Maven goals ou Ant task to your classpath, an example is provided there.
Use the sample to add flows into [Datastore]
- Open the sample sample_webapp.war
- Modify the configuration file jmonitoring.properties according to your environment
- Repackage and deploy the application into a Serlet container
- Call the URL _http://server/sample_webapp_
- Click on the link Build A Flow In the Database

- The result should be like that

- Now you can look at the console to see the flow
Using the console
You can see the screenshot of the application
Delete the flows
This fonction allow the deletion of all the flows of the database.
Flows search
todo
