Home

/logstash/nodes/{node}/kpis

Returns the KPIs of a specific node.

Request
GET http://unravel-host:3000/api/v1/logstash/nodes/{node}/kpis?start_time={date}&end_time={date}&metrics={value} 
Path parameters

Name

Type

Description

node

string

Name of the node.

Query parameters

Name

Type

Description

start_time

string

Start date for report.

Format: YYYY-MM-DD

end_time

string

End date for report.

Format: YYYY-MM-DD

metrics

CSL

Use a comma separated list to specify more than one metric.

kpi_events_in
kpi_events_out
jvm_heap_max_in_bytes
jvm_heap_used_in_bytes
cpu_percent
cpu_load_average_1m
cpu_load_average_5m
cpu_load_average_15m
Response body

Metric: kpi_events_in and kpi_events_out.

Name

Type

Description

metric

array

ts

timestamp

Timestamp

val

int

Value of the metrics in the given timestamp.

deriv_val

int

Metric: all other metrics.

Name

Type

Description

metric

array

ts

timestamp

Timestamp

val

int

Value of the metrics in the given timestamp.

Example

Request for metrics kpi_event_in, kpi_event_out, and cpu_percent:

curl -X GET "http://node.mycompany.com:3000/api/v1/logstash/nodes/node41.mycompany.com%/kpis?start_time=2020-01-01&end_time=2010-04-01&metrics=kpi_events_in,kpi_events_in,cpu_percent" -H  "accept: application/json" -H  "Authorization: JWT  token

Response:

{
    "events_in":[
      {"ts":1585742400000,"val":4001,"deriv_val":0},
      {"ts":1585753200000,"val":4001,"deriv_val":0},
      {"ts":1585764000000,"val":4001,"deriv_val":0}
    ],
    "events_out":[
      {"ts":1585742400000,"val":0,"deriv_val":0},
      {"ts":1585753200000,"val":0,"deriv_val":0},
      {"ts":1585764000000,"val":0,"deriv_val":0}
    ],
    "cpu_percent":[
      { "ts":1585746000000,"val":0},
      {"ts":1585749600000,"val":0},
      {"ts":1585753200000,"val":0},
      {"ts":1585756800000,"val":0},
      {"ts":1585760400000,"val":0},
      {"ts":1585764000000,"val":0}
    ]
}