Skip to content

Commit 9760d30

Browse files
authored
Merge branch 'master' into docs/ssl-custom-ca-proxy
2 parents 964db7b + 0e67fbd commit 9760d30

7 files changed

Lines changed: 425 additions & 301 deletions

File tree

CONTRIBUTING.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,14 @@ Use the following terms for the individual components:
8484
### Formatting
8585

8686
- 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
8989

9090
### Linking
9191

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`).
97+
- Use full URIs for external links only.

_data/social_links.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
- icon: github
22
url: 'https://github.com/OpenVoxProject/openvox-docs'
33
label: GitHub
4+
- icon: mastodon
5+
url: 'https://fosstodon.org/@voxpupuli'
6+
label: Fosstodon
7+
- icon: linkedin
8+
url: 'https://linkedin.com/company/voxpupuli/'
9+
label: LinkedIn
10+
- icon: bluesky
11+
url: 'https://bsky.app/profile/voxpupuli.org'
12+
label: BlueSky
13+
- icon: slack
14+
url: 'https://short.voxpupu.li/puppetcommunity_slack_signup'
15+
label: Join our Slack
16+
- icon: blog
17+
url: 'https://voxpupuli.org/blog'
18+
label: The Vox Blog

docs/_openvoxdb_8x/api/metrics/v2/jolokia.markdown

Lines changed: 65 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ canonical: "/openvoxdb/latest/api/metrics/v2/jolokia.html"
66

77
# Metrics API v2
88

9-
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.
1011

1112
## Jolokia endpoints
1213

@@ -20,16 +21,18 @@ for more information.
2021

2122
For security reasons, we enable only the read-access Jolokia interface by default:
2223

23-
- `read`
24-
- `list`
25-
- `version`
26-
- `search`
24+
- `read`
25+
- `list`
26+
- `version`
27+
- `search`
2728

2829
### Creating a metrics.conf file
30+
2931
To configure Jolokia metrics, create the `/etc/puppetlabs/puppetdb/conf.d/metrics.conf`
3032
file if one doesn't exist. This file should contain a section like the example shown
3133
below.
32-
```
34+
35+
```text
3336
metrics {
3437
metrics-webservice: {
3538
jolokia: {
@@ -51,8 +54,10 @@ file with contents that follow the [Jolokia access policy](https://jolokia.org/r
5154
and uncomment the `metrics.metrics-webservice.jolokia.servlet-init-params.policyLocation`
5255
parameter before restarting puppetdb.
5356

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.
5661

5762
### Disabling the endpoints
5863

@@ -66,7 +71,7 @@ You can query the metrics v2 API using `GET` or `POST` requests.
6671

6772
This endpoint requires an operation, and depending on the operation can accept or might require an additional query:
6873

69-
```
74+
```text
7075
GET /metrics/v2/<OPERATION>/<QUERY>
7176
```
7277

@@ -78,11 +83,13 @@ A successful request returns a JSON document.
7883

7984
To list all valid mbeans querying the metrics endpoint
8085

81-
GET /metrics/v2/list
86+
```text
87+
GET /metrics/v2/list
88+
```
8289

8390
Which should return a response similar to
8491

85-
``` json
92+
```json
8693
{
8794
"request": {
8895
"type": "list"
@@ -119,11 +126,13 @@ Which should return a response similar to
119126
So, from the example above we could query for the registered logger names with
120127
this HTTP call:
121128

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+
```
123132

124133
Which would return the JSON document
125134

126-
``` json
135+
```json
127136
{
128137
"request": {
129138
"mbean": "java.util.logging:type=Logging",
@@ -155,7 +164,9 @@ value table with a colon (the `domain` and `prop list` in Jolokia parlance).
155164
Querying the MBeans is achieved via the `read` operation. The `read` operation
156165
has as its GET signature:
157166

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+
```
159170

160171
### `POST /metrics/v2/<OPERATION>`
161172

@@ -169,13 +180,13 @@ The new Jolokia-based metrics API also provides globbing (wildcard selection) an
169180

170181
You can combine both of these features to query garbage collection data, but return only the collection counts and times.
171182

172-
```
183+
```text
173184
GET metrics/v2/read/java.lang:name=*,type=GarbageCollector/CollectionCount,CollectionTime
174185
```
175186

176187
This returns a JSON response:
177188

178-
``` json
189+
```json
179190
{
180191
"request": {
181192
"mbean": "java.lang:name=*,type=GarbageCollector",
@@ -208,7 +219,8 @@ for more advanced usage.
208219

209220
The jolokia endpoint requires cert-based authentication, which can be done in
210221
curl with the following command.
211-
```
222+
223+
```console
212224
curl https://localhost:8081/metrics/v2/list \
213225
--cert path/to/localhost.pem \
214226
--key path/to/localhost.key \
@@ -221,7 +233,7 @@ command should populate the necessary information. For repeated querying, you
221233
should save the output of each command because printing the necessary configs
222234
is _much_ slower than a simple curl command.
223235

224-
```sh
236+
```console
225237
curl "https://$(puppet config print server):8081/metrics/v2/list" \
226238
--cert "$(puppet config print hostcert)" \
227239
--key "$(puppet config print hostprivkey)" \
@@ -232,13 +244,13 @@ curl "https://$(puppet config print server):8081/metrics/v2/list" \
232244

233245
### Population metrics
234246

235-
* `puppetlabs.puppetdb.population:name=num-nodes`:
247+
- `puppetlabs.puppetdb.population:name=num-nodes`:
236248
the number of nodes in your population.
237-
* `puppetlabs.puppetdb.population:name=num-resources`:
249+
- `puppetlabs.puppetdb.population:name=num-resources`:
238250
the number of resources in your population.
239-
* `puppetlabs.puppetdb.population:name=avg-resources-per-node`:
251+
- `puppetlabs.puppetdb.population:name=avg-resources-per-node`:
240252
the average number of resources per node in your population.
241-
* `puppetlabs.puppetdb.population:name=pct-resource-dupes`:
253+
- `puppetlabs.puppetdb.population:name=pct-resource-dupes`:
242254
the percentage of resources that exist on more than one node.
243255

244256
### Database Metrics
@@ -248,7 +260,7 @@ HikariCP metrics and their names can be found in
248260
[their documentation](https://github.com/brettwooldridge/HikariCP/wiki/Dropwizard-Metrics).
249261
All the database metrics have the following naming convention:
250262

251-
```
263+
```text
252264
puppetlabs.puppetdb.database:PDBWritePool.<HikariCP metric>
253265
puppetlabs.puppetdb.database:PDBReadPool.<HikariCP metric>
254266
```
@@ -266,19 +278,19 @@ Each of these metrics can be accessed as
266278
`puppetlabs.puppetdb.mq:name=global.<item>`, using any of the
267279
following `<item>`s:
268280

269-
* `seen`: meter measuring commands received (valid or invalid)
270-
* `processed`: meter measuring commands successfully processed
271-
* `fatal`: meter measuring fatal processing errors
272-
* `retried`: meter measuring commands scheduled for retrial
273-
* `awaiting-retry`: number of commands waiting to be retried
274-
* `retry-counts`: histogram of retry counts (until success or discard)
275-
* `discarded`: meter measuring commands discarded as invalid
276-
* `processing-time`: timing statistics for the processing of
281+
- `seen`: meter measuring commands received (valid or invalid)
282+
- `processed`: meter measuring commands successfully processed
283+
- `fatal`: meter measuring fatal processing errors
284+
- `retried`: meter measuring commands scheduled for retrial
285+
- `awaiting-retry`: number of commands waiting to be retried
286+
- `retry-counts`: histogram of retry counts (until success or discard)
287+
- `discarded`: meter measuring commands discarded as invalid
288+
- `processing-time`: timing statistics for the processing of
277289
previously enqueued commands
278-
* `queue-time`: histogram of the time commands have spent waiting in the queue
279-
* `depth`: number of currently enqueued commands
280-
* `ignored`: number of obsolete commands that have been ignored
281-
* `size`: histogram of submitted command sizes (i.e. HTTP Content-Lengths)
290+
- `queue-time`: histogram of the time commands have spent waiting in the queue
291+
- `depth`: number of currently enqueued commands
292+
- `ignored`: number of obsolete commands that have been ignored
293+
- `size`: histogram of submitted command sizes (i.e. HTTP Content-Lengths)
282294

283295
For example: `puppetlabs.puppetdb.mq:name=global.seen`.
284296

@@ -289,14 +301,14 @@ Each of the command-specific metrics can be accessed as
289301
`<command>` must be a valid command name, `<version>` must be the
290302
integer command version, and `<item>` must be one of the following:
291303

292-
* `seen`: meter measuring commands received (valid or invalid)
293-
* `processed`: meter measuring commands successfully processed
294-
* `fatal`: meter measuring fatal processing errors
295-
* `retried`: meter measuring commands scheduled for retrial
296-
* `retry-counts`: histogram of retry counts (until success or discard)
297-
* `discarded`: meter measuring commands discarded as invalid
298-
* `ignored`: number of obsolete commands that have been ignored
299-
* `processing-time`: timing statistics for the processing of
304+
- `seen`: meter measuring commands received (valid or invalid)
305+
- `processed`: meter measuring commands successfully processed
306+
- `fatal`: meter measuring fatal processing errors
307+
- `retried`: meter measuring commands scheduled for retrial
308+
- `retry-counts`: histogram of retry counts (until success or discard)
309+
- `discarded`: meter measuring commands discarded as invalid
310+
- `ignored`: number of obsolete commands that have been ignored
311+
- `processing-time`: timing statistics for the processing of
300312
previously enqueued commands
301313

302314
For example: `puppetlabs.puppetdb.mq:name=replace catalog.9.processed`.
@@ -314,13 +326,13 @@ Additionally, we also support the following explicit names:
314326

315327
>**Note:** The use of these explicit names is deprecated; please use, for example, `/pdb/cmd/v1` instead.
316328
317-
* `commands`: stats relating to the command processing REST
329+
- `commands`: stats relating to the command processing REST
318330
endpoint. The OpenVoxDB-termini in Puppet talk to this endpoint to
319331
submit new catalogs, facts, etc.
320-
* `metrics`: stats relating to the metrics REST endpoint. This is the
332+
- `metrics`: stats relating to the metrics REST endpoint. This is the
321333
endpoint you're reading about right now!
322-
* `facts`: stats relating to fact querying.
323-
* `resources`: stats relating to resource querying. This is the
334+
- `facts`: stats relating to fact querying.
335+
- `resources`: stats relating to resource querying. This is the
324336
endpoint used when collecting exported resources.
325337

326338
In addition to customizing `<name>`, the following metrics are
@@ -329,9 +341,9 @@ see the stats for all `200` responses for the `resources`
329341
endpoint. This allows you to see, per endpoint and per response,
330342
independent counters and statistics.
331343

332-
* `puppetlabs.puppetdb.http:name=<name>.service-time`:
344+
- `puppetlabs.puppetdb.http:name=<name>.service-time`:
333345
stats about how long it takes to service all HTTP requests to this endpoint
334-
* `puppetlabs.puppetdb.http:name=<name>.<status code>`:
346+
- `puppetlabs.puppetdb.http:name=<name>.<status code>`:
335347
stats about how often we're returning this response code
336348

337349
### Storage metrics
@@ -341,13 +353,13 @@ Metrics involving the OpenVoxDB storage subsystem all begin with the
341353
a number of metrics concerned with individual storage operations (storing
342354
resources, storing edges, etc.). Metrics of particular note include:
343355

344-
* `puppetlabs.puppetdb.storage:name=duplicate-pct`:
356+
- `puppetlabs.puppetdb.storage:name=duplicate-pct`:
345357
the percentage of catalogs that OpenVoxDB determines to be
346358
duplicates of existing catalogs.
347-
* `puppetlabs.puppetdb.storage:name=gc-time`: states
359+
- `puppetlabs.puppetdb.storage:name=gc-time`: states
348360
about how long it takes to do storage compaction.
349361

350362
### JVM metrics
351363

352-
* `java.lang:type=Memory`: memory usage statistics.
353-
* `java.lang:type=Threading`: stats about JVM threads.
364+
- `java.lang:type=Memory`: memory usage statistics.
365+
- `java.lang:type=Threading`: stats about JVM threads.

0 commit comments

Comments
 (0)