mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
parent
2249a03edb
commit
9618b658f7
2 changed files with 37 additions and 34 deletions
|
@ -11,15 +11,38 @@ describe LogStash::Api::Modules::NodeStats do
|
|||
|
||||
# DSL describing response structure
|
||||
root_structure = {
|
||||
"events"=>{
|
||||
"in"=>Numeric,
|
||||
"filtered"=>Numeric,
|
||||
"out"=>Numeric
|
||||
},
|
||||
"jvm"=>{
|
||||
"threads"=>{
|
||||
"count"=>Numeric,
|
||||
"peak_count"=>Numeric
|
||||
},
|
||||
"mem" => {
|
||||
"heap_used_in_bytes" => Numeric,
|
||||
"heap_used_percent" => Numeric,
|
||||
"heap_committed_in_bytes" => Numeric,
|
||||
"heap_max_in_bytes" => Numeric,
|
||||
"non_heap_used_in_bytes" => Numeric,
|
||||
"non_heap_committed_in_bytes" => Numeric,
|
||||
"pools" => {
|
||||
"survivor" => {
|
||||
"peak_used_in_bytes" => Numeric,
|
||||
"used_in_bytes" => Numeric,
|
||||
"peak_max_in_bytes" => Numeric,
|
||||
"max_in_bytes" => Numeric
|
||||
},
|
||||
"old" => {
|
||||
"peak_used_in_bytes" => Numeric,
|
||||
"used_in_bytes" => Numeric,
|
||||
"peak_max_in_bytes" => Numeric,
|
||||
"max_in_bytes" => Numeric
|
||||
},
|
||||
"young" => {
|
||||
"peak_used_in_bytes" => Numeric,
|
||||
"used_in_bytes" => Numeric,
|
||||
"peak_max_in_bytes" => Numeric,
|
||||
"max_in_bytes" => Numeric
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"process"=>{
|
||||
|
@ -33,35 +56,14 @@ describe LogStash::Api::Modules::NodeStats do
|
|||
"total_in_millis"=>Numeric,
|
||||
"percent"=>Numeric
|
||||
}
|
||||
},
|
||||
"mem" => {
|
||||
"heap_used_in_bytes" => Numeric,
|
||||
"heap_used_percent" => Numeric,
|
||||
"heap_committed_in_bytes" => Numeric,
|
||||
"heap_max_in_bytes" => Numeric,
|
||||
"non_heap_used_in_bytes" => Numeric,
|
||||
"non_heap_committed_in_bytes" => Numeric,
|
||||
"pools" => {
|
||||
"survivor" => {
|
||||
"peak_used_in_bytes" => Numeric,
|
||||
"used_in_bytes" => Numeric,
|
||||
"peak_max_in_bytes" => Numeric,
|
||||
"max_in_bytes" => Numeric
|
||||
},
|
||||
"old" => {
|
||||
"peak_used_in_bytes" => Numeric,
|
||||
"used_in_bytes" => Numeric,
|
||||
"peak_max_in_bytes" => Numeric,
|
||||
"max_in_bytes" => Numeric
|
||||
},
|
||||
"young" => {
|
||||
"peak_used_in_bytes" => Numeric,
|
||||
"used_in_bytes" => Numeric,
|
||||
"peak_max_in_bytes" => Numeric,
|
||||
"max_in_bytes" => Numeric
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"pipeline" => {
|
||||
"events" => {
|
||||
"in" => Numeric,
|
||||
"filtered" => Numeric,
|
||||
"out" => Numeric
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test_api_and_resources(root_structure)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# encoding: utf-8
|
||||
API_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "lib", "logstash", "api"))
|
||||
|
||||
require "stud/task"
|
||||
require "logstash/devutils/rspec/spec_helper"
|
||||
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
|
||||
require "lib/api/support/resource_dsl_methods"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue