Skip to content

ListTopMachines

POST
/hopbox.admin.v1.MonitorService/ListTopMachines
curl --request POST \
--url https://example.com/hopbox.admin.v1.MonitorService/ListTopMachines \
--header 'Connect-Protocol-Version: 1' \
--header 'Connect-Timeout-Ms: 1000' \
--header 'Content-Type: application/json' \
--data '{ "orderBy": "MACHINE_USE_ORDER_UNSPECIFIED", "limit": 1 }'

ListTopMachines returns the running machines that use the most CPU, RAM, disk, or egress.

Connect-Protocol-Version
Connect-Protocol-Version

Define the version of the Connect protocol

number
Allowed value: 1

Define the version of the Connect protocol

Example

1
Connect-Timeout-Ms
Connect-Timeout-Ms

Define the timeout, in ms

number

Define the timeout, in ms

Example

1000
Media typeapplication/json
ListTopMachinesRequest

ListTopMachinesRequest selects the order and the number of machines.

object
orderBy
order_by
string
Allowed values: MACHINE_USE_ORDER_UNSPECIFIED MACHINE_USE_ORDER_CPU MACHINE_USE_ORDER_MEMORY MACHINE_USE_ORDER_DISK MACHINE_USE_ORDER_EGRESS
limit
limit

Limit is the most machines in the response, 1 to 100. 0 means 20.

integer format: int32

Success

Media typeapplication/json
ListTopMachinesResponse

ListTopMachinesResponse holds the running machines of the history, the most first.

object
sampleTime
sample_time

Sample_time is the time of the newest sample of a machine, or absent without one.

string format: date-time
machines
machines
Array<object>
MachineUse

MachineUse is what a running machine uses, from the series of its node.

object
machineId
machine_id

Machine_id is the ID of the machine.

string
name
name

Name is the name of the machine.

string
orgId
org_id

Org_id is the ID of the org of the machine.

string
orgName
org_name

Org_name is the name of the org. It is empty when the org is gone.

string
ownerEmail
owner_email

Owner_email is the first email of the first owner of the org, to tell the person.

string
size
size

Size is the name of the size of the machine.

string
vcpus
vcpus

Vcpus is the vCPUs of the size.

integer format: int32
memoryBytes
memory_bytes

Memory_bytes is the RAM of the size.

string format: int64
diskBytes
disk_bytes

Disk_bytes is the disk of the size.

string format: int64
serverId
server_id

Server_id is the ID of the node of the machine. It is empty when the node took the sample before its enrollment.

string
urlVisibility
url_visibility

Url_visibility is the visibility of the URL of the machine. It is unspecified when the machine is gone from the control store.

string
Allowed values: URL_VISIBILITY_UNSPECIFIED URL_VISIBILITY_PRIVATE URL_VISIBILITY_PUBLIC
cpuShare5m
cpu_share_5m

Cpu_share_5m is the share of its vCPUs that the machine used in the last 5 minutes. 1 is every vCPU all the time.

number format: double
cpuShare30m
cpu_share_30m

Cpu_share_30m is the same share over the last 30 minutes. It is absent until the samples of the machine cover the 30 minutes, such as for a machine that started 10 minutes ago.

number | null format: double
cpuShare1h
cpu_share_1h

Cpu_share_1h is the same share over the last hour, absent until the samples cover the hour.

number | null format: double
cpuHistory
cpu_history

Cpu_history is the share of its vCPUs that the machine used in each 30 minutes of the last 24 hours. ListTopMachines fills it. A step in which the machine did not run has no point.

Array<object>
SamplePoint

SamplePoint is a value of a trend at one time.

object
time
time

Time is the end of the step of the value.

string format: date-time
value
value
number format: double
memoryUsedBytes
memory_used_bytes

Memory_used_bytes is the host RAM that the machine holds now (hopbox_machine_memory_bytes).

string format: int64
diskUsedBytes
disk_used_bytes

Disk_used_bytes is the bytes that the sparse disk file of the machine holds now (hopbox_machine_disk_bytes).

string format: int64
egressBytes
egress_bytes

Egress_bytes is the bytes that the machine sent out in the last 24 hours.

string format: int64
egressConnections
egress_connections

Egress_connections counts the outbound connections that the machine opened in the last 24 hours.

string format: int64
total
total

Total counts the running machines of the history, also those past limit.

integer format: int32
grafanaUrl
grafana_url

Grafana_url is grafana_url of the install config, or empty.

string

Example

{
"sampleTime": "2023-01-15T01:30:15.01Z",
"machines": [
{
"urlVisibility": "URL_VISIBILITY_UNSPECIFIED",
"cpuHistory": [
{
"time": "2023-01-15T01:30:15.01Z"
}
]
}
]
}

Error

Media typeapplication/json
Connect Error
object
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

string
Allowed values: canceled unknown invalid_argument deadline_exceeded not_found already_exists permission_denied resource_exhausted failed_precondition aborted out_of_range unimplemented internal unavailable data_loss unauthenticated
message

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

string
details

A list of messages that carry the error details. There is no limit on the number of messages.

Array<object>

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.

object
type

A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo.

string
value

The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.

string format: byte
debug
Debug

Deserialized error detail payload. The ‘type’ field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.

object
key
additional properties
any
key
additional properties
any
key
additional properties
any

Example

{
"code": "canceled"
}