Skip to content

Commit

Permalink
Merge branch 'release-1.0.0-alpha4' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 20, 2023
2 parents 025eba4 + 201948d commit b912dfe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ I needed something that can scrape many MBeans with a small number of rules. Wri
Quick Start
------------

*If you don't want to run the agent now, download [scriptable-jmx-exporter-1.0.0-alpha3.jar](https://repo1.maven.org/maven2/net/thisptr/scriptable-jmx-exporter/1.0.0-alpha3/scriptable-jmx-exporter-1.0.0-alpha3.jar) and skip to [Usage](#usage).*
*If you don't want to run the agent now, download [scriptable-jmx-exporter-1.0.0-alpha4.jar](https://repo1.maven.org/maven2/net/thisptr/scriptable-jmx-exporter/1.0.0-alpha4/scriptable-jmx-exporter-1.0.0-alpha4.jar) and skip to [Usage](#usage).*

You can quickly try out this exporter by copy-and-pasting the following snippet to your shell (or by manually running one by one).
This will download the agent jar and a default configuration file, and then start the exporter using `-javaagent` option.

```sh
# Download the agent jar and a default configuration file.
curl -LO https://repo1.maven.org/maven2/net/thisptr/scriptable-jmx-exporter/1.0.0-alpha3/scriptable-jmx-exporter-1.0.0-alpha3.jar
curl -LO https://raw.githubusercontent.com/eiiches/scriptable-jmx-exporter/v1.0.0-alpha3/src/main/resources/scriptable-jmx-exporter.yaml
curl -LO https://repo1.maven.org/maven2/net/thisptr/scriptable-jmx-exporter/1.0.0-alpha4/scriptable-jmx-exporter-1.0.0-alpha4.jar
curl -LO https://raw.githubusercontent.com/eiiches/scriptable-jmx-exporter/v1.0.0-alpha4/src/main/resources/scriptable-jmx-exporter.yaml

# Finally, run JVM with the exporter enabled.
java -javaagent:scriptable-jmx-exporter-1.0.0-alpha3.jar=@scriptable-jmx-exporter.yaml net.thisptr.jmx.exporter.tools.Pause
java -javaagent:scriptable-jmx-exporter-1.0.0-alpha4.jar=@scriptable-jmx-exporter.yaml net.thisptr.jmx.exporter.tools.Pause
```

Now, open [http://localhost:9639/metrics](http://localhost:9639/metrics) in your browser to see the exposed metrics.
Expand All @@ -76,16 +76,16 @@ Configurations can be passed as a javaagent argument. See Configuration section
java -javaagent:<PATH_TO_AGENT_JAR>=<CONFIG_JSON> ...

# e.g.
# java -javaagent:scriptable-jmx-exporter-1.0.0-alpha3.jar='{"rules":[{"pattern":["com.sun.management:type=HotSpotDiagnostic:DiagnosticOptions","java.lang:type=Threading:AllThreadIds","jdk.management.jfr"],"skip":true},{"transform":"!java V1.transform(in, out, \"type\")"}]}' ...
# java -javaagent:scriptable-jmx-exporter-1.0.0-alpha4.jar='{"rules":[{"pattern":["com.sun.management:type=HotSpotDiagnostic:DiagnosticOptions","java.lang:type=Threading:AllThreadIds","jdk.management.jfr"],"skip":true},{"transform":"!java V1.transform(in, out, \"type\")"}]}' ...

# ---
# Load configurations from PATH_TO_CONFIG_YAML file
java -javaagent:<PATH_TO_AGENT_JAR>=@<PATH_TO_CONFIG_YAML> ...

# e.g.
# java -javaagent:scriptable-jmx-exporter-1.0.0-alpha3.jar=@/etc/foo.yaml ...
# java -javaagent:scriptable-jmx-exporter-1.0.0-alpha3.jar=@foo.yaml ...
# java -javaagent:scriptable-jmx-exporter-1.0.0-alpha3.jar=@classpath:foo.yaml ...
# java -javaagent:scriptable-jmx-exporter-1.0.0-alpha4.jar=@/etc/foo.yaml ...
# java -javaagent:scriptable-jmx-exporter-1.0.0-alpha4.jar=@foo.yaml ...
# java -javaagent:scriptable-jmx-exporter-1.0.0-alpha4.jar=@classpath:foo.yaml ...
```

If multiple comma-separated configurations are specified, former configurations are overriden by (or merged with) the latter ones.
Expand All @@ -94,7 +94,7 @@ If multiple comma-separated configurations are specified, former configurations
java -javaagent:<PATH_TO_AGENT_JAR>=@<PATH_TO_CONFIG_YAML>,<CONFIG_JSON> ...

# e.g.
# java -javaagent:scriptable-jmx-exporter-1.0.0-alpha3.jar=@/etc/foo.yaml,'{"server":{"bind_address":":19639"}}' ...
# java -javaagent:scriptable-jmx-exporter-1.0.0-alpha4.jar=@/etc/foo.yaml,'{"server":{"bind_address":":19639"}}' ...
```

Configuration
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<artifactId>scriptable-jmx-exporter</artifactId>
<name>Scriptable JMX Exporter</name>
<packaging>jar</packaging>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0-alpha4</version>
<description>Java agent for collecting and exposing metrics to Prometheus</description>
<url>https://github.com/eiiches/scriptable-jmx-exporter</url>

Expand All @@ -32,7 +32,7 @@
<connection>scm:git:git@github.com:eiiches/scriptable-jmx-exporter.git</connection>
<developerConnection>scm:git:git@github.com:eiiches/scriptable-jmx-exporter.git</developerConnection>
<url>git@github.com:eiiches/scriptable-jmx-exporter.git</url>
<tag>HEAD</tag>
<tag>v1.0.0-alpha4</tag>
</scm>

<distributionManagement>
Expand Down

0 comments on commit b912dfe

Please sign in to comment.