Skip to content

Commit e6c4be5

Browse files
committed
fix merge conflict
2 parents a1dbdad + f9e62cc commit e6c4be5

File tree

1 file changed

+39
-6
lines changed

1 file changed

+39
-6
lines changed

container-metrics.html.md.erb

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,28 +73,39 @@ The following table describes all Diego container metrics:
7373
<td>The log rate limit in bytes per second for an app instance.</td>
7474
<td><code>float64</code></td>
7575
</tr>
76+
</tr><tr>
77+
<td><code>rx_bytes</code></td>
78+
<td>Received network traffic in bytes for an app instance.</td>
79+
<td><code>uint64</code></td>
80+
</tr>
81+
</tr><tr>
82+
<td><code>tx_bytes</code></td>
83+
<td>Transmitted network traffic in bytes for an app instance.</td>
84+
<td><code>uint64</code></td>
85+
</tr>
7686
</table>
7787

7888
The way that Diego emits container metrics differs depending on the version of Loggregator used in your <%= vars.app_runtime_abbr %> deployment:
7989

8090
* **Loggregator v1:** Diego emits most container metrics in a `ContainerMetric` envelope. Diego emits the `absolute_entitlement`, `absolute_usage`,
8191
`container_age`, `log_rate`, and `log_rate_limit` container metrics in `ValueMetric` envelopes.
8292

83-
* **Loggregator v2:** Diego emits all container metrics in gauge envelopes. Diego emits the `absolute_entitlement`, `absolute_usage`, `container_age`, `log_rate`, and `log_rate_limit` container metrics in separate gauge envelopes from other container metrics. The container metrics come in three envelopes:
93+
* **Loggregator v2:** Diego emits all container metrics in gauge and counter envelopes. Diego emits the `absolute_entitlement`, `absolute_usage`, `container_age`, `log_rate`, and `log_rate_limit` container metrics in separate gauge envelopes from other container metrics. The container metrics come in five envelopes:
8494
* One envelope containing `cpu`, `disk`, `disk_quota`, `memory`, and `memory_quota`
8595
* One envelope containing `absolute_entitlement`, `absolute_usage`, and `container_age`
8696
* One envelope containing `log_rate` and `log_rate_limit`
97+
* One envelope containing `rx_bytes`
98+
* One envelope containing `tx_bytes`
8799

88100

89101
## <a id='cf-cli'></a> Retrieving container metrics from the cf CLI
90102

91103
You can retrieve container metrics using the Cloud Foundry Command Line Interface (cf CLI).
92104

93-
To retrieve CPU, memory, and disk metrics for all instances of an application, see [Retrieve CPU, Memory, and Disk Metrics](#cpu-mem-disk).
94-
95-
To retrieve CPU entitlement metrics for all instances of an application, see [Retrieve CPU Entitlement Metrics](#cpu-entitlement).
96-
97-
To determine when an application has exceeded its CPU entitlement, see [Monitor Apps That Exceed Their CPU Entitlement](#cpu-entitlement).
105+
* To retrieve CPU, memory, and disk metrics for all instances of an application, see [Retrieve CPU, memory, and disk metrics](#cpu-mem-disk).
106+
* To retrieve CPU entitlement metrics for all instances of an app, see [Retrieve CPU Entitlement metrics](#cpu-entitlement).
107+
* To determine when an app has exceeded its CPU entitlement, see [Monitor apps that exceed their CPU Entitlement](#cpu-entitlement).
108+
* To retrieve network traffic metrics for all instances of an app, see [Retrieve network traffic metrics](#cf-network-traffic).
98109

99110
### <a id='cf-mem-disk'></a> Retrieving CPU, Memory, and Disk metrics
100111

@@ -188,3 +199,25 @@ Plug-in](https://github.com/cloudfoundry/cpu-entitlement-plugin/releases) reposi
188199
</pre>
189200
The previous example output shows that the three listed apps have an average CPU usage that exceeds 100% of their entitlements. When an app's average CPU usage
190201
exceeds its CPU entitlement, consider increasing their CPU entitlement to ensure that they do not become throttled.
202+
203+
### <a id='cf-network-traffic'></a> Retrieve network traffic metrics
204+
205+
To retrieve received- and transmitted bytes for all instances of an app:
206+
207+
1. Install the Log Cache CLI Plug-in from the [Log Cache cf CLI Plugin](https://github.com/cloudfoundry/log-cache-cli) repository on GitHub.
208+
209+
1. In a terminal window, run:
210+
211+
```
212+
cf tail --name-filter="bytes" APP-NAME
213+
```
214+
Where `APP-NAME` is the name of the app.
215+
<br>
216+
<br>
217+
This command returns `rx_bytes` and `tx_bytes` metrics for all instances of the app, similar to the following example:
218+
<pre class="terminal">
219+
2023-08-10T13:27:50.27+0000 [my-app/0] COUNTER rx_bytes:24842
220+
2023-08-10T13:27:50.27+0000 [my-app/0] COUNTER tx_bytes:24306
221+
2023-08-10T13:27:50.27+0000 [my-app/1] COUNTER rx_bytes:14832
222+
2023-08-10T13:27:50.27+0000 [my-app/1] COUNTER tx_bytes:32312
223+
</pre>

0 commit comments

Comments
 (0)