Skip to content

Commit

Permalink
Merge pull request #32 from intergral/log-collection-update
Browse files Browse the repository at this point in the history
Fix local file log collection
  • Loading branch information
ibalal-intergral authored Feb 12, 2024
2 parents 3454645 + f25ffa8 commit 2947640
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions linux/observability-agent-autoconf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,14 @@ while true; do

# Add log collection
cat <<EOF >> "$CONFIG"
discovery.file "varlog" {
local.file_match "varlog" {
path_targets = [
{__path__ = "$path", job = "$job"},
]
}
loki.source.file "httpd" {
targets = discovery.file.varlog.targets
targets = local.file_match.varlog.targets
forward_to = [loki.write.lokiEndpoint.receiver]
}
Expand Down
4 changes: 2 additions & 2 deletions windows/observability-agent-autoconf.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ while ($true) {

# Add log collection
@"
discovery.file "varlog" {
local.file_match "varlog" {
path_targets = [
{__path__ = "$path", job = "$job"},
]
}
loki.source.file "httpd" {
targets = discovery.file.varlog.targets
targets = local.file_match.varlog.targets
forward_to = [loki.write.lokiEndpoint.receiver]
}
Expand Down

0 comments on commit 2947640

Please sign in to comment.