Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

mostly cleanup

  • Loading branch information...
commit 699ae647ac261ac09db8950d0d71c29240b43752 1 parent d792251
@tcurdt authored
View
6 README.md
@@ -1,5 +1,11 @@
# jmx2any
+ java -javaagent:/path/jmx2any.jar=/etc/jmx2any.yml yourmainclass
+
+ java -jar /path/jmx2any.jar -config /etc/jmx2any.yml
+
+ jmx2any -config /etc/jmx2any.yml -print -all
+
# License
View
1  src/examples/config.yaml
@@ -15,7 +15,6 @@ output:
path: /tmp/output
report:
- java
- - cassandra
cassandra:
url: "service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi"
View
4 src/main/java/org/vafer/jmx/Agent.java
@@ -6,11 +6,11 @@
import java.util.concurrent.TimeUnit;
/*
-* java -javaagent:/path/jmx2any.jar=/etc/jmx2any.config yourmainclass
+* java -javaagent:/path/jmx2any.jar=/etc/jmx2any.yml yourmainclass
*/
public final class Agent {
- private final String filename;
+ private final String filename;
private final ScheduledThreadPoolExecutor executor;
public Agent(String filename) {
View
6 src/main/java/org/vafer/jmx/JmxQuery.java
@@ -31,8 +31,8 @@
public JmxBean(ObjectInstance mbean) throws IntrospectionException, InstanceNotFoundException, IOException, ReflectionException {
final ObjectName mbeanName = mbean.getObjectName();
final MBeanInfo mbeanInfo = connection.getMBeanInfo(mbeanName);
-
- final Collection<JmxAttribute> attributes = new ArrayList<JmxAttribute>();
+
+ final Collection<JmxAttribute> attributes = new ArrayList<JmxAttribute>();
for (final MBeanAttributeInfo attribute : mbeanInfo.getAttributes()) {
if (attribute.isReadable()) {
attributes.add(new JmxAttribute() {
@@ -60,7 +60,7 @@ public Object getAttributeValue() throws InstanceNotFoundException, IOException,
return attributes.iterator();
}
}
-
+
public JmxQuery(final String url, final Set<String> expressions) throws IOException, MalformedObjectNameException, IntrospectionException, InstanceNotFoundException, ReflectionException {
this.connector = JMXConnectorFactory.connect(new JMXServiceURL(url));
this.connection = connector.getMBeanServerConnection();
View
2  src/main/java/org/vafer/jmx/output/OutputFilter.java
@@ -14,7 +14,7 @@
public final class OutputFilter implements JmxPipe {
private final static DefaultFormatter formatter = new DefaultFormatter();
-
+
private final JmxPipe output;
private final Set<String> metrics;
View
1  src/main/java/org/vafer/jmx/pipe/CompositePipe.java
@@ -33,7 +33,6 @@ public void output(String node, JmxQuery.JmxAttribute metric) throws IOException
}
}
-
public void close() throws IOException {
for(JmxPipe output : outputs) {
output.close();
View
2  src/main/java/org/vafer/jmx/pipe/ConverterPipe.java
@@ -21,7 +21,7 @@
public final class ConverterPipe implements JmxPipe {
private final static DefaultFormatter formatter = new DefaultFormatter();
-
+
private final Output output;
private final Enums enums;
Please sign in to comment.
Something went wrong with that request. Please try again.