Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions _data/nav/openvox-server_8x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,17 @@
link: status-api/v1/services.html
- text: Simple endpoint
link: status-api/v1/simple.html
- text: Metrics API endpoints
- text: Metrics
items:
- text: v1 metrics
- text: Monitoring OpenVox Server metrics
link: puppet_server_metrics.html
- text: HTTP client metrics
link: http_client_metrics.html
- text: Applying metrics to improve performance
link: puppet_server_metrics_performance.html
- text: v1 metrics API
link: metrics-api/v1/metrics_api.html
- text: v2 (Jolokia) metrics
- text: v2 (Jolokia) metrics API
link: metrics-api/v2/metrics_api.html
- text: Developer information
items:
Expand Down
31 changes: 15 additions & 16 deletions docs/_openvox-server_8x/http_client_metrics.markdown
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
layout: default
title: "Puppet Server: HTTP Client Metrics"
canonical: "/puppetserver/latest/http_client_metrics.html"
title: "OpenVox Server: HTTP Client Metrics"
---

[status API]: ./status-api/v1/services.html

HTTP client metrics available in Puppet Server 5 allows users to measure how long it takes for Puppet Server to make requests to and receive responses from other services, such as PuppetDB.
HTTP client metrics allow users to measure how long it takes for OpenVox Server to make requests to and receive responses from other services, such as OpenVoxDB.

## Determining metrics IDs

Expand All @@ -16,19 +15,19 @@ All of these metrics are of the form `puppetlabs.<SERVER ID>.http-client.experim
> are joined together with periods. For instance, the metric ID of `[puppetdb resource search]` is `puppetdb.resource.search`, so the full metric name would be
> `puppetlabs.<server-id>.http-client.experimental.with-metric-id.puppetdb.resource.search.full-response`.

You can configure PuppetDB to be a backend for [configuration files](https://puppet.com/docs/puppetdb/latest/connect_puppet_master.html#step-2-edit-configuration-files) (through the `storeconfigs` setting), and
you can configure Puppet Server to send reports to an external report processing service. If you configure either of these, then during the course of handling a Puppet agent run, Puppet Server makes several
You can configure OpenVoxDB to be a backend for configuration files (through the `storeconfigs` setting), and
you can configure OpenVox Server to send reports to an external report processing service. If you configure either of these, then during the course of handling an OpenVox agent run, OpenVox Server makes several
calls to external services to retrieve or store information.

- During handling of a `/puppet/v3/node` request, Puppet Server issues:
- a `facts find` request to PuppetDB for facts about the node, if they aren't yet cached (typically the first time it requests facts for the node). **Metric ID:** `[puppetdb facts find]`.
- During handling of a `/puppet/v3/catalog` request, Puppet Server issues several requests:
- a PuppetDB `replace facts` request, to replace the facts for the agent in PuppetDB with the facts it received from the agent. **Metric ID:** `[puppetdb, command, replace_facts]`.
- a PuppetDB `resource search` request, to search for resources if exported resources are used. **Metric ID:** `[puppetdb, resource, search]`.
- a PuppetDB `query` request, if the `puppetdb_query` function is used in Puppet code. **Metric ID:** `[puppetdb, query]`.
- a PuppetDB `replace catalog` request, to replace the catalog for the agent in PuppetDB with the newly compiled catalog. **Metric ID:** `[puppetdb, command, replace_catalog]`.
- During handling of a `/puppet/v3/report` request, Puppet Server issues:
- a PuppetDB `store report` request, to store the submitted report. **Metric ID:** `[puppetdb command store_report]`.
- During handling of a `/puppet/v3/node` request, OpenVox Server issues:
- a `facts find` request to OpenVoxDB for facts about the node, if they aren't yet cached (typically the first time it requests facts for the node). **Metric ID:** `[puppetdb facts find]`.
- During handling of a `/puppet/v3/catalog` request, OpenVox Server issues several requests:
- an OpenVoxDB `replace facts` request, to replace the facts for the agent in OpenVoxDB with the facts it received from the agent. **Metric ID:** `[puppetdb, command, replace_facts]`.
- an OpenVoxDB `resource search` request, to search for resources if exported resources are used. **Metric ID:** `[puppetdb, resource, search]`.
- an OpenVoxDB `query` request, if the `puppetdb_query` function is used in Puppet code. **Metric ID:** `[puppetdb, query]`.
- an OpenVoxDB `replace catalog` request, to replace the catalog for the agent in OpenVoxDB with the newly compiled catalog. **Metric ID:** `[puppetdb, command, replace_catalog]`.
- During handling of a `/puppet/v3/report` request, OpenVox Server issues:
- an OpenVoxDB `store report` request, to store the submitted report. **Metric ID:** `[puppetdb command store_report]`.
- a request to the configured `reports_url` to store the report, if the HTTP report processor is enabled. **Metric ID:** `[puppetdb report http]`.

## Configuring
Expand All @@ -38,8 +37,8 @@ HTTP client metrics are enabled by default, but can be disabled by setting `metr
These metrics also depend on the `server-id` setting in the `metrics` section of `puppetserver.conf`. This defaults to `localhost`, and while `localhost` can collect metrics, change this setting to something
unique to avoid metric naming collisions when exporting metrics to an external tool, such as Graphite.

This data is all available via the [status API][] endpoint, at `https://<MASTER HOSTNAME>:8140/status/v1/services/master?level=debug`. Puppet Server 5.0 adds a `http-client-metrics` keyword in the map. If
metrics are not enabled, or if Puppet Server has not issued any requests yet, then this array will be empty, like so: `"http-client-metrics": []`.
This data is all available via the [status API][] endpoint, at `https://<SERVER HOSTNAME>:8140/status/v1/services/master?level=debug`. If
metrics are not enabled, or if OpenVox Server has not issued any requests yet, then this array will be empty, like so: `"http-client-metrics": []`.

In the [sample Grafana dashboard](./sample-puppetserver-metrics-dashboard.json), the `External HTTP Communications` graph visualizes all of these metrics, and the tooltip describes each of them.

Expand Down
Loading