-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
confgenerator : Sample Fluent-bit Self Logs as Health Logs (#1300)
This PR adds filters to sample specific logs fluent-bit self-logs and transform them into ops-agent-health logs, following the Structured Ops Agent Health Logs format(#1290). The following fluent-bit logs are sampled : - Code : LogPipelineErr, Match : [error] [lib] backend failed - Code : LogParseErr, Match : [error] [parser] cannot parse
- Loading branch information
1 parent
a61363a
commit 4330da4
Showing
2,423 changed files
with
43,229 additions
and
31,009 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
...ward_compatible_with_explicit_exporters/golden/linux/0f15dbe303dc7122d43443c9a4c31632.lua
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
...ward_compatible_with_explicit_exporters/golden/linux/4d6012ff003886818fb9b9285b4af962.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
function process(tag, timestamp, record) | ||
local __field_0 = (function() | ||
return record["severity"] | ||
end)(); | ||
(function(value) | ||
record["severity"] = value | ||
end)(nil); | ||
local v = __field_0; | ||
if v == "debug" then v = "DEBUG" | ||
elseif v == "error" then v = "ERROR" | ||
elseif v == "info" then v = "INFO" | ||
elseif v == "warn" then v = "WARNING" | ||
end | ||
(function(value) | ||
record["logging.googleapis.com/severity"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
38 changes: 38 additions & 0 deletions
38
...ward_compatible_with_explicit_exporters/golden/linux/68d6a3a0e8edf37868e1bf94adc737f4.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
function process(tag, timestamp, record) | ||
local __field_0 = (function() | ||
return record["message"] | ||
end)(); | ||
local v = __field_0; | ||
if v == "LogParseErr" then v = "Ops Agent failed to parse logs, Code: LogParseErr, Documentation: https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/troubleshoot-find-info" | ||
elseif v == "LogPipelineErr" then v = "Ops Agent logging pipeline failed, Code: LogPipelineErr, Documentation: https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/troubleshoot-find-info" | ||
end | ||
(function(value) | ||
record["message"] = value | ||
end)(v) | ||
local v = "ops-agent"; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["agent.googleapis.com/health/agentKind"] = value | ||
end)(v) | ||
local v = "latest"; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["agent.googleapis.com/health/agentVersion"] = value | ||
end)(v) | ||
local v = "v1"; | ||
(function(value) | ||
if record["logging.googleapis.com/labels"] == nil | ||
then | ||
record["logging.googleapis.com/labels"] = {} | ||
end | ||
record["logging.googleapis.com/labels"]["agent.googleapis.com/health/schemaVersion"] = value | ||
end)(v) | ||
return 2, timestamp, record | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ldens/all-backward_compatible_with_explicit_exporters/golden/linux/fluent_bit_parser.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.