Skip to content

Commit

Permalink
feat: files and changes for another spar service
Browse files Browse the repository at this point in the history
SPAR Issue bcgov/nr-spar#386

These are some of changes required to get another SPAR service sending
logs to OpenSearch. Note that some questions were made as comments, we
could use comments and reviews to get that working.
  • Loading branch information
RMCampos committed Sep 7, 2023
1 parent e8d2c1c commit d1f4304
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/server/app_spar.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
"context": {
"environment": "production"
}
},
{
"id": "spar-oracle",
"type": "app_spar_oracle",
"context": {
"environment": "production"
}
}
],
"context": {
Expand Down
9 changes: 9 additions & 0 deletions config/templates/app_spar_postgres/filter/filters.conf.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@
Add @metadata.keyAsPath true{% if organization_id %}
Add organization.id {{ organization_id }}{% endif %}{% if organization_name %}
Add organization.name {{ organization_name }}{% endif %}

[FILTER]
Name modify
Match {{typeTag}}.*
Add service.name spar_oracle_api
Add service.type oracle_api
Add @metadata.keyAsPath true{% if organization_id %}
Add organization.id {{ organization_id }}{% endif %}{% if organization_name %}
Add organization.name {{ organization_name }}{% endif %}
12 changes: 12 additions & 0 deletions config/templates/app_spar_postgres/input/inputs.conf.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@
DB {{inputDb}}
Read_from_Head True
Refresh_Interval 15

[INPUT]
Name tail
Tag {{typeTag}}-oracle.log {# typeTag references config/server/app_spar.json file, apps.id, in this case, spar. Is that correct? #}
Buffer_Max_Size 1024k
Parser {{typeTag}}.json {# can we use the same parser, right? #}
Path {{inputLogPath}} {# how should we reference another input file? creating another template? similar to app_spar_postgres.json? #}
Path_Key log_file_path
Offset_Key event_sequence
DB {{inputDb}}
Read_from_Head True
Refresh_Interval 15

0 comments on commit d1f4304

Please sign in to comment.