Skip to content

Commit

Permalink
Improving Notebook 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
MoessnerFabian(Group) committed Jan 7, 2025
1 parent 8abfea6 commit 402e600
Showing 1 changed file with 0 additions and 294 deletions.
294 changes: 0 additions & 294 deletions doc/source/development/notebooks/processor_examples/regex.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": [
Expand All @@ -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",
Expand All @@ -289,11 +138,6 @@
]
},
{
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 78a96b0d (Improving Notebook 2.)
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -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",
Expand All @@ -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": {
Expand Down

0 comments on commit 402e600

Please sign in to comment.