Application metrics
Application metrics are aggregated per container, service, and application. Metrics are related to CPU, memory, disk and network traffic and the metrics are collected once every 10 seconds for and aggregated every 30 seconds.
Application - per container metrics
A rich set of metrics are available per container
- Memory: memory used and available for the container as well as percentage.
- CPU
- nanoseconds: The total CPU usage of all tasks in the container.
- cpus: The CPUs limit for the container.
- shares: The CPU shares limit for the container. CPU shares is a relative priority between containers. If we have three containers with share 1024, 512, 512, then each container will get 0.5 CPU, 0.25 CPU, 0.25 CPU in a single CPU system
- percentage used: Percentage of CPU used in relation to limits. Calculated based on nanoseconds(t2) - nanoseconds(t1)/delta(nanoseconds)*CPUs. For example, if we have a limit of 2 CPUs and we get 30 seconds total usage over a 30 seconds interval = 50%
- Container layer: This will report size, used, free and percentage used for the container layer disk. Note well: this will only be reported if the underlying file system has quota support. If not, the metric will not be reported.
An example Volga message is shown below
"per-container": {
"service-instance": "fifth-srv-1",
"container": "alpine",
"memory": {
"used": 348160,
"total": 2087116800,
"percentage-used": 1
},
"cpu": {
"nanoseconds": 200690282,
"cpus": 1.0,
"shares": 1024,
"percentage-used": 1
},
"container-layer": {
"size": 4183040,
"used": 583868,
"free": 3599172,
"percentage-used": 14
}
}
Application - per service metrics
Ephemeral and persistent disk metrics are aggregated per service. The same precondition holds as above: this is only reported if the underlying file system has quota support.
Here you will see disc metrics like this:
{
"time": "2023-02-15T12:10:37.415Z",
"host": "gbg-1",
"application": "test-application",
"per-service": {
"service-instance": "svc-1",
"ephemeral-volumes": [
{
"size": 4884,
"used": 20,
"free": 4864,
"percentage-used": 1,
"volume-name": "cfg"
}
],
"persistent-volumes": []
}
},
The above says the ephemeral volume name cfg has ~5Mb of storage, and 1% is used.
Application - per application metrics
We divide application metrics related to the gateway network and the host.
Host metrics:
memory-percentage-used: Percentage of aggregated memory used by the application on this host in relation to total available memory.cpu-percentage-used: Percentage of maximum CPU used among all containers for the application on this host in relation to total available CPUs.disk-percentage-used: Percentage of maximum disk used among all container layer, ephemeral and persistent volumes for the application on this host. This metric is only reported if the underlying file system has quota support
An example of application host metrics is shown below:
{
"time": "2023-02-15T12:10:57.291Z",
"host": "gbg-1",
"application": "test-application",
"per-application": {
"hosts": [
{
"host": "gbg-1",
"memory-percentage-used": 11,
"cpu-percentage-used": 25,
"disk-percentage-used": 3
}
]
}
},
Network metrics:
This metric will show the transmitted and received traffic on the gateway network, that is, traffic originated outside the host or leaving the host. Two relative measures are most relevant:
- TX and RX bytes per second: Intensity of transmitted/received external traffic in bytes per second. This value is the average intensity over the interval between the last two reported samples.
- Upstream and downstream bandwidth utilization: If
upstream-bandwidth-per-host/downstream-bandwidth-per-hostlimit is configured for this application, then this value indicates the fraction of the available bandwidth used by the application. This value is based on thetx-bytes-per-second/rx-bytes-per-secondmetric.
An example payload is shown below:
{
"time": "2023-02-15T12:10:57.419Z",
"host": "gbg-1",
"application": "test-application",
"per-application": {
"gateway-network": {
"tx-packets": 56577,
"tx-bytes": 5479085,
"rx-packets": 59612,
"rx-bytes": 80352670,
"tx-packets-per-second": 5,
"tx-bytes-per-second": 562,
"rx-packets-per-second": 6,
"rx-bytes-per-second": 8095
}
}
},