diff --git a/doc/source/development/notebooks/processor_examples/regex.ipynb b/doc/source/development/notebooks/processor_examples/regex.ipynb index c9e3ccd6b..80b2b1a0c 100644 --- a/doc/source/development/notebooks/processor_examples/regex.ipynb +++ b/doc/source/development/notebooks/processor_examples/regex.ipynb @@ -87,48 +87,9 @@ }, { "cell_type": "code", -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD - "execution_count": 2, -======= - "execution_count": 20, ->>>>>>> 21ac87d3 (Update regex notebook) -======= - "execution_count": 53, -======= - "execution_count": 2, ->>>>>>> 78a96b0d (Improving Notebook 2.) - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "[Deprecated]: regex_fields are no longer necessary. Use Lucene regex annotation.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ -<<<<<<< HEAD - "before: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/123log+/'}, '_op_type': 'create'}\n", - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/123log+/'}, '_op_type': 'create', '_index': '/123log+/-windows-devopslab'}\n", - "False\n" -======= - "before: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create'}\n", - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create', '_index': '/logs/-windows-devopslab'}\n" ->>>>>>> 78a96b0d (Improving Notebook 2.) - ] - } - ], -======= "execution_count": null, "metadata": {}, "outputs": [], ->>>>>>> 0a454895 (Improving Notebook 3.) "source": [ "rule_yaml = \"\"\"---\n", "filter: 'data_stream.type: \".*lo.*\"'\n", @@ -149,76 +110,6 @@ ] }, { -<<<<<<< HEAD - "cell_type": "code", -<<<<<<< HEAD - "execution_count": 78, ->>>>>>> 63a05f12 (Update regex notebook 3) -======= - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "## Das ist meiner nach falsch und sollte nur mit \"\\/logs\\/\" funktionieren" - ] - }, - { - "cell_type": "code", - "execution_count": 79, ->>>>>>> ec595eb3 (Cleaning up) - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "[Deprecated]: regex_fields are no longer necessary. Use Lucene regex annotation.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "before: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create'}\n", -<<<<<<< HEAD -<<<<<<< HEAD - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create', '_index': '/logs/-windows-devopslab'}\n" -======= - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create'}\n", -======= - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create', '_index': '/logs/-windows-devopslab'}\n", ->>>>>>> ec595eb3 (Cleaning up) - "False\n" ->>>>>>> 21ac87d3 (Update regex notebook) - ] - } - ], - "source": [ - "rule_yaml = \"\"\"---\n", -<<<<<<< HEAD - "filter: 'data_stream.type: \".*lo.*\"'\n", -======= - "filter: 'data_stream.type: \"/logs/\"' \n", ->>>>>>> 63a05f12 (Update regex notebook 3) - "regex_fields:\n", - " - \"data_stream.type\"\n", - "concatenator:\n", - " source_fields:\n", - " - data_stream.type\n", - " - data_stream.dataset\n", - " - data_stream.namespace\n", - " target_field: _index\n", - " separator: \"-\"\n", - " overwrite_target: false\n", - " delete_source_fields: false\n", - "\"\"\"\n", - "/\n", - "concat_with_rule(rule_yaml)\n" - ] - }, - { -======= ->>>>>>> 78a96b0d (Improving Notebook 2.) "cell_type": "markdown", "metadata": {}, "source": [ @@ -227,54 +118,12 @@ }, { "cell_type": "code", -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD - "execution_count": 3, -======= - "execution_count": 31, ->>>>>>> 21ac87d3 (Update regex notebook) -======= - "execution_count": 77, ->>>>>>> 63a05f12 (Update regex notebook 3) -======= - "execution_count": 3, ->>>>>>> 78a96b0d (Improving Notebook 2.) - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "before: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create'}\n", - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create', '_index': '/logs/-windows-devopslab'}\n" -<<<<<<< HEAD -======= - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create', '_index': '/logs/-windows-devopslab'}\n", - "False\n" ->>>>>>> 21ac87d3 (Update regex notebook) -======= ->>>>>>> 78a96b0d (Improving Notebook 2.) - ] - } - ], -======= "execution_count": null, "metadata": {}, "outputs": [], ->>>>>>> 0a454895 (Improving Notebook 3.) "source": [ "rule_yaml = \"\"\"---\n", -<<<<<<< HEAD -<<<<<<< HEAD "filter: 'data_stream.type: /.*log.*/' \n", -======= - "filter: 'data_stream.type: /.*lo.*/' \n", ->>>>>>> 21ac87d3 (Update regex notebook) -======= - "filter: 'data_stream.type: /.*log.*/' \n", ->>>>>>> 63a05f12 (Update regex notebook 3) "concatenator:\n", " source_fields:\n", " - data_stream.type\n", @@ -289,11 +138,6 @@ ] }, { -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 78a96b0d (Improving Notebook 2.) "cell_type": "markdown", "metadata": {}, "source": [ @@ -302,136 +146,9 @@ }, { "cell_type": "code", -<<<<<<< HEAD - "execution_count": 4, -<<<<<<< HEAD - "metadata": {}, - "outputs": [ - { -======= - "cell_type": "code", - "execution_count": 71, - "metadata": {}, - "outputs": [ - { -<<<<<<< HEAD - "name": "stderr", - "output_type": "stream", - "text": [ - "[Deprecated]: regex_fields are no longer necessary. Use Lucene regex annotation.\n" - ] - }, - { ->>>>>>> 21ac87d3 (Update regex notebook) -======= ->>>>>>> 32bf3e59 (Update regex notebook 2) - "name": "stdout", - "output_type": "stream", - "text": [ - "before: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create'}\n", -<<<<<<< HEAD -<<<<<<< HEAD - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create', '_index': '/logs/-windows-devopslab'}\n" -======= - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create'}\n", -======= - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create', '_index': '/logs/-windows-devopslab'}\n", ->>>>>>> 32bf3e59 (Update regex notebook 2) - "False\n" ->>>>>>> 21ac87d3 (Update regex notebook) - ] - } - ], - "source": [ - "rule_yaml = \"\"\"---\n", -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD - "filter: 'data_stream.type: /\\\\/lo.*/' \n", - " \n", -======= - "filter: 'data_stream.type: \".*lo.*\"' \n", - "regex_fields:\n", - " - \"data_stream.type\"\n", ->>>>>>> 21ac87d3 (Update regex notebook) -======= - "filter: 'data_stream.type: /\\/.*lo.*/' \n", ->>>>>>> 32bf3e59 (Update regex notebook 2) -======= - "filter: 'data_stream.type: /\\\\/.*lo.*/' \n", -======= - "metadata": {}, - "cell_type": "code", - "outputs": [], - "execution_count": null, - "source": "### Fehlerwarnung mit nur einem Escape." - }, - { - "metadata": {}, - "cell_type": "code", - "outputs": [], - "execution_count": null, - "source": [ - "rule_yaml = \"\"\"---\n", - "filter: 'data_stream.type: /\\/lo.*/' \n", ->>>>>>> ec595eb3 (Cleaning up) - " \n", ->>>>>>> 63a05f12 (Update regex notebook 3) - "concatenator:\n", - " source_fields:\n", - " - data_stream.type\n", - " - data_stream.dataset\n", - " - data_stream.namespace\n", - " target_field: _index\n", - " separator: \"-\"\n", - " overwrite_target: false\n", - " delete_source_fields: false\n", - "\"\"\"\n", -<<<<<<< HEAD -<<<<<<< HEAD - "concat_with_rule(rule_yaml)" - ] -======= - "\n", - "concat_with_rule(rule_yaml)\n" -======= - "concat_with_rule(rule_yaml)" ->>>>>>> 32bf3e59 (Update regex notebook 2) - ] - }, - { - "metadata": {}, - "cell_type": "code", - "outputs": [], - "execution_count": null, - "source": "### Zweimal Escapen ist richtig und funktioniert. Würde sich allerdings nicht eins zu eins in Opensearch kopieren lassen. " - }, - { - "cell_type": "code", - "execution_count": 87, -======= ->>>>>>> 78a96b0d (Improving Notebook 2.) - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "before: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create'}\n", -<<<<<<< HEAD - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create', '_index': '/logs/-windows-devopslab'}\n", - "False\n" -======= - "after: {'data_stream': {'dataset': 'windows', 'namespace': 'devopslab', 'type': '/logs/'}, '_op_type': 'create', '_index': '/logs/-windows-devopslab'}\n" ->>>>>>> 78a96b0d (Improving Notebook 2.) - ] - } - ], -======= "execution_count": null, "metadata": {}, "outputs": [], ->>>>>>> 0a454895 (Improving Notebook 3.) "source": [ "rule_yaml = \"\"\"---\n", "filter: 'data_stream.type: /\\\\/lo.*/' \n", @@ -448,17 +165,6 @@ "\"\"\"\n", "concat_with_rule(rule_yaml)" ] -<<<<<<< HEAD - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] ->>>>>>> 21ac87d3 (Update regex notebook) -======= ->>>>>>> 78a96b0d (Improving Notebook 2.) } ], "metadata": {