-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Link to tracking Issue: #2332 Testing: Unit tests are included Documentation: Journald receiver README.md is included
- Loading branch information
Showing
13 changed files
with
2,152 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM alpine:latest as prep | ||
FROM alpine:latest as prep | ||
RUN apk --update add ca-certificates | ||
|
||
ARG USER_UID=10001 | ||
|
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
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
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
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 @@ | ||
include ../../Makefile.Common |
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,30 @@ | ||
## `Journald Receiver` | ||
|
||
Parses Journald events from systemd journal using the [opentelemetry-log-collection](https://github.com/open-telemetry/opentelemetry-log-collection) library. | ||
Journald receiver is dependent on `journalctl` binary to be present and must be in the $PATH of the agent. | ||
Supported pipeline types: logs | ||
|
||
> :construction: This receiver is in alpha and configuration fields are subject to change. | ||
## Configuration | ||
|
||
| Field | Default | Description | | ||
| --- | --- | --- | | ||
| `directory` | /run/log/journal or /run/journal | A directory containing journal files to read entries from. | | ||
| `files` | | A list of journal files to read entries from | | ||
| `start_at` | `end` | At startup, where to start reading logs from the file. Options are beginning or end | | ||
| `units` | `[ssh, kubelet, docker, containerd]` | A list of units to read entries from | | ||
| `prioriry` | `info` | Filter output by message priorities or priority ranges | | ||
|
||
### Example Configurations | ||
```yaml | ||
receivers: | ||
journald: | ||
directory: /run/log/journal | ||
units: | ||
- ssh | ||
- kubelet | ||
- docker | ||
- containerd | ||
priority: info | ||
``` |
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,15 @@ | ||
// Copyright 2021 OpenTelemetry Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package journaldreceiver |
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,51 @@ | ||
module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver | ||
|
||
go 1.17 | ||
|
||
require ( | ||
github.com/open-telemetry/opentelemetry-collector-contrib/internal/stanza v0.0.0-00010101000000-000000000000 | ||
github.com/open-telemetry/opentelemetry-log-collection v0.21.0 | ||
github.com/stretchr/testify v1.7.0 | ||
go.opentelemetry.io/collector v0.36.1-0.20211004155959-190f8fbb2b9a | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) | ||
|
||
require ( | ||
github.com/antonmedv/expr v1.9.0 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/fsnotify/fsnotify v1.4.9 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/json-iterator/go v1.1.11 // indirect | ||
github.com/knadh/koanf v1.2.4 // indirect | ||
github.com/magiconair/properties v1.8.5 // indirect | ||
github.com/mitchellh/copystructure v1.2.0 // indirect | ||
github.com/mitchellh/mapstructure v1.4.2 // indirect | ||
github.com/mitchellh/reflectwalk v1.0.2 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.1 // indirect | ||
github.com/observiq/ctimefmt v1.0.0 // indirect | ||
github.com/pelletier/go-toml v1.9.3 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/rogpeppe/go-internal v1.6.1 // indirect | ||
github.com/spf13/cast v1.4.1 // indirect | ||
go.opentelemetry.io/collector/model v0.36.1-0.20211004155959-190f8fbb2b9a // indirect | ||
go.opentelemetry.io/otel v1.0.1 // indirect | ||
go.opentelemetry.io/otel/metric v0.24.0 // indirect | ||
go.opentelemetry.io/otel/trace v1.0.1 // indirect | ||
go.uber.org/atomic v1.9.0 // indirect | ||
go.uber.org/multierr v1.7.0 // indirect | ||
go.uber.org/zap v1.19.1 // indirect | ||
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect | ||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect | ||
golang.org/x/text v0.3.7 // indirect | ||
gonum.org/v1/gonum v0.9.3 // indirect | ||
google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08 // indirect | ||
google.golang.org/grpc v1.41.0 // indirect | ||
google.golang.org/protobuf v1.27.1 // indirect | ||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect | ||
) | ||
|
||
replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/stanza => ../../internal/stanza | ||
|
||
replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage => ../../extension/storage |
Oops, something went wrong.