Skip to content

Commit

Permalink
Document the type attribute and its values counter and gauge
Browse files Browse the repository at this point in the history
Better documentation for #44 and @mindkir 's #44 (comment)
  • Loading branch information
Cyrille Le Clerc authored Jan 20, 2017
1 parent a4df7b6 commit 4b447e2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ Example - collect the `ThreadCount` attribute from the Threading MBean:
resultAlias="jvm.thread.count"/>
```

Example - collect the `SystemLoadAverage` gauge attribute from the OperatingSystem MBean:

<query objectName="java.lang:type=OperatingSystem" attributes="SystemLoadAverage" type="gauge" resultAlias="#attribute#"/>

(i) Note that the `type` attribute is customizable. Output writers such as the [LibratoWriter](https://github.com/jmxtrans/jmxtrans-agent/blob/jmxtrans-agent-1.2.4/src/main/java/org/jmxtrans/agent/LibratoWriter.java), [StatsDOutputWriter](https://github.com/jmxtrans/jmxtrans-agent/blob/jmxtrans-agent-1.2.4/src/main/java/org/jmxtrans/agent/StatsDOutputWriter.java) and [PerMinuteSummarizerOutputWriter](https://github.com/jmxtrans/jmxtrans-agent/blob/jmxtrans-agent-1.2.4/src/main/java/org/jmxtrans/agent/PerMinuteSummarizerOutputWriter.java) are aware of the `type`s `counter` and `gauge` and assume that non defined `type`means `counter`.

Example - collect `ThreadCount` and `TotalStartedThreadCount` from the Threading MBean:

```xml
Expand Down

0 comments on commit 4b447e2

Please sign in to comment.