Skip to content

Commit

Permalink
Update documentation for rule tree
Browse files Browse the repository at this point in the history
  • Loading branch information
ppcad committed Dec 17, 2024
1 parent c16801b commit d4f3304
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
10 changes: 4 additions & 6 deletions doc/source/development/processor_how_to.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ This :py:class:`Config` class has to inherit from :py:class:`Processor.Config` a
- newprocessorname:
type: new_processor
specific_rules:
- tests/testdata/rules/specific/
generic_rules:
- tests/testdata/rules/generic/
rules:
- tests/testdata/rules_1/
- tests/testdata/rules_2/
new_config_parameter: config_value
"""
Expand Down Expand Up @@ -170,8 +169,7 @@ the general implementation of a new processor seen in :ref:`implementing_a_new_p
self.processor_attribute = []
self.metrics = self.NewProcessorMetrics(
labels=self.metric_labels,
generic_rule_tree=self._generic_tree.metrics,
specific_rule_tree=self._specific_tree.metrics,
rule_tree=self._rule_tree.metrics,
)
def _apply_rules(self, event, rule):
Expand Down
14 changes: 4 additions & 10 deletions doc/source/development/programaticly_start_logprep.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ An example with input connector and preprocessors could look like this:
{
"predetector": {
"type": "pre_detector",
"specific_rules": [
"examples/exampledata/rules/pre_detector/specific"
],
"generic_rules": [
"examples/exampledata/rules/pre_detector/generic"
"rules": [
"examples/exampledata/rules/pre_detector/rules"
],
"pre_detector_topic": "output_topic"
}
Expand Down Expand Up @@ -60,11 +57,8 @@ An example without input connector and preprocessors could look like this:
{
"predetector": {
"type": "pre_detector",
"specific_rules": [
"examples/exampledata/rules/pre_detector/specific"
],
"generic_rules": [
"examples/exampledata/rules/pre_detector/generic"
"rules": [
"examples/exampledata/rules/pre_detector/rules"
],
"pre_detector_topic": "output_topic"
}
Expand Down

0 comments on commit d4f3304

Please sign in to comment.