Logstash endpoints
/logstash/pipelines/{pipeline}/kpis
Returns the KPIs of a specific pipeline.
GET http://unravel-host
:3000/api/v1/logstash/pipelines/{pipeline}
/kpis?start_time={date}
&end_time={date}
&metrics={value}
Name | Type | Description |
---|---|---|
| string | Name of the pipeline. |
Name | Type | Description |
---|---|---|
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
| CSL | Use a comma separated list to retrieve both metrics. pipeline_num_events_in: Number of events pipeline_num_events_out: Number of events |
Name | Type | Description | ||
---|---|---|---|---|
metric | array |
| ||
| int | Timestamp | ||
| int | Value of the metrics in a given timestamp | ||
| int |
Request for both metrics:
curl -X GET "http://node.mycompany.com:3000/api/v1/logstash/pipelines/main/kpis?start_time=2020-01-01&end_time=2010-04-01&metrics=pipeline_num_events_in,pipeline_num_events_out" -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} ] }
/logstash/nodes/kpis
Returns overall average KPIs of all nodes in logstash (events in and events out).
GET http://unravel-host
:3000/api/v1/logstash/nodes/kpis?start_time={date}
&end_time={date}
&metric={value}
None
Name | Type | Description |
---|---|---|
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
metrics | string |
|
Name | Type | Description | ||
---|---|---|---|---|
metric | array | list metric | ||
| timestamp | Timestamp | ||
| int | Value of the metric in a given timestamp. | ||
| int |
Requestbody:
Metric: kpi_event_in:
curl -X GET "http://node.mycompany.com:3000/api/v1/logstash/nodes/kpis?start_time=2020-01-01&end_time=2020-04-01&metrics=kpi_events_in" -H; "accept: application/json" -H "Authorization: JWT token
Response body:
{ "events_in": [ { "ts": 1585720800000, "val": 0, "deriv_val": 0 } ] }
Request:
Metric: kpi_event_out:
curl -X GET "http://node.mycompany.com:3000/api/v1/logstash/nodes/kpis?start_time=2020-01-01&end_time=2020-04-01&metrics=kpi_events_out" -H; "accept: application/json" -H "Authorization: JWT token
Response body:
{ "events_out": [ { "ts": 1585720800000, "val": 0, "deriv_val": 0 } ] }
/logstash/nodes/list
Returns the list of nodes in the logstash.
GET http://unravel-host
:3000/api/v1/logstash/nodes/list?start_time={date}
&end_time={date}
None.
Name | Type | Description |
---|---|---|
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
Name | Type | Description | |
---|---|---|---|
array |
| ||
| string | Name of node. | |
| float | CPU usage for the Logstash process. | |
| bytes | JVM heap memory committed. | |
| bytes | Total JVM heap memory available. | |
| bytes | JVM heap memory used. | |
| ms | Time since JVM has been up and active. | |
| int | Number of filtered events. | |
| int | Number of events flowing into node/pipeline. | |
| int | Number of events flowing out of node/pipeline. | |
| int | Failed reloads. | |
| int | Successful reloads. | |
| string | Logstash version |
Request:
curl -X GET "http://node.mycompany.com:3000/api/v1/logstash/nodes/list?start_time=2020-01-01&end_time=2020-04-01" -H "accept: application/json" -H "Authorization: JWT JWT token
Response body:
[ { "name": "node.mycompany.com:9600", "cpu_percent": 0, "jvm_heap_commited_in_bytes": 1037959168, "jvm_heap_max_in_bytes": 1037959168, "jvm_heap_used_in_bytes": 490277104, "jvm_uptime_in_millis": 4363410100 "kpi_events_filtered": 0, "kpi_events_in": 0, "kpi_events_out": 0, "kpi_failure_reloads": 0, "kpi_success_reloads": 0, "version": "6.8.0" } ]
/logstash/nodes/{node}/kpis
Returns the KPIs of a specific node.
GET http://unravel-host
:3000/api/v1/logstash/nodes/{node}
/kpis?start_time={date}
&end_time={date}
&metrics={value}
Name | Type | Description |
---|---|---|
| string | Name of the node. |
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.
|
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. |
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} ] }
/logstash/pipelines/kpis
Returns overall average KPIs for all pipelines in the logstash.
GET http://unravel-host
:3000/api/v1/logstash/pipelines/kpis?start_time=(date}
&end_time={date}
&metric={value}
"
None
Name | Type | Description |
---|---|---|
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
metrics | string | pipeline_num_events_in: Number of events pipeline_num_events_out: Number of events |
Name | Type | Description | ||
---|---|---|---|---|
metric | array | list metric | ||
| timestamp | Timestamp | ||
| int | Value of the metrics in a given timestamp. | ||
| int |
Request for Metric: kpi_event_in:
curl -X GET "http://node.mycompany.com:3000/api/v1/logstash/pipelines/kpis?start_time=2020-01-01&end_time=2020-04-01&metrics=pipeline_num_events_in" -H; "accept: application/json" -H "Authorization: JWT token
Response body:
{ "events_in": [ { "ts": 1585720800000, "val": 0, "deriv_val": 0 } ] }
Request for Metric: kpi_event_out:
curl -X GET "http://node.mycompany.com:3000/api/v1/logstash/pipelines/kpis?start_time=2020-01-01&end_time=2020-04-01&metrics=pipeline_num_events_out" -H; "accept: application/json" -H "Authorization: JWT token
Response body:
{ "events_out": [ { "ts": 1585720800000, "val": 0, "deriv_val": 0 } ] }
/logstash/pipelines/list
Returns the list of pipelines and their metrics in the logstash.
GET http://unravel-host
:3000/api/v1/logstash/pipelines/list?start_time=(date}&end_time={date}"
None.
Name | Type | Description |
---|---|---|
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
Name | Type | Description | |
---|---|---|---|
array |
| ||
| string | Name of the pipeline. | |
| array | List of node names. | |
| sec | Time interval that specifies how often Logstash checks the config files for changes in the pipeline (in seconds). | |
| int | Maximum number of events that an individual worker thread collects before executing filters and outputs. | |
| ms | ||
| int | Current number of events that are filtered. | |
| int | Total events flowing into the selected pipeline, | |
| int | Total events flowing out of the selected pipeline, | |
| int | Number of threads that are run for filtering and output processing. | |
| string | ||
| int | Total number of reload failures. |
Request:
curl -X GET "http://node.mycompany.com:3000/api/v1/logstash/pipelines/list?start_time=2020-01-01&end_time=2020-04-01" -H "accept: application/json" -H "Authorization: JWT JWT token
Response:
[ { "name": "main", "nodes": [ "node41.mycompany.com##9600##main" ], "config_reload_interval": 3000000000, "pipeline_batch_size": 125, "pipeline_duration_in_millis": 0, "pipeline_num_events_filtered": 0, "pipeline_num_events_in": 0, "pipeline_num_events_out": 0, "pipeline_num_workers": 16, "queue_type_memory": "memory", "reload_failures": 0, "reload_successes": 0 } ]
/logstash/pipelines/{pipeline}/kpis
Returns the KPIs of a specific pipeline.
GET http://unravel-host
:3000/api/v1/logstash/pipelines/{pipeline}
/kpis?start_time={date}
&end_time={date}
&metrics={value}
Name | Type | Description |
---|---|---|
| string | Name of the pipeline. |
Name | Type | Description |
---|---|---|
| string | Start date for report. Format: YYYY-MM-DD |
| string | End date for report. Format: YYYY-MM-DD |
| CSL | Use a comma separated list to retrieve both metrics. pipeline_num_events_in: Number of events pipeline_num_events_out: Number of events |
Name | Type | Description | ||
---|---|---|---|---|
metric | array | |||
| timestamp | Timestamp | ||
| int | Value of the metrics for a given timestamp. | ||
| int |
Request for both metrics:
curl -X GET "http://node.mycompany.com:3000/api/v1/logstash/pipelines/main/kpis?start_time=2020-01-01&end_time=2010-04-01&metrics=pipeline_num_events_in,pipeline_num_events_out" -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} ] }