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: CONTRIBUTING.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,12 +84,14 @@ Use the following terms for the individual components:
84
84
### Formatting
85
85
86
86
- File names and paths: `monospace`
87
-
- Commands and code: `monospace`; short commands inline, longer blocks in fenced code blocks with a language identifier (`bash`, `yaml`, `text`, etc.)
88
-
- Use `command` language identifier in favor of `shell`
87
+
- Commands and code: `monospace`; short commands inline, longer blocks in fenced code blocks with a language identifier (`console`, `yaml`, `text`, etc.)
88
+
- Use `console` for commands to run in a terminal; use `bash` or `puppet` for scripts and manifests
89
89
90
90
### Linking
91
91
92
-
- Don't use URI for links pointing to files form this documentation
93
-
- Use URI when referring to remote locations
94
-
- Use absolute paths when pointing to files from other sections
95
-
- Use filename only without path when referring to a file in the same directory
92
+
- Within a versioned collection (e.g. `docs/_openvox_8x/`), use relative links (`page.html`)
93
+
rather than absolute `/openvox/latest/page.html` links. Absolute `/latest/` links silently
94
+
cross version boundaries when a new major version is added.
95
+
- Prefer `page.html` over `./page.html` — the leading `./` is unnecessary.
96
+
- When linking across collections (e.g. from `_openvox_8x/` to `_openvoxdb_8x/`), use absolute paths (`/openvoxdb/latest/page.html`).
The Jolokia API is enabled by default. You must use `https://` to access `metrics/v2` for any service, and you must present authorization in the form of a Puppet certificate.
9
+
The Jolokia API is enabled by default. You must use `https://` to access `metrics/v2` for any
10
+
service, and you must present authorization in the form of a Puppet certificate.
10
11
11
12
## Jolokia endpoints
12
13
@@ -20,16 +21,18 @@ for more information.
20
21
21
22
For security reasons, we enable only the read-access Jolokia interface by default:
22
23
23
-
-`read`
24
-
-`list`
25
-
-`version`
26
-
-`search`
24
+
-`read`
25
+
-`list`
26
+
-`version`
27
+
-`search`
27
28
28
29
### Creating a metrics.conf file
30
+
29
31
To configure Jolokia metrics, create the `/etc/puppetlabs/puppetdb/conf.d/metrics.conf`
30
32
file if one doesn't exist. This file should contain a section like the example shown
31
33
below.
32
-
```
34
+
35
+
```text
33
36
metrics {
34
37
metrics-webservice: {
35
38
jolokia: {
@@ -51,8 +54,10 @@ file with contents that follow the [Jolokia access policy](https://jolokia.org/r
51
54
and uncomment the `metrics.metrics-webservice.jolokia.servlet-init-params.policyLocation`
52
55
parameter before restarting puppetdb.
53
56
54
-
The `metrics.metrics-webservice.jolokia.servlet-init-params` table
55
-
within the `/etc/puppetlabs/puppetdb/conf.d/metrics.conf` file provides more configuration options. See Jolokia's [agent initialization documentation](https://jolokia.org/reference/html/agents.html#agent-war-init-params) for all of the available options.
57
+
The `metrics.metrics-webservice.jolokia.servlet-init-params` table within the
58
+
`/etc/puppetlabs/puppetdb/conf.d/metrics.conf` file provides more configuration options.
59
+
See Jolokia's [agent initialization documentation](https://jolokia.org/reference/html/agents.html#agent-war-init-params)
60
+
for all of the available options.
56
61
57
62
### Disabling the endpoints
58
63
@@ -66,7 +71,7 @@ You can query the metrics v2 API using `GET` or `POST` requests.
66
71
67
72
This endpoint requires an operation, and depending on the operation can accept or might require an additional query:
68
73
69
-
```
74
+
```text
70
75
GET /metrics/v2/<OPERATION>/<QUERY>
71
76
```
72
77
@@ -78,11 +83,13 @@ A successful request returns a JSON document.
78
83
79
84
To list all valid mbeans querying the metrics endpoint
80
85
81
-
GET /metrics/v2/list
86
+
```text
87
+
GET /metrics/v2/list
88
+
```
82
89
83
90
Which should return a response similar to
84
91
85
-
```json
92
+
```json
86
93
{
87
94
"request": {
88
95
"type": "list"
@@ -119,11 +126,13 @@ Which should return a response similar to
119
126
So, from the example above we could query for the registered logger names with
120
127
this HTTP call:
121
128
122
-
GET /metrics/v2/read/java.util.logging:type=Logging/LoggerNames
129
+
```text
130
+
GET /metrics/v2/read/java.util.logging:type=Logging/LoggerNames
131
+
```
123
132
124
133
Which would return the JSON document
125
134
126
-
```json
135
+
```json
127
136
{
128
137
"request": {
129
138
"mbean": "java.util.logging:type=Logging",
@@ -155,7 +164,9 @@ value table with a colon (the `domain` and `prop list` in Jolokia parlance).
155
164
Querying the MBeans is achieved via the `read` operation. The `read` operation
156
165
has as its GET signature:
157
166
158
-
GET /metrics/v2/read/<MBEAN NAMES>/<ATTRIBUTES>/<OPTIONAL INNER PATH FILTER>
167
+
```text
168
+
GET /metrics/v2/read/<MBEAN NAMES>/<ATTRIBUTES>/<OPTIONAL INNER PATH FILTER>
169
+
```
159
170
160
171
### `POST /metrics/v2/<OPERATION>`
161
172
@@ -169,13 +180,13 @@ The new Jolokia-based metrics API also provides globbing (wildcard selection) an
169
180
170
181
You can combine both of these features to query garbage collection data, but return only the collection counts and times.
171
182
172
-
```
183
+
```text
173
184
GET metrics/v2/read/java.lang:name=*,type=GarbageCollector/CollectionCount,CollectionTime
0 commit comments