probe stubs added.
This commit is contained in:
parent
eefbd4aee6
commit
4adc8ec00f
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<assembly
|
||||||
|
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
||||||
|
<id>dir</id>
|
||||||
|
<formats>
|
||||||
|
<format>dir</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<outputDirectory>lib</outputDirectory>
|
||||||
|
<useProjectArtifact>false</useProjectArtifact>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
<files>
|
||||||
|
<file>
|
||||||
|
<source>target/bench4q-monitor.jar</source>
|
||||||
|
<outputDirectory>/</outputDirectory>
|
||||||
|
</file>
|
||||||
|
</files>
|
||||||
|
</assembly>
|
31
pom.xml
31
pom.xml
|
@ -39,6 +39,37 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<mainClass>org.bench4q.monitor.Main</mainClass>
|
||||||
|
<addClasspath>true</addClasspath>
|
||||||
|
<classpathPrefix>lib/</classpathPrefix>
|
||||||
|
</manifest>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>make-zip</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>descriptor.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
<finalName>bench4q-monitor</finalName>
|
<finalName>bench4q-monitor</finalName>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
|
@ -40,8 +40,9 @@ public class MonitorServer {
|
||||||
ServletContextHandler servletContextHandler = new ServletContextHandler();
|
ServletContextHandler servletContextHandler = new ServletContextHandler();
|
||||||
ServletHolder servletHolder = servletContextHandler.addServlet(
|
ServletHolder servletHolder = servletContextHandler.addServlet(
|
||||||
DispatcherServlet.class, "/");
|
DispatcherServlet.class, "/");
|
||||||
servletHolder.setInitParameter("contextConfigLocation",
|
servletHolder
|
||||||
"classpath*:/application-context.xml");
|
.setInitParameter("contextConfigLocation",
|
||||||
|
"classpath*:org/bench4q/monitor/config/application-context.xml");
|
||||||
this.getServer().setHandler(servletContextHandler);
|
this.getServer().setHandler(servletContextHandler);
|
||||||
this.getServer().start();
|
this.getServer().start();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.bench4q.monitor.probe;
|
||||||
|
|
||||||
|
public class LinuxCpuProbe {
|
||||||
|
// /proc/stat
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.bench4q.monitor.probe;
|
||||||
|
|
||||||
|
public class LinuxCpuProbeInfo {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.bench4q.monitor.probe;
|
||||||
|
|
||||||
|
public class LinuxDiskProbe {
|
||||||
|
// /proc/diskstats
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.bench4q.monitor.probe;
|
||||||
|
|
||||||
|
public class LinuxDiskProbeInfo {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.bench4q.monitor.probe;
|
||||||
|
|
||||||
|
public class LinuxMemoryProbe {
|
||||||
|
// /proc/meminfo
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.bench4q.monitor.probe;
|
||||||
|
|
||||||
|
public class LinuxMemoryProbeInfo {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.bench4q.monitor.probe;
|
||||||
|
|
||||||
|
public class LinuxNetworkProbe {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.bench4q.monitor.probe;
|
||||||
|
|
||||||
|
public class LinuxNetworkProbeInfo {
|
||||||
|
|
||||||
|
}
|
|
@ -4,9 +4,9 @@ import java.io.BufferedReader;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.LineNumberReader;
|
import java.io.LineNumberReader;
|
||||||
|
import java.lang.management.ManagementFactory;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import sun.management.ManagementFactory;
|
|
||||||
import com.sun.management.OperatingSystemMXBean;
|
import com.sun.management.OperatingSystemMXBean;
|
||||||
|
|
||||||
import org.bench4q.monitor.entity.MonitorInfo;
|
import org.bench4q.monitor.entity.MonitorInfo;
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.bench4q.monitor.test;
|
||||||
|
|
||||||
|
public class MonitorServiceTest {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue