/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 |
---|---|---|
| string | Name of the node. |
Query parameters
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
| string | Start date for report. Format: YYYY-MM-DD | ||||||||
| string | End date for report. Format: YYYY-MM-DD | ||||||||
metrics | CSL | Use a comma separated list to specify more than one metric.
|
Response body
Metric: kpi_events_in
and kpi_events_out
.
Name | Type | Description | ||
---|---|---|---|---|
metric | array | |||
| timestamp | Timestamp | ||
| int | Value of the metrics in the given timestamp. | ||
| int |
Metric: all other metrics.
Name | Type | Description | ||
---|---|---|---|---|
metric | array | |||
| timestamp | Timestamp | ||
| 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} ] }