Skip to content

Commit

Permalink
confgenerator: Send Log Pipeline Ping every 10 minutes. (#1495)
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscovalentecastro authored Jan 9, 2024
1 parent aebc2cf commit 1725694
Show file tree
Hide file tree
Showing 679 changed files with 4,766 additions and 2 deletions.
16 changes: 16 additions & 0 deletions confgenerator/self_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,21 @@ func healthChecksLogsPath() string {
return path.Join("${logs_dir}", "health-checks.log")
}

func generateHealthLoggingPingComponent(ctx context.Context) []fluentbit.Component {
return []fluentbit.Component{
{
Kind: "INPUT",
Config: map[string]string{
"Name": "dummy",
"Tag": healthLogsTag,
"Dummy": `{"code": "LogPingOpsAgent", "severity": "DEBUG"}`,
"Interval_Sec": "600",
"Interval_NSec": "0",
},
},
}
}

// This method creates a file input for the `health-checks.log` file, a json parser for the
// structured logs and a grep filter to avoid ingesting previous content of the file.
func generateHealthChecksLogsComponents(ctx context.Context) []fluentbit.Component {
Expand Down Expand Up @@ -213,6 +228,7 @@ func generateSelfLogsProcessingComponents(ctx context.Context) []fluentbit.Compo

func (uc *UnifiedConfig) generateSelfLogsComponents(ctx context.Context, userAgent string) []fluentbit.Component {
out := make([]fluentbit.Component, 0)
out = append(out, generateHealthLoggingPingComponent(ctx)...)
out = append(out, generateFluentBitSelfLogsComponents(ctx)...)
out = append(out, generateHealthChecksLogsComponents(ctx)...)
out = append(out, generateSelfLogsSamplingComponents(ctx)...)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
Tag host.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
Tag host.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
Name systemd
Tag default_pipeline.journald

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
Name systemd
Tag default_pipeline.journald

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
Name winlog
Tag default_pipeline.windows_event_log

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
Name winlog
Tag default_pipeline.windows_event_log

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
Name winlog
Tag default_pipeline.windows_event_log

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
Name winlog
Tag default_pipeline.windows_event_log

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
Name winlog
Tag default_pipeline.windows_event_log

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
Name winlog
Tag default_pipeline.windows_event_log

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
Name winlog
Tag default_pipeline.windows_event_log

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
Name winlog
Tag default_pipeline.windows_event_log

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
Tag default_pipeline.syslog
storage.type filesystem

[INPUT]
Dummy {"code": "LogPingOpsAgent", "severity": "DEBUG"}
Interval_NSec 0
Interval_Sec 600
Name dummy
Tag ops-agent-health

[INPUT]
Buffer_Chunk_Size 512k
Buffer_Max_Size 2M
Expand Down
Loading

0 comments on commit 1725694

Please sign in to comment.