Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Merge requests
!949
Prevent log explosion
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Prevent log explosion
harden-lggogin
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Jan David Mol
requested to merge
harden-lggogin
into
master
8 months ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
24661848
Show latest version
1 file
+
11
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
24661848
Prevent log explosion
· 24661848
Jan David Mol
authored
8 months ago
infra/jobs/station/logging.levant.nomad
+
11
−
8
Options
@@ -112,6 +112,9 @@ healthchecks.require_healthy = true
.timestamp = parse_timestamp(.ts, "%F %T,%3f") ?? .timestamp
.level = downcase!(.level || "info")
# hard limit on message size to prevent explosion
.message = truncate!(.message, limit: 8192, ellipsis: true)
# add nomad info
.nomad.job = .label."com.hashicorp.nomad.job_name" || ""
.nomad.task = .label."com.hashicorp.nomad.task_name" || ""
@@ -130,14 +133,14 @@ healthchecks.require_healthy = true
del(.host)
'''
[
sinks
.
console
]
# useful for debugging loki and/or grafana,
# since without them it is harder to see logs
# of for example crashing containers
type
=
"console"
inputs
=
[
"nomad-flags"
]
encoding
.
codec
=
"logfmt"
buffer
.
when_full
=
"drop_newest"
#
[sinks.console]
#
# useful for debugging loki and/or grafana,
#
# since without them it is harder to see logs
#
# of for example crashing containers
#
type = "console"
#
inputs = [ "nomad-flags" ]
#
encoding.codec = "logfmt"
#
buffer.when_full = "drop_newest"
[
sinks
.
loki
]
type
=
"loki"
inputs
=
[
"nomad-flags"
]
Loading