Updated on 2025-01-03 GMT+08:00

Viewing Monitoring Metrics

Function

This API is used to view monitoring metrics, including node metrics and graph instance performance monitoring metrics.

URI

GET /ges/v1.0/{project_id}/graphs/{graph_name}/om/metrics?real_time=&with_performance_metrics=

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For how to obtain the project ID, see Obtaining a Project ID.

graph_name

Yes

String

Graph name

Table 2 Query parameters

Parameter

Mandatory

Type

Description

real_time

No

Boolean

Whether to query real-time monitoring metrics. The value can be true or false. The default value is false.

  • false: Metrics for a graph instance within 2 minutes are queried.
  • true: Real-time monitoring metrics are queried, and the query is responded to in 3 to 5 seconds.

with_performance_metrics

No

Boolean

Whether to query performance metrics. The graph instance performance metrics and metrics of each node are returned. The value can be true or false. The default value is true. If set to false, only node metrics are returned, and the response time is reduced by 1 to 2 seconds.

Request Parameters

None

Response Parameters

Table 3 Response body parameters

Parameter

Type

Description

errorMessage

String

System prompt

  • If the execution succeeds, this parameter may be left blank.
  • If the execution fails, this parameter is used to display the error message.

errorCode

String

System prompt

  • If the execution succeeds, this parameter may be left blank.
  • If the execution fails, this parameter is used to display the error code.

project_id

String

Project ID

id

String

Graph ID

name

String

Graph name

timestamp

Long

Current timestamp

node_metrics

Array of objects

Node metrics

performance_metrics

Object

Performance metrics

Table 4 node_metrics parameter descriptions

Parameter

Type

Description

overview

Object

Node overview

disk_details

Array of objects

Disk details of the node

network_details

Array of objects

Network details of the node

Table 5 overview parameter descriptions

Parameter

Type

Description

ges_instance_name

String

Node name

instance_id

String

Node ID

work_ip

String

Node IP address

role

String

Node role

cpu_usage

Double

CPU usage

cpu_usage_usr

Double

CPU usage in user mode

cpu_usage_sys

Double

CPU usage in kernel mode

cpu_iowait

Double

CPU I/O wait rate

cpu_idle

Double

CPU idle rate

mem_total

Double

Total memory size, in GB

mem_usage

Double

Used memory size, in GB

mem_free

Double

Available memory size, in GB

mem_cached

Double

Memory cache size, in GB

mem_buffer

Double

Memory buffer size, in GB

disk_total

Double

Total disk space, in GB

disk_usage_avg

Double

Average disk usage

disk_used

Double

Used disk space, in GB

disk_available

Double

Total available disk space, in GB

disk_io_read

Double

Disk read rate of a node, in KB/s

disk_io_write

Double

Disk read rate of a node, in KB/s

disk_io

Double

Total read and write speed of a node's disk

swap_total

Double

Total swap disk space of a node

swap_free

Double

Remaining swap disk space of a node

network_io_rate

Double

Network I/O rate of a node, in KB/s

host_stat

Integer

Node status

host_name

String

Node name

Table 6 disk_details parameter descriptions

Parameter

Type

Description

disk_name

String

Disk name

disk_type

String

Disk type

total

Double

Total disk space

available

Double

Available disk space

used

Double

Used disk space

used_percentage

Integer

Disk usage

svctm

Long

Disk I/O service time, in milliseconds

await

Long

Disk I/O wait time, in milliseconds

util

Double

Disk I/O usage

write_rate

Double

Disk read rate

read_rate

Double

Disk write rate

Table 7 network_details parameter descriptions

Parameter

Type

Description

status

Integer

NIC status

interface_name

String

NIC name

packets_recv

Long

Number of received packets

packets_send

Long

Number of sent packets

packets_drop

Long

Number of lost packets

send_rate

Double

Sending rate, in KB/s

recv_rate

Double

Receiving rate, in KB/s

Table 8 performance_metrics parameter descriptions

Parameter

Type

Description

cpu_usage

Double

CPU usage

memory_usage

Double

Memory usage

disk_usage

Double

Average disk usage

disk_io_rate

Double

Disk I/O rate

network_io_rate

Double

Network I/O rate

tomcat_connections_usage

Double

Tomcat connection usage

qps

Long

Number of requests per second

storage_usage

Double

Graph storage usage

graph_name

String

Graph instance name

jvm_heap_usage

Double

Java heap memory usage

Example Request

GET http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/om/metrics?real_time=true

Example Response

Status code: 200

Example response for a successful request

{
    "node_metrics": [
        {
            "overview": {
                "network_io_rate": 8.51,
                "role": "ges-dispatch",
                "disk_io_write": 84.74,
                "mem_cached": 1.99,
                "cpu_usage_usr": 2.4,
                "cpu_usage_sys": 0.72,
                "disk_io_read": 3.99,
                "ges_instance_name": "ges_fdb_old-ges-dispatch-cn-1-1",
                "disk_used": 5.75,
                "swap_total": 0.0,
                "mem_buffer": 251.93,
                "disk_available": 244.15,
                "cpu_iowait": 0.04,
                "cpu_idle": 96.83,
                "disk_io": 88.73,
                "mem_total": 31.19,
                "instance_id": "e8d67304-6107-4935-9fe3-6cabf3d32adc",
                "mem_usage": 9.69,
                "disk_total": 249.9,
                "host_stat": "200",
                "mem_free": 25.94,
                "swap_free": 0.0,
                "cpu_usage": 3.12,
                "disk_usage_avg": 2.3,
                "work_ip": "172.16.29.231",
                "host_name": "ges_fdb_old-ges-dispatch-cn-1-1"
            },
            "disk_details": [
                {
                    "svctm": 0.0,
                    "total": 50.0,
                    "util": 0.07,
                    "write_rate": 65.59,
                    "disk_name": "vda",
                    "disk_type": "system",
                    "used_percentage": 5.54,
                    "available": 47.23,
                    "await": 15.7,
                    "read_rate": 3.84,
                    "used": 2.77
                },
                {
                    "svctm": 0.0,
                    "total": 99.95,
                    "util": 0.09,
                    "write_rate": 18.14,
                    "disk_name": "vdb",
                    "disk_type": "data",
                    "used_percentage": 2.79,
                    "available": 97.17,
                    "await": 40.31,
                    "read_rate": 0.06,
                    "used": 2.78
                },
                {
                    "svctm": 0.0,
                    "total": 99.95,
                    "util": 0.11,
                    "write_rate": 1.01,
                    "disk_name": "vdc",
                    "disk_type": "log",
                    "used_percentage": 0.19,
                    "available": 99.76,
                    "await": 2.14,
                    "read_rate": 0.09,
                    "used": 0.19
                }
            ],
            "network_details": [
                {
                    "send_rate": 0.08,
                    "packets_drop": 0,
                    "packets_recv": 698597,
                    "packets_send": 108397,
                    "interface_name": "eth0",
                    "recv_rate": 0.06,
                    "status": 1
                },
                {
                    "send_rate": 0.0,
                    "packets_drop": 0,
                    "packets_recv": 25766,
                    "packets_send": 21486,
                    "interface_name": "eth1",
                    "recv_rate": 0.0,
                    "status": 1
                },
                {
                    "send_rate": 5.33,
                    "packets_drop": 0,
                    "packets_recv": 2012566,
                    "packets_send": 3091470,
                    "interface_name": "eth2",
                    "recv_rate": 3.04,
                    "status": 1
                }
            ]
        }
    ],
    "performance_metrics": {
        "tomcat_connections_usage": 0.14,
        "network_io_rate": 10847.12,
        "graph_name": "ges_fdb_old",
        "disk_io_rate": 115.34,
        "qps": 0,
        "storage_usage": 0.63,
        "disk_usage": 2.98,
        "memory_usage": 29.92,
        "cpu_usage": 5.75,
        "jvm_heap_usage": 68.31
    },
    "project_id": "3571fe9ff5dc415d99adef84b6488e3b",
    "name": "ges_fdb_old",
    "id": "3518bb16-74b3-4259-a1d0-f38c2836cd11",
    "timestamp": 1733880320828
}

Status code: 400

Example response for a failed request

Http Status Code: 400 
{
    "errorMessage": "graph ges_fdb_hyg1 not exist.",
    "errorCode": "GES.8000"
}