-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
83 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,46 @@ | ||
This test uses two different items in the collection. | ||
|
||
-- main.alloy -- | ||
foreach "testForeach" { | ||
collection = [6,4] | ||
var = "num" | ||
enable_metrics = true | ||
|
||
template { | ||
testcomponents.pulse "pt" { | ||
max = num | ||
frequency = "10ms" | ||
forward_to = [testcomponents.summation_receiver.sum.receiver] | ||
} | ||
} | ||
} | ||
|
||
// Similar to testcomponents.summation, but with a "receiver" export | ||
testcomponents.summation_receiver "sum" { | ||
} | ||
|
||
-- expected_metrics.prom -- | ||
|
||
# HELP alloy_component_controller_evaluating Tracks if the controller is currently in the middle of a graph evaluation | ||
# TYPE alloy_component_controller_evaluating gauge | ||
alloy_component_controller_evaluating{controller_id="",controller_path="/"} 0 | ||
alloy_component_controller_evaluating{controller_id="foreach_4_1",controller_path="/foreach.testForeach"} 0 | ||
alloy_component_controller_evaluating{controller_id="foreach_6_1",controller_path="/foreach.testForeach"} 0 | ||
# HELP alloy_component_controller_running_components Total number of running components. | ||
# TYPE alloy_component_controller_running_components gauge | ||
alloy_component_controller_running_components{controller_id="",controller_path="/",health_type="healthy"} 2 | ||
alloy_component_controller_running_components{controller_id="foreach_4_1",controller_path="/foreach.testForeach",health_type="healthy"} 1 | ||
alloy_component_controller_running_components{controller_id="foreach_6_1",controller_path="/foreach.testForeach",health_type="healthy"} 1 | ||
# HELP alloy_component_evaluation_queue_size Tracks the number of components waiting to be evaluated in the worker pool | ||
# TYPE alloy_component_evaluation_queue_size gauge | ||
alloy_component_evaluation_queue_size{controller_id="",controller_path="/"} 1 | ||
alloy_component_evaluation_queue_size{controller_id="foreach_4_1",controller_path="/foreach.testForeach"} 0 | ||
alloy_component_evaluation_queue_size{controller_id="foreach_6_1",controller_path="/foreach.testForeach"} 0 | ||
# HELP pulse_count | ||
# TYPE pulse_count counter | ||
pulse_count{component_id="testcomponents.pulse.pt",component_path="/foreach.testForeach/foreach_4_1"} 4 | ||
pulse_count{component_id="testcomponents.pulse.pt",component_path="/foreach.testForeach/foreach_6_1"} 6 | ||
|
||
-- expected_duration_metrics.prom -- | ||
|
||
6 |