forked from elastic/logstash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Health API] Add 1-min, 5-min backpressure and multipipeline test cas…
…es. (elastic#16550) * Health API: Add 1min 5min backpressure cases and improve Logstash temination logic. * Apply suggestions from code review Uncomment accidentally commented sources. * Update .buildkite/scripts/health-report-tests/tests/slow-start.yaml No need to wait for LS startup when using slow start scenario. * Apply suggestions from code review Co-authored-by: kaisecheng <[email protected]> * Standardize YAML structure and rename wait time to wait_seconds --------- Co-authored-by: kaisecheng <[email protected]>
- Loading branch information
1 parent
b571e8f
commit dfd256e
Showing
10 changed files
with
184 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
.buildkite/scripts/health-report-tests/tests/backpressure-1m.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: "Backpressured in 1min pipeline" | ||
config: | ||
- pipeline.id: backpressure-1m-pp | ||
config.string: | | ||
input { heartbeat { interval => 0.1 } } | ||
filter { failure_injector { degrade_at => [filter] } } | ||
output { stdout {} } | ||
pipeline.workers: 1 | ||
pipeline.batch.size: 1 | ||
conditions: | ||
full_start_required: true | ||
wait_seconds: 70 # give more seconds to make sure time is over the threshold, 1m in this case | ||
expectation: | ||
status: "yellow" | ||
symptom: "1 indicator is concerning (`pipelines`)" | ||
indicators: | ||
pipelines: | ||
status: "yellow" | ||
symptom: "1 indicator is concerning (`backpressure-1m-pp`)" | ||
indicators: | ||
backpressure-1m-pp: | ||
status: "yellow" | ||
symptom: "The pipeline is concerning; 1 area is impacted and 1 diagnosis is available" | ||
diagnosis: | ||
- id: "logstash:health:pipeline:flow:worker_utilization:diagnosis:1m-blocked" | ||
cause: "pipeline workers have been completely blocked for at least one minute" | ||
action: "address bottleneck or add resources" | ||
impacts: | ||
- id: "logstash:health:pipeline:flow:impact:blocked_processing" | ||
severity: 2 | ||
description: "the pipeline is blocked" | ||
impact_areas: ["pipeline_execution"] | ||
details: | ||
status: | ||
state: "RUNNING" | ||
flow: | ||
worker_utilization: | ||
last_1_minute: 100.0 |
39 changes: 39 additions & 0 deletions
39
.buildkite/scripts/health-report-tests/tests/backpressure-5m.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: "Backpressured in 5min pipeline" | ||
config: | ||
- pipeline.id: backpressure-5m-pp | ||
config.string: | | ||
input { heartbeat { interval => 0.1 } } | ||
filter { failure_injector { degrade_at => [filter] } } | ||
output { stdout {} } | ||
pipeline.workers: 1 | ||
pipeline.batch.size: 1 | ||
conditions: | ||
full_start_required: true | ||
wait_seconds: 310 # give more seconds to make sure time is over the threshold, 1m in this case | ||
expectation: | ||
status: "red" | ||
symptom: "1 indicator is unhealthy (`pipelines`)" | ||
indicators: | ||
pipelines: | ||
status: "red" | ||
symptom: "1 indicator is unhealthy (`backpressure-5m-pp`)" | ||
indicators: | ||
backpressure-5m-pp: | ||
status: "red" | ||
symptom: "The pipeline is unhealthy; 1 area is impacted and 1 diagnosis is available" | ||
diagnosis: | ||
- id: "logstash:health:pipeline:flow:worker_utilization:diagnosis:5m-blocked" | ||
cause: "pipeline workers have been completely blocked for at least five minutes" | ||
action: "address bottleneck or add resources" | ||
impacts: | ||
- id: "logstash:health:pipeline:flow:impact:blocked_processing" | ||
severity: 1 | ||
description: "the pipeline is blocked" | ||
impact_areas: ["pipeline_execution"] | ||
details: | ||
status: | ||
state: "RUNNING" | ||
flow: | ||
worker_utilization: | ||
last_1_minute: 100.0 | ||
last_5_minutes: 100.0 |
67 changes: 67 additions & 0 deletions
67
.buildkite/scripts/health-report-tests/tests/multipipeline.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: "Multi pipeline" | ||
config: | ||
- pipeline.id: slow-start-pp-multipipeline | ||
config.string: | | ||
input { heartbeat {} } | ||
filter { failure_injector { degrade_at => [register] } } | ||
output { stdout {} } | ||
pipeline.workers: 1 | ||
pipeline.batch.size: 1 | ||
- pipeline.id: normally-terminated-pp-multipipeline | ||
config.string: | | ||
input { generator { count => 1 } } | ||
output { stdout {} } | ||
pipeline.workers: 1 | ||
pipeline.batch.size: 1 | ||
- pipeline.id: abnormally-terminated-pp-multipipeline | ||
config.string: | | ||
input { heartbeat { interval => 1 } } | ||
filter { failure_injector { crash_at => filter } } | ||
output { stdout {} } | ||
pipeline.workers: 1 | ||
pipeline.batch.size: 1 | ||
conditions: | ||
full_start_required: false | ||
wait_seconds: 10 | ||
expectation: | ||
status: "red" | ||
symptom: "1 indicator is unhealthy (`pipelines`)" | ||
indicators: | ||
pipelines: | ||
status: "red" | ||
symptom: "1 indicator is unhealthy (`abnormally-terminated-pp-multipipeline`) and 2 indicators are concerning (`slow-start-pp-multipipeline`, `normally-terminated-pp-multipipeline`)" | ||
indicators: | ||
slow-start-pp-multipipeline: | ||
status: "yellow" | ||
symptom: "The pipeline is concerning; 1 area is impacted and 1 diagnosis is available" | ||
diagnosis: | ||
- cause: "pipeline is loading" | ||
action: "if pipeline does not come up quickly, you may need to check the logs to see if it is stalled" | ||
impacts: | ||
- impact_areas: ["pipeline_execution"] | ||
details: | ||
status: | ||
state: "LOADING" | ||
normally-terminated-pp-multipipeline: | ||
status: "yellow" | ||
symptom: "The pipeline is concerning; 1 area is impacted and 1 diagnosis is available" | ||
diagnosis: | ||
- cause: "pipeline has finished running because its inputs have been closed and events have been processed" | ||
action: "if you expect this pipeline to run indefinitely, you will need to configure its inputs to continue receiving or fetching events" | ||
impacts: | ||
- impact_areas: [ "pipeline_execution" ] | ||
details: | ||
status: | ||
state: "FINISHED" | ||
abnormally-terminated-pp-multipipeline: | ||
status: "red" | ||
symptom: "The pipeline is unhealthy; 1 area is impacted and 1 diagnosis is available" | ||
diagnosis: | ||
- cause: "pipeline is not running, likely because it has encountered an error" | ||
action: "view logs to determine the cause of abnormal pipeline shutdown" | ||
impacts: | ||
- description: "the pipeline is not currently processing" | ||
impact_areas: [ "pipeline_execution" ] | ||
details: | ||
status: | ||
state: "TERMINATED" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters