An easy way to realize monitoring in existing or new Java based software projects. This monitoring solution reduces the complexity of software monitoring to a minimum. Developers have only to configure the Simple Monitoring Plugin in Maven project file (pom.xml). It automatically analyzes the control flow respectively data flow of your software logic and remembers the method calls and exceptions as measurement values.
The plugin configuration provides the following opportunities:
This plugin injects AOP based aspects at build time to existing source code. In runtime the first called and AOP tracked method, will instance the monitoring manager class. After that the monitoring configuration will be read and the tracking logic will be started.
The MonitoringManager class represents the base class of the monitoring logic. It initialize the configuration and save all monitoring data at MonitoringInfo objects. The MonitoringLogger class is the Tracking AOP aspect, which will be weaved around defined methods.
In maven project file pom.xml in build/plugins insert following section:
<plugin> <groupId>org.developers.blog</groupId> <artifactId>monitoring-plugin</artifactId> <version>1.1.0-SNAPSHOT</version> <configuration> <aopExpression>execution(* *.*(..))</aopExpression> <useDB>true</useDB> <department>My Test Department</department> <team>Very Skilled Team</team> <developers>f.mercury@domain.com</developers> <complianceLevel>1.5</complianceLevel> <verbose>true</verbose> <debug>true</debug> <showWeaveInfo>true</showWeaveInfo> <memorySlice>50</memorySlice> <timeSlice>20000</timeSlice> <maxConnections>10</maxConnections> <startThreadsCount>5</startThreadsCount> <maxThreadsCount>20</maxThreadsCount> <maxQueueCapacity>300</maxQueueCapacity> <maxWaitTimeForConnection>60</maxWaitTimeForConnection> <connectionPoolDataSourceClass>com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource</connectionPoolDataSourceClass> <dbProperties> <dbProperty> <name>url</name>> <value>jdbc:mysql://localhost/monitordb</value> </dbProperty> <dbProperty> <name>user</name> <value>dbuser</value> </dbProperty> <dbProperty> <name>password</name>> <value>secret</value> </dbProperty> </dbProperties> </configuration> <executions> <execution> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin>
Parameter Explanation: