Skip to main content

Home

Logstash endpoints
/logstash/pipelines/{pipeline}/kpis

Returns the KPIs of a specific pipeline.

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

Name

Type

Description

pipeline

string

Name of the pipeline.

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 retrieve both metrics.

pipeline_num_events_in: Number of events

pipeline_num_events_out: Number of events

Response body

Name

Type

Description

metric

array

 

ts

int

Timestamp

val

int

Value of the metrics in a given timestamp

deriv_val

int

Example

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).

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

None

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

string

kpi_events_in: Number of events

kpi_events_out: Number of events

Response body

Name

Type

Description

metric

array

list metric

ts

timestamp

Timestamp

val

int

Value of the metric in a given timestamp.

deriv_val

int

Examples

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.

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

None.

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

Response body

Name

Type

Description

array

 

name

string

Name of node.

cpu_percent

float

CPU usage for the Logstash process.

jvm_heap_commited_in_bytes

bytes

JVM heap memory committed.

jvm_heap_max_in_bytes

bytes

Total JVM heap memory available.

jvm_heap_used_in_bytes

bytes

JVM heap memory used.

jvm_uptime_in_millis

ms

Time since JVM has been up and active.

kpi_events_filtered

int

Number of filtered events.

kpi_events_in

int

Number of events flowing into node/pipeline.

kpi_events_out

int

Number of events flowing out of node/pipeline.

kpi_failure_reloads

int

Failed reloads.

kpi_success_reloads

int

Successful reloads.

version

string

Logstash version

Examples

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.

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}
    ]
}
/logstash/pipelines/kpis

Returns overall average KPIs for all pipelines in the logstash.

Request
GET http://unravel-host:3000/api/v1/logstash/pipelines/kpis?start_time=(date}&end_time={date}&metric={value}"  
Path parameters

None

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

string

pipeline_num_events_in: Number of events

pipeline_num_events_out: Number of events

Response body

Name

Type

Description

metric

array

list metric

ts

timestamp

Timestamp

val

int

Value of the metrics in a given timestamp.

deriv_val

int

Examples

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.

Request
GET http://unravel-host:3000/api/v1/logstash/pipelines/list?start_time=(date}&end_time={date}" 
Path parameters

None.

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

Response body

Name

Type

Description

array

 

name

string

Name of the pipeline.

nodes

array

List of node names.

config_reload_interval

sec

Time interval that specifies how often Logstash checks the config files for changes in the pipeline (in seconds).

pipeline_batch_size

int

Maximum number of events that an individual worker thread collects before executing filters and outputs.

pipeline_duration_in_millis

ms

pipeline_num_events_filtered

int

Current number of events that are filtered.

pipeline_num_events_events_in

int

Total events flowing into the selected pipeline,

pipeline_num_events_out

int

Total events flowing out of the selected pipeline,

pipeline_num_workers

int

Number of threads that are run for filtering and output processing.

queue_type_memory

string

reload_failures

int

Total number of reload failures.

Example

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.

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

Name

Type

Description

pipeline

string

Name of the pipeline.

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 retrieve both metrics.

pipeline_num_events_in: Number of events

pipeline_num_events_out: Number of events

Response body

Name

Type

Description

metric

array

ts

timestamp

Timestamp

val

int

Value of the metrics for a given timestamp.

deriv_val

int

Example

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}
    ]
}