You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instrumentation/jmx-metrics/README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -245,53 +245,53 @@ rules:
245
245
metric: tomcat.connector.status
246
246
metricAttribute:
247
247
port: param(port)
248
-
connector_state:
248
+
tomcat.connector.state:
249
249
ok: STARTED
250
250
failed: [STOPPED,FAILED]
251
251
degraded: '*'
252
252
```
253
253
254
-
For a given value of `port`, let's say `8080` This will capture the `tomcat.connector.status` metric of type `updowncounter` with value `0` or `1` and the `connector_state` metric attribute will have a value in [`ok`,`failed`,`degraded`].
255
-
For every sample, 3 metrics will be captured for each value of `connector_state` depending on the value of `stateName`:
254
+
For a given value of `port`, let's say `8080` This will capture the `tomcat.connector.status` metric of type `updowncounter` with value `0` or `1` and the `tomcat.connector.state` metric attribute will have a value in [`ok`,`failed`,`degraded`].
255
+
For every sample, 3 metrics will be captured for each value of `tomcat.connector.state` depending on the value of `stateName`:
Each state key can be mapped to one or more values of the MBean attribute using:
276
276
- a string literal or a string array
277
277
- a `*` character to provide default option and avoid enumerating all values, this value must be quoted in YAML
278
278
279
279
Exactly one `*` value must be present in the mapping to ensure all possible values of the MBean attribute can be mapped to a state key.
280
280
281
-
The default value indicated by `*` does not require a dedicated state key. For example, if we want to have `connector_state` metric attribute with values `on` or `off`, we can use:
281
+
The default value indicated by `*` does not require a dedicated state key. For example, if we want to have `tomcat.connector.state` metric attribute with values `on` or `off`, we can use:
282
282
```yaml
283
-
connector_state:
283
+
tomcat.connector.state:
284
284
on: STARTED
285
285
off: [STOPPED,FAILED,'*']
286
286
```
287
287
In the particular case where only two values are defined, we can simplify further by explicitly defining one state and rely on default for the other.
288
288
```yaml
289
-
connector_state:
289
+
tomcat.connector.state:
290
290
on: STARTED
291
291
off: '*'
292
292
```
293
293
294
-
State metrics do not have a unit (nor source unit) and use an empty string `""` as unit.
294
+
State metrics do not need to define `unit` nor `sourceUnit` attributes, the unit of the metric will always be `1`.
0 commit comments