Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit 7d9555f

Browse files
authored
Adding resource utilization metrics documentation (#101)
1 parent 368ccd4 commit 7d9555f

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

website/docs/cloud-docs/agents/metrics.mdx

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ metrics in this section are prefixed by `tfc-agent.core.`.
4444
| ---------------------------- | ----- | -------------------------------------------------------------------- |
4545
| `status.busy` | Gauge | Number of agents in `busy` status. |
4646
| `status.idle` | Gauge | Number of agents in `idle` status. |
47-
| `register.milliseconds` | Timer | Time to register the agent with HCP Terraform. |
47+
| `register.milliseconds` | Timer | Time to register the agent with HCP Terraform. |
4848
| `fetch_job.milliseconds` | Timer | Time to complete a job dequeue request. |
49-
| `update_status.milliseconds` | Timer | Time to send a status update over from the agent to HCP Terraform. |
49+
| `update_status.milliseconds` | Timer | Time to send a status update over from the agent to HCP Terraform. |
5050

5151
## Runtime metrics
5252

@@ -77,6 +77,23 @@ container metrics. All metrics in this section are prefixed by
7777
| `go.gc.pause_total.nanoseconds` | Timer | Cumulative time spent in stop-the-world pauses. |
7878
| `uptime.milliseconds` | Timer | Cumulative time since the agent started. |
7979

80+
## Resource utilization metrics
81+
82+
HCP Terraform Agents emit metrics about overall system resource utilization any
83+
time the agent's status is `busy` (i.e., when the agent is handling a plan,
84+
apply, policy evaluation, etc.) These metrics use kernel-level information to
85+
produce metrics and should match closely with what you would get from familiar
86+
tools such as `top` and `free`. All metrics in this section are prefixed by
87+
`tfc-agent.core.profiler.`.
88+
89+
| Metric name | Type | Description |
90+
| --------------------------- | ----- | --------------------------------------------------------------------------- |
91+
| `cpu.busy.percent` | Gauge | Percentage of CPU time spent in a busy state. |
92+
| `memory.used.percent` | Gauge | Percentage of memory used. |
93+
| `memory.used.bytes` | Gauge | Used memory size in bytes. |
94+
| `io.read.bytes_per_second` | Gauge | Read throughput of the agent and descendant processes in bytes per second. |
95+
| `io.write.bytes_per_second` | Gauge | Write throughput of the agent and descendant processes in bytes per second. |
96+
8097
## Terraform component metrics
8198

8299
The following metrics are emitted by the `terraform` component, which is
@@ -86,15 +103,15 @@ metrics in this section are prefixed by `tfc-agent.core.terraform.`.
86103
| Metric name | Type | Description |
87104
| ---------------------------------------------- | ----- | ----------------------------------------------------------------------------------- |
88105
| `configure_terraform_cli.milliseconds` | Timer | Time spent configuring the Terraform CLI utility prior to execution. |
89-
| `handle_signal.milliseconds` | Timer | Time spent handling a signal from HCP Terraform. |
106+
| `handle_signal.milliseconds` | Timer | Time spent handling a signal from HCP Terraform. |
90107
| `execute.milliseconds` | Timer | Time spent handling a Terraform operation. |
91108
| `output_stream.upload_chunk.bytes` | Gauge | Size of a chunk of Terraform output uploaded. |
92109
| `output_stream.upload_chunk.milliseconds` | Timer | Time spent uploading a single chunk of Terraform output. |
93110
| `output_stream.upload_full.bytes` | Gauge | Size of a full Terraform log uploaded. |
94111
| `output_stream.upload_full.milliseconds` | Timer | Time spent uploading the full Terraform log. |
95112
| `output_stream.close.milliseconds` | Timer | Time spent finalizing a Terraform output stream. |
96113
| `override_sensitive_variables.milliseconds` | Timer | Time spent generating a configuration file to override variable sensitivity. |
97-
| `override_sensitive_variables.count` | Gauge | Number of variables in a run of which HCP Terraform modified the sensitivty flag. |
114+
| `override_sensitive_variables.count` | Gauge | Number of variables in a run of which HCP Terraform modified the sensitivty flag. |
98115
| `persist_filesystem.milliseconds` | Timer | Time spent packing and uploading a filesystem image. |
99116
| `persist_filesystem.pack.bytes` | Gauge | Size of a packed up filesystem image. |
100117
| `persist_filesystem.pack.milliseconds` | Timer | Time spent packing the contents of a filesystem. |
@@ -112,14 +129,14 @@ metrics in this section are prefixed by `tfc-agent.core.terraform.`.
112129
| `run_meta.additions` | Gauge | Number of resources added or proposed to be added in a Terraform operation. |
113130
| `run_meta.changes` | Gauge | Number of resources changed or proposed to change in a Terraform operation. |
114131
| `run_meta.destructions` | Gauge | Number of resources destroyed or proposed to be destroyed in a Terraform operation. |
115-
| `setup_backend.milliseconds` | Timer | Time spent configuring Terraform CLI for HCP Terraform. |
132+
| `setup_backend.milliseconds` | Timer | Time spent configuring Terraform CLI for HCP Terraform. |
116133
| `setup_ssh_key.milliseconds` | Timer | Time spent configuring an SSH key for Terraform to use while downloading modules. |
117134
| `setup_ssh_key.check_git_version.milliseconds` | Timer | Time spent ensuring the local version of "git" is adequate for leveraging SSH auth. |
118-
| `setup_terraform_binary.milliseconds` | Timer | Time spent downloading and unpacking a Terraform Community release. |
119-
| `setup_terraform_binary.download.bytes` | Gauge | Size of a downloaded Terraform Community version. |
120-
| `setup_terraform_binary.download.milliseconds` | Timer | Time spent downloading a Terraform Community release. |
121-
| `setup_terraform_binary.unpack.bytes` | Gauge | Size of an unpacked Terraform Community release. |
122-
| `setup_terraform_binary.unpack.milliseconds` | Timer | Time spent unpacking a Terraform Community release. |
135+
| `setup_terraform_binary.milliseconds` | Timer | Time spent downloading and unpacking a Terraform Community release. |
136+
| `setup_terraform_binary.download.bytes` | Gauge | Size of a downloaded Terraform Community version. |
137+
| `setup_terraform_binary.download.milliseconds` | Timer | Time spent downloading a Terraform Community release. |
138+
| `setup_terraform_binary.unpack.bytes` | Gauge | Size of an unpacked Terraform Community release. |
139+
| `setup_terraform_binary.unpack.milliseconds` | Timer | Time spent unpacking a Terraform Community release. |
123140
| `setup_terraform_config.milliseconds` | Timer | Time spent downloading and unpacking a Terraform configuration. |
124141
| `setup_terraform_config.download.bytes` | Gauge | Size of a downloaded Terraform configuration. |
125142
| `setup_terraform_config.download.milliseconds` | Timer | Time spent downloading a Terraform configuration. |

0 commit comments

Comments
 (0)