diff --git a/.ci/packaging.groovy b/.ci/packaging.groovy index 7c4ce7b5e8f..7be1628e138 100644 --- a/.ci/packaging.groovy +++ b/.ci/packaging.groovy @@ -101,7 +101,6 @@ pipeline { 'auditbeat', 'filebeat', 'heartbeat', - 'journalbeat', 'metricbeat', 'packetbeat', 'winlogbeat', @@ -111,7 +110,6 @@ pipeline { 'x-pack/filebeat', 'x-pack/functionbeat', 'x-pack/heartbeat', - // 'x-pack/journalbeat', 'x-pack/metricbeat', 'x-pack/osquerybeat', 'x-pack/packetbeat', @@ -199,7 +197,6 @@ pipeline { 'auditbeat', 'filebeat', 'heartbeat', - 'journalbeat', 'metricbeat', 'packetbeat', 'x-pack/auditbeat', @@ -277,8 +274,6 @@ def pushCIDockerImages(Map args = [:]) { tagAndPush(beatName: 'filebeat', arch: arch) } else if (env?.BEATS_FOLDER?.endsWith('heartbeat')) { tagAndPush(beatName: 'heartbeat', arch: arch) - } else if ("${env.BEATS_FOLDER}" == "journalbeat"){ - tagAndPush(beatName: 'journalbeat', arch: arch) } else if (env?.BEATS_FOLDER?.endsWith('metricbeat')) { tagAndPush(beatName: 'metricbeat', arch: arch) } else if (env?.BEATS_FOLDER?.endsWith('osquerybeat')) { diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index 1b45fecd271..6f392dff9e4 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -1,7 +1,6 @@ name: macos-build env: GOPATH: /home/runner/work/beats/beats - GO111MODULE: off REPO_PATH: src/beats MACOS_GOPATH: /Users/runner/work/beats/beats GITHUB_TOKEN: ${{ github.token }} diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index a4f34cb48ba..fbef98864e6 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -28,6 +28,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Index template's default_fields setting is only populated with ECS fields. {pull}28596[28596] {issue}28215[28215] - Remove deprecated `--template` and `--ilm-policy` flags. Use `--index-management` instead. {pull}28870[28870] - Remove options `logging.files.suffix` and default to datetime endings. {pull}28927[28927] +- Remove Journalbeat. Use `journald` input of Filebeat instead. {pull}29131[29131] *Auditbeat* @@ -69,11 +70,6 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d *Heartbeat* - Change behavior in case of duplicate monitor IDs in configs to be last monitor wins. {pull}29041[29041] -*Journalbeat* - -- Rename field `journald.process.capabilites` to `journald.process.capabilities` to fix spelling. {pull}28065[28065] -- Rename field `log.syslog.facility.name` to `log.syslog.facility.code` because the value is numeric rather than the facility name. {pull}28065[28065] - *Metricbeat* - Add Linux pressure metricset {pull}27355[27355] @@ -145,6 +141,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Fix `fingerprint` processor to give it access to the `@timestamp` field. {issue}28683[28683] - Fix the wrong beat name on monitoring and state endpoint {issue}27755[27755] - Skip configuration checks in autodiscover for configurations that are already running {pull}29048[29048] +- Fix `decode_json_processor` to always respect `add_error_key` {pull}29107[29107] +- Fix `add_labels` flattening of array values. {pull}29211[29211] *Auditbeat* @@ -191,6 +189,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Revert usageDetails api version to 2019-01-01. {pull}28995[28995] - Fix in `aws-s3` input regarding provider discovery through endpoint {pull}28963[28963] - Fix `threatintel.misp` filters configuration. {issue}27970[27970] +- Fix opening files on Windows in filestream so open files can be deleted. {issue}29113[29113] {pull}29180[29180] *Heartbeat* @@ -201,9 +200,6 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Remove accidentally included cups library in docker images. {pull}28853[pull] - Fix broken monitors with newer versions of image relying on dup3. {pull}28938[pull] -*Journalbeat* - - *Metricbeat* - Fix checking tagsFilter using length in cloudwatch metricset. {pull}14525[14525] @@ -241,6 +237,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d *Packetbeat* +- Prevent incorrect use of AMQP protocol parsing from causing silent failure. {pull}29017[29017] +- Fix error handling in MongoDB protocol parsing. {pull}29017[29017] *Winlogbeat* @@ -348,6 +346,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Add support in aws-s3 input for s3 notification from SNS to SQS. {pull}28800[28800] - Add support in aws-s3 input for custom script parsing of s3 notifications. {pull}28946[28946] - Improve error handling in aws-s3 input for malformed s3 notifications. {issue}28828[28828] {pull}28946[28946] +- Add support for parsers on journald input {pull}29070[29070] *Heartbeat* @@ -355,8 +354,6 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Experimental 'run once' mode. {pull}25972[25972] - Add `keyword` multi-field mapping for `synthetics.step.name`. {pull}28452[28452] -*Journalbeat* - *Metricbeat* - Move the windows pdh implementation from perfmon to a shared location in order for future modules/metricsets to make use of. {pull}15503[15503] @@ -401,8 +398,6 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d *Heartbeat* -*Journalbeat* - *Metricbeat* diff --git a/Jenkinsfile b/Jenkinsfile index ac6b8adfe36..b39ce68de70 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -457,8 +457,6 @@ def pushCIDockerImages(Map args = [:]) { tagAndPush(beatName: 'filebeat', arch: arch) } else if (beatsFolder.endsWith('heartbeat')) { tagAndPush(beatName: 'heartbeat', arch: arch) - } else if ("${beatsFolder}" == "journalbeat"){ - tagAndPush(beatName: 'journalbeat', arch: arch) } else if (beatsFolder.endsWith('metricbeat')) { tagAndPush(beatName: 'metricbeat', arch: arch) } else if ("${beatsFolder}" == "packetbeat"){ diff --git a/Makefile b/Makefile index 1975bac3165..40b081bf3ed 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ BUILD_DIR=$(CURDIR)/build COVERAGE_DIR=$(BUILD_DIR)/coverage -BEATS?=auditbeat filebeat heartbeat journalbeat metricbeat packetbeat winlogbeat x-pack/functionbeat x-pack/elastic-agent x-pack/osquerybeat +BEATS?=auditbeat filebeat heartbeat metricbeat packetbeat winlogbeat x-pack/functionbeat x-pack/elastic-agent x-pack/osquerybeat PROJECTS=libbeat $(BEATS) PROJECTS_ENV=libbeat filebeat metricbeat PYTHON_ENV?=$(BUILD_DIR)/python-env diff --git a/README.md b/README.md index 32d411d74ac..6707fced374 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,6 @@ Beat | Description [Filebeat](https://github.com/elastic/beats/tree/master/filebeat) | Tails and ships log files [Functionbeat](https://github.com/elastic/beats/tree/master/x-pack/functionbeat) | Read and ships events from serverless infrastructure. [Heartbeat](https://github.com/elastic/beats/tree/master/heartbeat) | Ping remote services for availability -[Journalbeat](https://github.com/elastic/beats/tree/master/journalbeat) | Read and ships event from Journald. [Metricbeat](https://github.com/elastic/beats/tree/master/metricbeat) | Fetches sets of metrics from the operating system and services [Packetbeat](https://github.com/elastic/beats/tree/master/packetbeat) | Monitors the network and applications by sniffing packets [Winlogbeat](https://github.com/elastic/beats/tree/master/winlogbeat) | Fetches and ships Windows Event logs @@ -45,7 +44,6 @@ on the [elastic.co site](https://www.elastic.co/guide/): * [Filebeat](https://www.elastic.co/guide/en/beats/filebeat/current/index.html) * [Functionbeat](https://www.elastic.co/guide/en/beats/functionbeat/current/index.html) * [Heartbeat](https://www.elastic.co/guide/en/beats/heartbeat/current/index.html) -* [Journalbeat](https://www.elastic.co/guide/en/beats/journalbeat/current/index.html) * [Metricbeat](https://www.elastic.co/guide/en/beats/metricbeat/current/index.html) * [Packetbeat](https://www.elastic.co/guide/en/beats/packetbeat/current/index.html) * [Winlogbeat](https://www.elastic.co/guide/en/beats/winlogbeat/current/index.html) diff --git a/auditbeat/cmd/root.go b/auditbeat/cmd/root.go index 35fa18ecad0..aa5b523e976 100644 --- a/auditbeat/cmd/root.go +++ b/auditbeat/cmd/root.go @@ -63,7 +63,7 @@ func AuditbeatSettings() instance.Settings { } } -// Initialize initializes the entrypoint commands for journalbeat +// Initialize initializes the entrypoint commands for auditbeat func Initialize(settings instance.Settings) *cmd.BeatsRootCmd { create := beater.Creator( beater.WithModuleOptions( diff --git a/deploy/docker/journalbeat.docker.yml b/deploy/docker/journalbeat.docker.yml deleted file mode 100644 index a1e67c0d961..00000000000 --- a/deploy/docker/journalbeat.docker.yml +++ /dev/null @@ -1,11 +0,0 @@ -journalbeat.inputs: -- paths: [] - seek: cursor - -processors: -- add_cloud_metadata: ~ - -output.elasticsearch: - hosts: '${ELASTICSEARCH_HOSTS:elasticsearch:9200}' - username: '${ELASTICSEARCH_USERNAME:}' - password: '${ELASTICSEARCH_PASSWORD:}' diff --git a/dev-tools/cmd/update_go/update_go_version.go b/dev-tools/cmd/update_go/update_go_version.go index 9ab0fa8a4a4..f589abc756d 100644 --- a/dev-tools/cmd/update_go/update_go_version.go +++ b/dev-tools/cmd/update_go/update_go_version.go @@ -30,7 +30,6 @@ var files = []string{ "auditbeat/Dockerfile", "filebeat/Dockerfile", "heartbeat/Dockerfile", - "journalbeat/Dockerfile", "libbeat/Dockerfile", "libbeat/docs/version.asciidoc", "metricbeat/Dockerfile", diff --git a/dev-tools/ecs-migration.yml b/dev-tools/ecs-migration.yml index 39bc4950564..0ea295b2d7e 100644 --- a/dev-tools/ecs-migration.yml +++ b/dev-tools/ecs-migration.yml @@ -1954,20 +1954,6 @@ alias: true beat: heartbeat -# Journalbeat -- from: host.name - to: host.hostname - alias: false - beat: journalbeat - comment: This field should not be renamed as it would cause issue some Beats and Journalbeat does not have dashboards - # This field should not be renamed as it would cause issue some Beats and Journalbeat does not have dashboards - rename: false - -- from: read_timestamp - to: event.created - alias: true - beat: journalbeat - ## Winlogbeat # Alias to ECS fields diff --git a/docs/devguide/create-metricset.asciidoc b/docs/devguide/create-metricset.asciidoc index a1540be2384..fd60e25dd3a 100644 --- a/docs/devguide/create-metricset.asciidoc +++ b/docs/devguide/create-metricset.asciidoc @@ -1,6 +1,8 @@ [[creating-metricsets]] === Creating a Metricset +include::generator-support-note.asciidoc[tag=metricset-generator] + A metricset is the part of a Metricbeat module that fetches and structures the data from the remote service. Each module can have multiple metricsets. In this guide, you learn how to create your own metricset. diff --git a/docs/devguide/generator-support-note.asciidoc b/docs/devguide/generator-support-note.asciidoc new file mode 100644 index 00000000000..25579798ed2 --- /dev/null +++ b/docs/devguide/generator-support-note.asciidoc @@ -0,0 +1,13 @@ +// tag::metricset-generator[] +IMPORTANT: Elastic provides no warranty or support for the code used to generate +metricsets. The generator is mainly offered as guidance for developers who want +to create their own data shippers. + +// end::metricset-generator[] + +// tag::filebeat-generator[] +IMPORTANT: Elastic provides no warranty or support for the code used to generate +modules and filesets. The generator is mainly offered as guidance for developers +who want to create their own data shippers. + +// end::filebeat-generator[] \ No newline at end of file diff --git a/docs/devguide/modules-dev-guide.asciidoc b/docs/devguide/modules-dev-guide.asciidoc index 0936438900e..03b3179c596 100644 --- a/docs/devguide/modules-dev-guide.asciidoc +++ b/docs/devguide/modules-dev-guide.asciidoc @@ -1,6 +1,8 @@ [[filebeat-modules-devguide]] == Creating a New Filebeat Module +include::generator-support-note.asciidoc[tag=filebeat-generator] + This guide will walk you through creating a new Filebeat module. All Filebeat modules currently live in the main diff --git a/filebeat/_meta/config/filebeat.inputs.reference.yml.tmpl b/filebeat/_meta/config/filebeat.inputs.reference.yml.tmpl index 8da4a2e75fd..a1c7166cac0 100644 --- a/filebeat/_meta/config/filebeat.inputs.reference.yml.tmpl +++ b/filebeat/_meta/config/filebeat.inputs.reference.yml.tmpl @@ -559,3 +559,22 @@ filebeat.inputs: # Configure stream to filter to a specific stream: stdout, stderr or all (default) #stream: all +#------------------------------ Journald input -------------------------------- +# Journald input is experimental. +#- type: journald + #enabled: true + #id: service-foo + + # You may wish to have separate inputs for each service. You can use + # include_matches to specify a list of filter expressions that are + # applied as a logical OR. You may specify filter + #include_matches: + #- _SYSTEMD_UNIT=foo.service + + # Parsers are also supported, here is an example of the multiline + # parser. + #parsers: + #- multiline: + #type: count + #count_lines: 3 + diff --git a/filebeat/filebeat.reference.yml b/filebeat/filebeat.reference.yml index 6f85f929d28..9b6a421d6c4 100644 --- a/filebeat/filebeat.reference.yml +++ b/filebeat/filebeat.reference.yml @@ -966,6 +966,25 @@ filebeat.inputs: # Configure stream to filter to a specific stream: stdout, stderr or all (default) #stream: all +#------------------------------ Journald input -------------------------------- +# Journald input is experimental. +#- type: journald + #enabled: true + #id: service-foo + + # You may wish to have separate inputs for each service. You can use + # include_matches to specify a list of filter expressions that are + # applied as a logical OR. You may specify filter + #include_matches: + #- _SYSTEMD_UNIT=foo.service + + # Parsers are also supported, here is an example of the multiline + # parser. + #parsers: + #- multiline: + #type: count + #count_lines: 3 + # =========================== Filebeat autodiscover ============================ diff --git a/filebeat/input/filestream/input.go b/filebeat/input/filestream/input.go index c1ba829d65f..654938869af 100644 --- a/filebeat/input/filestream/input.go +++ b/filebeat/input/filestream/input.go @@ -29,6 +29,7 @@ import ( input "github.com/elastic/beats/v7/filebeat/input/v2" "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/beats/v7/libbeat/common/cleanup" + "github.com/elastic/beats/v7/libbeat/common/file" "github.com/elastic/beats/v7/libbeat/common/match" "github.com/elastic/beats/v7/libbeat/feature" "github.com/elastic/beats/v7/libbeat/logp" @@ -244,7 +245,7 @@ func (inp *filestream) openFile(log *logp.Logger, path string, offset int64) (*o } ok := false - f, err := os.OpenFile(path, os.O_RDONLY, os.FileMode(0)) + f, err := file.ReadOpen(path) if err != nil { return nil, fmt.Errorf("failed opening %s: %s", path, err) } diff --git a/filebeat/input/journald/config.go b/filebeat/input/journald/config.go index 6704dabfc02..cb3b32e14c9 100644 --- a/filebeat/input/journald/config.go +++ b/filebeat/input/journald/config.go @@ -24,8 +24,9 @@ import ( "errors" "time" - "github.com/elastic/beats/v7/journalbeat/pkg/journalfield" - "github.com/elastic/beats/v7/journalbeat/pkg/journalread" + "github.com/elastic/beats/v7/filebeat/input/journald/pkg/journalfield" + "github.com/elastic/beats/v7/filebeat/input/journald/pkg/journalread" + "github.com/elastic/beats/v7/libbeat/reader/parser" ) // Config stores the options of a journald input. @@ -51,6 +52,9 @@ type config struct { // SaveRemoteHostname defines if the original source of the entry needs to be saved. SaveRemoteHostname bool `config:"save_remote_hostname"` + + // Parsers configuration + Parsers parser.Config `config:",inline"` } var errInvalidSeekFallback = errors.New("invalid setting for cursor_seek_fallback") diff --git a/filebeat/input/journald/conv.go b/filebeat/input/journald/conv.go index a9785cf49f6..a1bf52f3000 100644 --- a/filebeat/input/journald/conv.go +++ b/filebeat/input/journald/conv.go @@ -23,7 +23,7 @@ package journald import ( "time" - "github.com/elastic/beats/v7/journalbeat/pkg/journalfield" + "github.com/elastic/beats/v7/filebeat/input/journald/pkg/journalfield" "github.com/elastic/beats/v7/libbeat/beat" "github.com/elastic/beats/v7/libbeat/logp" ) diff --git a/filebeat/input/journald/environment_test.go b/filebeat/input/journald/environment_test.go new file mode 100644 index 00000000000..5c05759b2c2 --- /dev/null +++ b/filebeat/input/journald/environment_test.go @@ -0,0 +1,286 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. + +//go:build linux && cgo && withjournald +// +build linux,cgo,withjournald + +package journald + +import ( + "context" + "fmt" + "os" + "path/filepath" + "sync" + "testing" + "time" + + input "github.com/elastic/beats/v7/filebeat/input/v2" + v2 "github.com/elastic/beats/v7/filebeat/input/v2" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/acker" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/statestore" + "github.com/elastic/beats/v7/libbeat/statestore/storetest" + "github.com/elastic/go-concert/unison" +) + +type inputTestingEnvironment struct { + t *testing.T + workingDir string + stateStore *testInputStore + pipeline *mockPipelineConnector + + pluginInitOnce sync.Once + plugin v2.Plugin + + wg sync.WaitGroup + grp unison.TaskGroup +} + +func newInputTestingEnvironment(t *testing.T) *inputTestingEnvironment { + return &inputTestingEnvironment{ + t: t, + workingDir: t.TempDir(), + stateStore: openTestStatestore(), + pipeline: &mockPipelineConnector{}, + } +} + +func (e *inputTestingEnvironment) getManager() v2.InputManager { + e.pluginInitOnce.Do(func() { + e.plugin = Plugin(logp.L(), e.stateStore) + }) + return e.plugin.Manager +} + +func (e *inputTestingEnvironment) mustCreateInput(config map[string]interface{}) v2.Input { + e.t.Helper() + e.grp = unison.TaskGroup{} + manager := e.getManager() + if err := manager.Init(&e.grp, v2.ModeRun); err != nil { + e.t.Fatalf("failed to initialise manager: %+v", err) + } + + c := common.MustNewConfigFrom(config) + inp, err := manager.Create(c) + if err != nil { + e.t.Fatalf("failed to create input using manager: %+v", err) + } + + return inp +} + +func (e *inputTestingEnvironment) startInput(ctx context.Context, inp v2.Input) { + e.wg.Add(1) + go func(wg *sync.WaitGroup, grp *unison.TaskGroup) { + defer wg.Done() + defer grp.Stop() + + inputCtx := input.Context{Logger: logp.L(), Cancelation: ctx} + inp.Run(inputCtx, e.pipeline) + }(&e.wg, &e.grp) +} + +// waitUntilEventCount waits until total count events arrive to the client. +func (e *inputTestingEnvironment) waitUntilEventCount(count int) { + e.t.Helper() + for { + sum := len(e.pipeline.GetAllEvents()) + if sum == count { + return + } + if count < sum { + e.t.Fatalf("too many events; expected: %d, actual: %d", count, sum) + } + time.Sleep(10 * time.Millisecond) + } +} + +func (e *inputTestingEnvironment) waitUntilInputStops() { + e.wg.Wait() +} + +func (e *inputTestingEnvironment) abspath(filename string) string { + return filepath.Join(e.workingDir, filename) +} + +func (e *inputTestingEnvironment) mustWriteFile(filename string, lines []byte) { + e.t.Helper() + path := e.abspath(filename) + if err := os.WriteFile(path, lines, 0644); err != nil { + e.t.Fatalf("failed to write file '%s': %+v", path, err) + } +} + +type testInputStore struct { + registry *statestore.Registry +} + +func openTestStatestore() *testInputStore { + return &testInputStore{ + registry: statestore.NewRegistry(storetest.NewMemoryStoreBackend()), + } +} + +func (s *testInputStore) Close() { + s.registry.Close() +} + +func (s *testInputStore) Access() (*statestore.Store, error) { + return s.registry.Get("filebeat") +} + +func (s *testInputStore) CleanupInterval() time.Duration { + return 24 * time.Hour +} + +type mockClient struct { + publishing []beat.Event + published []beat.Event + ackHandler beat.ACKer + closed bool + mtx sync.Mutex + canceler context.CancelFunc +} + +// GetEvents returns the published events +func (c *mockClient) GetEvents() []beat.Event { + c.mtx.Lock() + defer c.mtx.Unlock() + + return c.published +} + +// Publish mocks the Client Publish method +func (c *mockClient) Publish(e beat.Event) { + c.PublishAll([]beat.Event{e}) +} + +// PublishAll mocks the Client PublishAll method +func (c *mockClient) PublishAll(events []beat.Event) { + c.mtx.Lock() + defer c.mtx.Unlock() + + c.publishing = append(c.publishing, events...) + for _, event := range events { + c.ackHandler.AddEvent(event, true) + } + c.ackHandler.ACKEvents(len(events)) + + for _, event := range events { + c.published = append(c.published, event) + } +} + +func (c *mockClient) waitUntilPublishingHasStarted() { + for len(c.publishing) == 0 { + time.Sleep(10 * time.Millisecond) + } +} + +// Close mocks the Client Close method +func (c *mockClient) Close() error { + c.mtx.Lock() + defer c.mtx.Unlock() + + if c.closed { + return fmt.Errorf("mock client already closed") + } + + c.closed = true + return nil +} + +// mockPipelineConnector mocks the PipelineConnector interface +type mockPipelineConnector struct { + blocking bool + clients []*mockClient + mtx sync.Mutex +} + +// GetAllEvents returns all events associated with a pipeline +func (pc *mockPipelineConnector) GetAllEvents() []beat.Event { + pc.mtx.Lock() + defer pc.mtx.Unlock() + + var evList []beat.Event + for _, clientEvents := range pc.clients { + evList = append(evList, clientEvents.GetEvents()...) + } + + return evList +} + +// Connect mocks the PipelineConnector Connect method +func (pc *mockPipelineConnector) Connect() (beat.Client, error) { + return pc.ConnectWith(beat.ClientConfig{}) +} + +// ConnectWith mocks the PipelineConnector ConnectWith method +func (pc *mockPipelineConnector) ConnectWith(config beat.ClientConfig) (beat.Client, error) { + pc.mtx.Lock() + defer pc.mtx.Unlock() + + ctx, cancel := context.WithCancel(context.Background()) + c := &mockClient{ + canceler: cancel, + ackHandler: newMockACKHandler(ctx, pc.blocking, config), + } + + pc.clients = append(pc.clients, c) + + return c, nil + +} + +func (pc *mockPipelineConnector) cancelAllClients() { + pc.mtx.Lock() + defer pc.mtx.Unlock() + + for _, client := range pc.clients { + client.canceler() + } +} + +func (pc *mockPipelineConnector) cancelClient(i int) { + pc.mtx.Lock() + defer pc.mtx.Unlock() + + if len(pc.clients) < i+1 { + return + } + + pc.clients[i].canceler() +} + +func newMockACKHandler(starter context.Context, blocking bool, config beat.ClientConfig) beat.ACKer { + if !blocking { + return config.ACKHandler + } + + return acker.Combine(blockingACKer(starter), config.ACKHandler) + +} + +func blockingACKer(starter context.Context) beat.ACKer { + return acker.EventPrivateReporter(func(acked int, private []interface{}) { + for starter.Err() == nil { + } + }) +} diff --git a/filebeat/input/journald/input.go b/filebeat/input/journald/input.go index 74bd0983d23..e9e2f0b40c4 100644 --- a/filebeat/input/journald/input.go +++ b/filebeat/input/journald/input.go @@ -26,14 +26,16 @@ import ( "github.com/coreos/go-systemd/v22/sdjournal" "github.com/urso/sderr" + "github.com/elastic/beats/v7/filebeat/input/journald/pkg/journalfield" + "github.com/elastic/beats/v7/filebeat/input/journald/pkg/journalread" input "github.com/elastic/beats/v7/filebeat/input/v2" cursor "github.com/elastic/beats/v7/filebeat/input/v2/input-cursor" - "github.com/elastic/beats/v7/journalbeat/pkg/journalfield" - "github.com/elastic/beats/v7/journalbeat/pkg/journalread" "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/beats/v7/libbeat/common/backoff" "github.com/elastic/beats/v7/libbeat/feature" "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/reader/parser" ) type journald struct { @@ -43,6 +45,7 @@ type journald struct { CursorSeekFallback journalread.SeekMode Matches []journalfield.Matcher SaveRemoteHostname bool + Parsers parser.Config } type checkpoint struct { @@ -103,6 +106,7 @@ func configure(cfg *common.Config) ([]cursor.Source, cursor.Input, error) { CursorSeekFallback: config.CursorSeekFallback, Matches: config.Matches, SaveRemoteHostname: config.SaveRemoteHostname, + Parsers: config.Parsers, }, nil } @@ -123,7 +127,7 @@ func (inp *journald) Run( publisher cursor.Publisher, ) error { log := ctx.Logger.With("path", src.Name()) - checkpoint := initCheckpoint(log, cursor) + currentCheckpoint := initCheckpoint(log, cursor) reader, err := inp.open(ctx.Logger, ctx.Cancelation, src) if err != nil { @@ -131,23 +135,20 @@ func (inp *journald) Run( } defer reader.Close() - if err := reader.Seek(seekBy(ctx.Logger, checkpoint, inp.Seek, inp.CursorSeekFallback)); err != nil { + if err := reader.Seek(seekBy(ctx.Logger, currentCheckpoint, inp.Seek, inp.CursorSeekFallback)); err != nil { log.Error("Continue from current position. Seek failed with: %v", err) } + parser := inp.Parsers.Create(&readerAdapter{r: reader, canceler: ctx.Cancelation}) + for { - entry, err := reader.Next(ctx.Cancelation) + entry, err := parser.Next() if err != nil { return err } - event := eventFromFields(ctx.Logger, entry.RealtimeTimestamp, entry.Fields, inp.SaveRemoteHostname) - - checkpoint.Position = entry.Cursor - checkpoint.RealtimeTimestamp = entry.RealtimeTimestamp - checkpoint.MonotonicTimestamp = entry.MonotonicTimestamp - - if err := publisher.Publish(event, checkpoint); err != nil { + event := entry.ToEvent() + if err := publisher.Publish(event, event.Private); err != nil { return err } } @@ -204,3 +205,44 @@ func seekBy(log *logp.Logger, cp checkpoint, seek, defaultSeek journalread.SeekM } return mode, cp.Position } + +// readerAdapter is an adapter so journalread.Reader can +// behave like reader.Reader +type readerAdapter struct { + r *journalread.Reader + canceler input.Canceler +} + +func (r *readerAdapter) Close() error { + return r.r.Close() +} + +func (r *readerAdapter) Next() (reader.Message, error) { + data, err := r.r.Next(r.canceler) + if err != nil { + return reader.Message{}, err + } + + content := []byte(data.Fields["MESSAGE"]) + delete(data.Fields, "MESSAGE") + + fields := make(map[string]interface{}, len(data.Fields)) + for k, v := range data.Fields { + fields[k] = v + } + + m := reader.Message{ + Ts: time.UnixMicro(int64(data.RealtimeTimestamp)), + Content: content, + Bytes: len(content), + Fields: fields, + Private: checkpoint{ + Version: cursorVersion, + RealtimeTimestamp: data.RealtimeTimestamp, + MonotonicTimestamp: data.MonotonicTimestamp, + Position: data.Cursor, + }, + } + + return m, nil +} diff --git a/filebeat/input/journald/input_parsers_test.go b/filebeat/input/journald/input_parsers_test.go new file mode 100644 index 00000000000..6aadb031cd2 --- /dev/null +++ b/filebeat/input/journald/input_parsers_test.go @@ -0,0 +1,62 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. + +//go:build linux && cgo && withjournald +// +build linux,cgo,withjournald + +package journald + +import ( + "context" + "path" + "testing" + + "github.com/elastic/beats/v7/libbeat/common" +) + +// TestInputParsers ensures journald input support parsers, +// it only tests a single parser, but that is enough to ensure +// we're correctly using the parsers +func TestInputParsers(t *testing.T) { + inputParsersExpected := []string{"1st line\n2nd line\n3rd line", "4th line\n5th line\n6th line"} + env := newInputTestingEnvironment(t) + + inp := env.mustCreateInput(common.MapStr{ + "paths": []string{path.Join("testdata", "input-multiline-parser.journal")}, + "include_matches": []string{"_SYSTEMD_USER_UNIT=log-service.service"}, + "parsers": []common.MapStr{ + { + "multiline": common.MapStr{ + "type": "count", + "count_lines": 3, + }, + }, + }, + }) + + ctx, cancelInput := context.WithCancel(context.Background()) + env.startInput(ctx, inp) + env.waitUntilEventCount(len(inputParsersExpected)) + + for idx, event := range env.pipeline.clients[0].GetEvents() { + if got, expected := event.Fields["message"], inputParsersExpected[idx]; got != expected { + t.Errorf("expecting event message %q, got %q", expected, got) + } + } + + cancelInput() +} diff --git a/journalbeat/pkg/journalfield/conv.go b/filebeat/input/journald/pkg/journalfield/conv.go similarity index 100% rename from journalbeat/pkg/journalfield/conv.go rename to filebeat/input/journald/pkg/journalfield/conv.go diff --git a/journalbeat/pkg/journalfield/conv_test.go b/filebeat/input/journald/pkg/journalfield/conv_test.go similarity index 100% rename from journalbeat/pkg/journalfield/conv_test.go rename to filebeat/input/journald/pkg/journalfield/conv_test.go diff --git a/journalbeat/pkg/journalfield/default.go b/filebeat/input/journald/pkg/journalfield/default.go similarity index 100% rename from journalbeat/pkg/journalfield/default.go rename to filebeat/input/journald/pkg/journalfield/default.go diff --git a/journalbeat/pkg/journalfield/default_other.go b/filebeat/input/journald/pkg/journalfield/default_other.go similarity index 100% rename from journalbeat/pkg/journalfield/default_other.go rename to filebeat/input/journald/pkg/journalfield/default_other.go diff --git a/journalbeat/pkg/journalfield/matcher.go b/filebeat/input/journald/pkg/journalfield/matcher.go similarity index 100% rename from journalbeat/pkg/journalfield/matcher.go rename to filebeat/input/journald/pkg/journalfield/matcher.go diff --git a/journalbeat/pkg/journalfield/matcher_test.go b/filebeat/input/journald/pkg/journalfield/matcher_test.go similarity index 100% rename from journalbeat/pkg/journalfield/matcher_test.go rename to filebeat/input/journald/pkg/journalfield/matcher_test.go diff --git a/journalbeat/pkg/journalread/mode.go b/filebeat/input/journald/pkg/journalread/mode.go similarity index 100% rename from journalbeat/pkg/journalread/mode.go rename to filebeat/input/journald/pkg/journalread/mode.go diff --git a/journalbeat/pkg/journalread/mode_test.go b/filebeat/input/journald/pkg/journalread/mode_test.go similarity index 100% rename from journalbeat/pkg/journalread/mode_test.go rename to filebeat/input/journald/pkg/journalread/mode_test.go diff --git a/journalbeat/pkg/journalread/reader.go b/filebeat/input/journald/pkg/journalread/reader.go similarity index 100% rename from journalbeat/pkg/journalread/reader.go rename to filebeat/input/journald/pkg/journalread/reader.go diff --git a/journalbeat/tests/system/input/test.journal b/filebeat/input/journald/testdata/input-multiline-parser.journal similarity index 99% rename from journalbeat/tests/system/input/test.journal rename to filebeat/input/journald/testdata/input-multiline-parser.journal index c42b825e62d..9aecfd442f0 100644 Binary files a/journalbeat/tests/system/input/test.journal and b/filebeat/input/journald/testdata/input-multiline-parser.journal differ diff --git a/journalbeat/.gitignore b/journalbeat/.gitignore deleted file mode 100644 index 504279e50ee..00000000000 --- a/journalbeat/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/.idea -/build -.DS_Store -.journalbeat_position -/journalbeat -/journalbeat.test -*.pyc -data/meta.json -/*.journal diff --git a/journalbeat/Dockerfile b/journalbeat/Dockerfile deleted file mode 100644 index 6c461fcb01a..00000000000 --- a/journalbeat/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM golang:1.17.2 - -RUN \ - apt-get update \ - && apt-get install -y --no-install-recommends \ - libsystemd-dev \ - libc6-dev-i386 \ - gcc-arm-linux-gnueabi \ - python3 \ - python3-pip \ - python3-venv \ - && rm -rf /var/lib/apt/lists/* - -RUN pip3 install --upgrade pip==20.1.1 -RUN pip3 install --upgrade setuptools==47.3.2 -RUN pip3 install --upgrade docker-compose==1.23.2 - -# Setup work environment -ENV JOURNALBEAT_PATH /go/src/github.com/elastic/beats/journalbeat - -RUN mkdir -p $JOURNALBEAT_PATH/build/coverage -WORKDIR $JOURNALBEAT_PATH -HEALTHCHECK CMD exit 0 diff --git a/journalbeat/Makefile b/journalbeat/Makefile deleted file mode 100644 index 85049183d4e..00000000000 --- a/journalbeat/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -BEAT_NAME=journalbeat -BEAT_TITLE=Journalbeat -SYSTEM_TESTS=true -TEST_ENVIRONMENT=false -ES_BEATS?=.. - -# Path to the libbeat Makefile --include $(ES_BEATS)/libbeat/scripts/Makefile - -.PHONY: before-build -before-build: - -# Collects all dependencies and then calls update -.PHONY: collect -collect: diff --git a/journalbeat/README.md b/journalbeat/README.md deleted file mode 100644 index 69fccb38f90..00000000000 --- a/journalbeat/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Journalbeat - -Journalbeat is an open source data collector to read and forward journal entries from Linuxes with systemd. - -## Getting started diff --git a/journalbeat/_meta/config/beat.docker.yml.tmpl b/journalbeat/_meta/config/beat.docker.yml.tmpl deleted file mode 100644 index 20ae6ee130d..00000000000 --- a/journalbeat/_meta/config/beat.docker.yml.tmpl +++ /dev/null @@ -1,3 +0,0 @@ -journalbeat.inputs: -- paths: [] - seek: cursor diff --git a/journalbeat/_meta/config/beat.reference.yml.tmpl b/journalbeat/_meta/config/beat.reference.yml.tmpl deleted file mode 100644 index 8da73b6bf07..00000000000 --- a/journalbeat/_meta/config/beat.reference.yml.tmpl +++ /dev/null @@ -1,62 +0,0 @@ -###################### Journalbeat Configuration Example ######################### - -# This file is an example configuration file highlighting only the most common -# options. The journalbeat.reference.yml file from the same directory contains all the -# supported options with more comments. You can use it as a reference. -# -# You can find the full configuration reference here: -# https://www.elastic.co/guide/en/beats/journalbeat/index.html - -# For more available modules and options, please see the journalbeat.reference.yml sample -# configuration file. - -{{header "Journalbeat inputs"}} - -journalbeat.inputs: - # Paths that should be crawled and fetched. Possible values files and directories. - # When setting a directory, all journals under it are merged. - # When empty starts to read from local journal. -- paths: [] - - # An optional unique identifier for the input. By providing a unique `id` you - # can operate multiple inputs on the same journal. This allows each input's - # cursor to be persisted independently in the registry file. - #id: "" - - # The number of seconds to wait before trying to read again from journals. - #backoff: 1s - # The maximum number of seconds to wait before attempting to read again from journals. - #max_backoff: 20s - - # Position to start reading from journal. Valid values: head, tail, cursor - seek: cursor - # Fallback position if no cursor data is available. - #cursor_seek_fallback: head - - # Exact matching for field values of events. - # Matching for nginx entries: "systemd.unit=nginx" - #include_matches: [] - - # Set the option to preserve the remote hostname in entries from a remote journal. - # It is only needed when used with add_host_metadata, so the original host name - # does not get overwritten by the processor. - #save_remote_hostname: false - - # Optional fields that you can specify to add additional information to the - # output. Fields can be scalar values, arrays, dictionaries, or any nested - # combination of these. - #fields: - # env: staging - - -{{header "Journalbeat global options"}} -#journalbeat: - # Name of the registry file. If a relative path is used, it is considered relative to the - # data path. - #registry_file: registry - -{{header "Elasticsearch template setting"}} -setup.template.settings: - index.number_of_shards: 1 - #index.codec: best_compression - #_source.enabled: false diff --git a/journalbeat/_meta/config/beat.yml.tmpl b/journalbeat/_meta/config/beat.yml.tmpl deleted file mode 100644 index a4f7d5d4c31..00000000000 --- a/journalbeat/_meta/config/beat.yml.tmpl +++ /dev/null @@ -1,57 +0,0 @@ -###################### Journalbeat Configuration Example ######################### - -# This file is an example configuration file highlighting only the most common -# options. The journalbeat.reference.yml file from the same directory contains all the -# supported options with more comments. You can use it as a reference. -# -# You can find the full configuration reference here: -# https://www.elastic.co/guide/en/beats/journalbeat/index.html - -# For more available modules and options, please see the journalbeat.reference.yml sample -# configuration file. - -{{header "Journalbeat inputs"}} - -journalbeat.inputs: - # Paths that should be crawled and fetched. Possible values files and directories. - # When setting a directory, all journals under it are merged. - # When empty starts to read from local journal. -- paths: [] - - # An optional unique identifier for the input. By providing a unique `id` you - # can operate multiple inputs on the same journal. This allows each input's - # cursor to be persisted independently in the registry file. - #id: "" - - # The number of seconds to wait before trying to read again from journals. - #backoff: 1s - # The maximum number of seconds to wait before attempting to read again from journals. - #max_backoff: 20s - - # Position to start reading from journal. Valid values: head, tail, cursor - seek: cursor - # Fallback position if no cursor data is available. - #cursor_seek_fallback: head - - # Exact matching for field values of events. - # Matching for nginx entries: "systemd.unit=nginx" - #include_matches: [] - - # Optional fields that you can specify to add additional information to the - # output. Fields can be scalar values, arrays, dictionaries, or any nested - # combination of these. - #fields: - # env: staging - - -{{header "Journalbeat global options"}} -#journalbeat: - # Name of the registry file. If a relative path is used, it is considered relative to the - # data path. - #registry_file: registry - -{{header "Elasticsearch template setting"}} -setup.template.settings: - index.number_of_shards: 1 - #index.codec: best_compression - #_source.enabled: false diff --git a/journalbeat/_meta/fields.common.yml b/journalbeat/_meta/fields.common.yml deleted file mode 100644 index b06081ae19b..00000000000 --- a/journalbeat/_meta/fields.common.yml +++ /dev/null @@ -1,329 +0,0 @@ -- key: common - title: "Common Journalbeat" - description: > - Contains common fields available in all event types. - fields: - - name: coredump - type: group - description: > - Fields used by systemd-coredump kernel helper. - fields: - - name: unit - type: keyword - description: > - Annotations of messages containing coredumps from system units. - - name: user_unit - type: keyword - description: > - Annotations of messages containing coredumps from user units. - - name: journald - type: group - description: > - Fields provided by journald. - fields: - - name: object - type: group - description: > - Fields to log on behalf of a different program. - fields: - - name: audit - type: group - description: > - Audit fields of event. - fields: - - name: login_uid - type: long - required: false - example: 1000 - description: > - The login UID of the object process. - - name: session - type: long - required: false - example: 3 - description: > - The audit session of the object process. - - name: process.command_line - type: keyword - required: false - example: "/lib/systemd/systemd --user" - description: > - The command line of the process. - - name: process.name - type: keyword - required: false - example: "/lib/systemd/systemd" - description: > - Name of the executable. - - name: process.executable - type: keyword - required: false - description: > - Path to the the executable. - example: "/lib/systemd/systemd" - - name: uid - type: long - required: false - description: > - UID of the object process. - - name: gid - type: long - required: false - description: > - GID of the object process. - - name: pid - type: long - required: false - description: > - PID of the object process. - - name: systemd - type: group - description: > - Systemd fields of event. - fields: - - name: owner_uid - type: long - required: false - description: > - The UID of the owner. - - name: session - type: keyword - required: false - description: > - The ID of the systemd session. - - name: unit - type: keyword - required: false - description: > - The name of the systemd unit. - - name: user_unit - type: keyword - required: false - description: > - The name of the systemd user unit. - - name: kernel - type: group - description: > - Fields to log on behalf of a different program. - fields: - - name: device - type: keyword - required: false - description: > - The kernel device name. - - name: subsystem - type: keyword - required: false - description: > - The kernel subsystem name. - - name: device_symlinks - type: keyword - required: false - description: > - Additional symlink names pointing to the device node in /dev. - - name: device_node_path - type: keyword - required: false - description: > - The device node path of this device in /dev. - - name: device_name - type: keyword - required: false - description: > - The kernel device name as it shows up in the device tree below /sys. - - name: code - type: group - description: > - Fields of the code generating the event. - fields: - - name: file - type: keyword - required: false - example: "../src/core/manager.c" - description: > - The name of the source file where the log is generated. - - name: function - type: keyword - required: false - example: "job_log_status_message" - description: > - The name of the function which generated the log message. - - name: line - type: long - required: false - example: 123 - description: > - The line number of the code which generated the log message. - - name: process - type: group - description: > - Fields to log on behalf of a different program. - fields: - - name: audit - type: group - description: > - Audit fields of event. - fields: - - name: loginuid - type: long - required: false - example: 1000 - description: > - The login UID of the source process. - - name: session - type: long - required: false - example: 3 - description: > - The audit session of the source process. - - name: command_line - type: keyword - required: false - example: "/lib/systemd/systemd --user" - description: > - The command line of the process. - - name: name - type: keyword - required: false - example: "/lib/systemd/systemd" - description: > - Name of the executable. - - name: executable - type: keyword - required: false - description: > - Path to the the executable. - example: "/lib/systemd/systemd" - - name: pid - type: long - required: false - example: 1 - description: > - The ID of the process which logged the message. - - name: gid - type: long - required: false - example: 1 - description: > - The ID of the group which runs the process. - - name: uid - type: long - required: false - example: 1 - description: > - The ID of the user which runs the process. - - name: capabilities - required: false - description: > - The effective capabilities of the process. - - name: systemd - type: group - description: > - Fields of systemd. - fields: - - name: invocation_id - type: keyword - required: false - example: "8450f1672de646c88cd133aadd4f2d70" - description: > - The invocation ID for the runtime cycle of the unit the message was generated in. - - name: cgroup - type: keyword - required: false - example: "/user.slice/user-1234.slice/session-2.scope" - description: > - The control group path in the systemd hierarchy. - - name: owner_uid - type: long - required: false - description: > - The owner UID of the systemd user unit or systemd session. - - name: session - type: keyword - required: false - description: > - The ID of the systemd session. - - name: slice - type: keyword - required: false - example: "user-1234.slice" - description: > - The systemd slice unit. - - name: user_slice - type: keyword - required: false - description: > - The systemd user slice unit. - - name: unit - type: keyword - required: false - example: "nginx.service" - description: > - The name of the systemd unit. - - name: user_unit - type: keyword - required: false - example: "user-1234.slice" - description: > - The name of the systemd user unit. - - name: transport - type: keyword - required: true - example: "syslog" - description: > - How the log message was received by journald. - - name: host - type: group - description: > - Fields of the host. - fields: - - name: boot_id - type: keyword - required: false - example: "dd8c974asdf01dbe2ef26d7fasdf264c9" - description: > - The boot ID for the boot the log was generated in. - - name: syslog - type: group - description: > - Fields of the code generating the event. - fields: - - name: priority - type: long - required: false - example: 1 - description: > - The priority of the message. A syslog compatibility field. - - name: facility - type: long - required: false - example: 1 - description: > - The facility of the message. A syslog compatibility field. - - name: identifier - type: keyword - required: false - example: "su" - description: > - The identifier of the message. A syslog compatibility field. - - name: custom - type: nested - required: false - description: > - Arbitrary fields coming from processes. - - - name: read_timestamp - type: alias - path: event.created - migration: true - - - name: container - type: group - fields: - - name: log - type: group - fields: - - name: tag - type: keyword - description: > - User defined tag of a container. diff --git a/journalbeat/_meta/kibana/default/index-pattern/journalbeat.json b/journalbeat/_meta/kibana/default/index-pattern/journalbeat.json deleted file mode 100644 index 55e70bd81d1..00000000000 --- a/journalbeat/_meta/kibana/default/index-pattern/journalbeat.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "7.0.0-alpha1", - "objects": [ - { - "attributes": { - "fields": "[{\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"beat.name\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"beat.hostname\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"beat.timezone\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"beat.version\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"@timestamp\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"date\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"tags\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"fields\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": false, \"name\": \"error.message\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"error.code\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"number\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"error.type\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"meta.cloud.provider\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"meta.cloud.instance_id\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"meta.cloud.instance_name\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"meta.cloud.machine_type\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"meta.cloud.availability_zone\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"meta.cloud.project_id\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"meta.cloud.region\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"docker.container.id\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"docker.container.image\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"docker.container.name\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"docker.container.labels\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"kubernetes.pod.name\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"kubernetes.namespace\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"kubernetes.labels\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"kubernetes.annotations\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"kubernetes.container.name\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"kubernetes.container.image\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"counter\", \"searchable\": true, \"indexed\": true, \"doc_values\": true, \"type\": \"number\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": false, \"name\": \"_id\", \"searchable\": false, \"indexed\": false, \"doc_values\": false, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": true, \"name\": \"_type\", \"searchable\": true, \"indexed\": false, \"doc_values\": false, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": false, \"name\": \"_index\", \"searchable\": false, \"indexed\": false, \"doc_values\": false, \"type\": \"string\", \"scripted\": false}, {\"count\": 0, \"analyzed\": false, \"aggregatable\": false, \"name\": \"_score\", \"searchable\": false, \"indexed\": false, \"doc_values\": false, \"type\": \"number\", \"scripted\": false}]", - "fieldFormatMap": "{\"@timestamp\": {\"id\": \"date\"}}", - "timeFieldName": "@timestamp", - "title": "journalbeat-*" - }, - "version": 1, - "type": "index-pattern", - "id": "journalbeat-*" - } - ] -} \ No newline at end of file diff --git a/journalbeat/beater/journalbeat.go b/journalbeat/beater/journalbeat.go deleted file mode 100644 index 6694dbd8a9a..00000000000 --- a/journalbeat/beater/journalbeat.go +++ /dev/null @@ -1,126 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 beater - -import ( - "fmt" - "sync" - "time" - - "github.com/elastic/beats/v7/journalbeat/checkpoint" - "github.com/elastic/beats/v7/journalbeat/cmd/instance" - "github.com/elastic/beats/v7/journalbeat/input" - "github.com/elastic/beats/v7/libbeat/beat" - "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/v7/libbeat/common/acker" - "github.com/elastic/beats/v7/libbeat/common/cfgwarn" - "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/v7/libbeat/publisher/pipetool" - - "github.com/elastic/beats/v7/journalbeat/config" - _ "github.com/elastic/beats/v7/journalbeat/include" - - // Add dedicated processors - _ "github.com/elastic/beats/v7/libbeat/processors/decode_csv_fields" -) - -// Journalbeat instance -type Journalbeat struct { - inputs []*input.Input - done chan struct{} - config config.Config - - pipeline beat.Pipeline - checkpoint *checkpoint.Checkpoint - logger *logp.Logger -} - -// New returns a new Journalbeat instance -func New(b *beat.Beat, cfg *common.Config) (beat.Beater, error) { - cfgwarn.Experimental("Journalbeat is experimental.") - - config := config.DefaultConfig - if err := cfg.Unpack(&config); err != nil { - return nil, fmt.Errorf("error reading config file: %v", err) - } - - done := make(chan struct{}) - cp, err := checkpoint.NewCheckpoint(config.RegistryFile, 10, 1*time.Second) - if err != nil { - return nil, err - } - - instance.SetupJournalMetrics() - - var inputs []*input.Input - for _, c := range config.Inputs { - i, err := input.New(c, b.Info, done, cp.States()) - if err != nil { - return nil, err - } - inputs = append(inputs, i) - } - - bt := &Journalbeat{ - inputs: inputs, - done: done, - config: config, - pipeline: b.Publisher, - checkpoint: cp, - logger: logp.NewLogger("journalbeat"), - } - - return bt, nil -} - -// Run sets up the ACK handler and starts inputs to read and forward events to outputs. -func (bt *Journalbeat) Run(b *beat.Beat) error { - bt.logger.Info("journalbeat is running! Hit CTRL-C to stop it.") - defer bt.logger.Info("journalbeat is stopping") - - defer bt.checkpoint.Shutdown() - - pipeline := pipetool.WithACKer(b.Publisher, acker.LastEventPrivateReporter(func(_ int, private interface{}) { - if st, ok := private.(checkpoint.JournalState); ok { - bt.checkpoint.PersistState(st) - } - })) - - var wg sync.WaitGroup - for _, i := range bt.inputs { - wg.Add(1) - go bt.runInput(i, &wg, pipeline) - } - - wg.Wait() - - return nil -} - -func (bt *Journalbeat) runInput(i *input.Input, wg *sync.WaitGroup, pipeline beat.Pipeline) { - defer wg.Done() - i.Run(pipeline) -} - -// Stop stops the beat and its inputs. -func (bt *Journalbeat) Stop() { - close(bt.done) - for _, i := range bt.inputs { - i.Stop() - } -} diff --git a/journalbeat/checkpoint/checkpoint.go b/journalbeat/checkpoint/checkpoint.go deleted file mode 100644 index 2ba4140182a..00000000000 --- a/journalbeat/checkpoint/checkpoint.go +++ /dev/null @@ -1,352 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 checkpoint persists event log state information to disk so that -// event log monitoring can resume from the last read event in the case of a -// restart or unexpected interruption. -package checkpoint - -import ( - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "sort" - "sync" - "time" - - "gopkg.in/yaml.v2" - - "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/v7/libbeat/paths" -) - -// Checkpoint persists event log state information to disk. -type Checkpoint struct { - wg sync.WaitGroup // WaitGroup used to wait on the shutdown of the checkpoint worker. - done chan struct{} // Channel for shutting down the checkpoint worker. - once sync.Once // Used to guarantee shutdown happens once. - file string // File where the state is persisted. - fileLock sync.RWMutex // Lock that protects concurrent reads/writes to file. - numUpdates int // Number of updates received since last persisting to disk. - maxUpdates int // Maximum number of updates to buffer before persisting to disk. - flushInterval time.Duration // Maximum time interval that can pass before persisting to disk. - sort []string // Slice used for sorting states map (store to save on mallocs). - - lock sync.RWMutex - states map[string]JournalState - - save chan JournalState -} - -// PersistedState represents the format of the data persisted to disk. -type PersistedState struct { - UpdateTime time.Time `yaml:"update_time"` - States []JournalState `yaml:"journal_entries"` -} - -// JournalState represents the state of an individual event log. -type JournalState struct { - Path string `yaml:"path"` - Cursor string `yaml:"cursor"` - RealtimeTimestamp uint64 `yaml:"realtime_timestamp"` - MonotonicTimestamp uint64 `yaml:"monotonic_timestamp"` -} - -// NewCheckpoint creates and returns a new Checkpoint. This method loads state -// information from disk if it exists and starts a goroutine for persisting -// state information to disk. Shutdown should be called when finished to -// guarantee any in-memory state information is flushed to disk. -// -// file is the name of the file where event log state is persisted as YAML. -// maxUpdates is the maximum number of updates checkpoint will accept before -// triggering a flush to disk. interval is maximum amount of time that can -// pass since the last flush before triggering a flush to disk (minimum value -// is 1s). -func NewCheckpoint(file string, maxUpdates int, interval time.Duration) (*Checkpoint, error) { - c := &Checkpoint{ - done: make(chan struct{}), - file: file, - maxUpdates: maxUpdates, - flushInterval: interval, - sort: make([]string, 0, 10), - states: make(map[string]JournalState), - save: make(chan JournalState, 1), - } - - err := c.findRegistryFile() - if err != nil { - return nil, fmt.Errorf("error locating the proper registry file: %+v", err) - } - - // Minimum batch size. - if c.maxUpdates < 1 { - c.maxUpdates = 1 - } - - // Minimum flush interval. - if c.flushInterval < time.Second { - c.flushInterval = time.Second - } - - // Read existing state information: - ps, err := c.read() - if err != nil { - return nil, err - } - - if ps != nil { - for _, state := range ps.States { - c.states[state.Path] = state - } - } - - // Write the state file to verify we have have permissions. - err = c.flush() - if err != nil { - return nil, err - } - - c.wg.Add(1) - go c.run() - return c, nil -} - -// Previously the registry file was written to the root folder. It was fixed on -// 7.x but not on 6.x. Thus, migration is needed, so users avoid losing state info. -func (c *Checkpoint) findRegistryFile() error { - migratedPath := paths.Resolve(paths.Data, c.file) - - fs, err := os.Stat(c.file) - if os.IsNotExist(err) { - c.file = migratedPath - return nil - } else if err != nil { - return fmt.Errorf("error accessing previous registry file: %+v", err) - } - - // if two files are the same, do not do anything - migratedFs, err := os.Stat(migratedPath) - if err == nil { - if os.SameFile(fs, migratedFs) { - return nil - } - } - - f, err := os.Open(c.file) - if err != nil { - return err - } - defer f.Close() - - target, err := os.OpenFile(migratedPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, fs.Mode()) - if err != nil { - return err - } - defer target.Close() - - if _, err := io.Copy(target, f); err != nil { - return err - } - - err = target.Sync() - if err != nil { - return fmt.Errorf("error while syncing new registry file to disk: %+v", err) - } - - c.file = migratedPath - - p := filepath.Dir(migratedPath) - pf, err := os.Open(p) - if err != nil { - return nil - } - defer pf.Close() - pf.Sync() - - return nil -} - -// run is worker loop that reads incoming state information from the save -// channel and persists it when the number of changes reaches maxEvents or -// the amount of time since the last disk write reaches flushInterval. -func (c *Checkpoint) run() { - defer c.wg.Done() - defer c.persist() - - flushTimer := time.NewTimer(c.flushInterval) - defer flushTimer.Stop() -loop: - for { - select { - case <-c.done: - break loop - case s := <-c.save: - c.lock.Lock() - c.states[s.Path] = s - c.lock.Unlock() - c.numUpdates++ - if c.numUpdates < c.maxUpdates { - continue - } - case <-flushTimer.C: - } - - c.persist() - flushTimer.Reset(c.flushInterval) - } -} - -// Shutdown stops the checkpoint worker (which persists any state to disk as -// it stops). This method blocks until the checkpoint worker shutdowns. Calling -// this method more once is safe and has no effect. -func (c *Checkpoint) Shutdown() { - c.once.Do(func() { - close(c.done) - c.wg.Wait() - }) -} - -// States returns the current in-memory event log state. This state information -// is bootstrapped with any data found on disk at creation time. -func (c *Checkpoint) States() map[string]JournalState { - c.lock.RLock() - defer c.lock.RUnlock() - - copy := make(map[string]JournalState) - for k, v := range c.states { - copy[k] = v - } - - return copy -} - -// Persist queues the given event log state information to be written to disk. -func (c *Checkpoint) Persist(path, cursor string, realTs, monotonicTs uint64) { - c.PersistState(JournalState{ - Path: path, - Cursor: cursor, - RealtimeTimestamp: realTs, - MonotonicTimestamp: monotonicTs, - }) -} - -// PersistState queues the given event log state to be written to disk. -func (c *Checkpoint) PersistState(st JournalState) { - c.save <- st -} - -// persist writes the current state to disk if the in-memory state is dirty. -func (c *Checkpoint) persist() bool { - if c.numUpdates == 0 { - return false - } - - err := c.flush() - if err != nil { - return false - } - - logp.Debug("checkpoint", "Checkpoint saved to disk. numUpdates=%d", - c.numUpdates) - c.numUpdates = 0 - return true -} - -// flush writes the current state to disk. -func (c *Checkpoint) flush() error { - c.fileLock.Lock() - defer c.fileLock.Unlock() - - tempFile := c.file + ".new" - file, err := create(tempFile) - if os.IsNotExist(err) { - // Try to create directory if it does not exist. - if createDirErr := c.createDir(); createDirErr == nil { - file, err = create(tempFile) - } - } - - if err != nil { - return fmt.Errorf("Failed to flush state to disk. %v", err) - } - - // Sort persisted eventLogs by name. - c.sort = c.sort[:0] - for k := range c.states { - c.sort = append(c.sort, k) - } - sort.Strings(c.sort) - - ps := PersistedState{ - UpdateTime: time.Now().UTC(), - States: make([]JournalState, len(c.sort)), - } - for i, name := range c.sort { - ps.States[i] = c.states[name] - } - - data, err := yaml.Marshal(ps) - if err != nil { - file.Close() - return fmt.Errorf("Failed to flush state to disk. Could not marshal "+ - "data to YAML. %v", err) - } - - _, err = file.Write(data) - if err != nil { - file.Close() - return fmt.Errorf("Failed to flush state to disk. Could not write to "+ - "%s. %v", tempFile, err) - } - - file.Close() - err = os.Rename(tempFile, c.file) - return err -} - -// read loads the persisted state from disk. If the file does not exists then -// the method returns nil and no error. -func (c *Checkpoint) read() (*PersistedState, error) { - c.fileLock.RLock() - defer c.fileLock.RUnlock() - - contents, err := ioutil.ReadFile(c.file) - if err != nil { - if os.IsNotExist(err) { - err = nil - } - return nil, err - } - - ps := &PersistedState{} - err = yaml.Unmarshal(contents, ps) - if err != nil { - return nil, err - } - - return ps, nil -} - -// createDir creates the directory in which the state file will reside if the -// directory does not already exist. -func (c *Checkpoint) createDir() error { - dir := filepath.Dir(c.file) - logp.Info("Creating %s if it does not exist.", dir) - return os.MkdirAll(dir, os.FileMode(0750)) -} diff --git a/journalbeat/checkpoint/checkpoint_test.go b/journalbeat/checkpoint/checkpoint_test.go deleted file mode 100644 index 6f6aa780d9a..00000000000 --- a/journalbeat/checkpoint/checkpoint_test.go +++ /dev/null @@ -1,223 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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. - -//go:build !integration -// +build !integration - -package checkpoint - -import ( - "io/ioutil" - "os" - "path/filepath" - "runtime" - "testing" - "time" - - "github.com/stretchr/testify/assert" -) - -func eventually(t *testing.T, predicate func() (bool, error), timeout time.Duration) { - const minInterval = time.Millisecond * 5 - const maxInterval = time.Millisecond * 500 - - checkInterval := timeout / 100 - if checkInterval < minInterval { - checkInterval = minInterval - } - if checkInterval > maxInterval { - checkInterval = maxInterval - } - for deadline, first := time.Now().Add(timeout), true; first || time.Now().Before(deadline); first = false { - ok, err := predicate() - if err != nil { - t.Fatal("predicate failed with error:", err) - return - } - if ok { - return - } - time.Sleep(checkInterval) - } - t.Fatal("predicate is not true after", timeout) -} - -// Test that a write is triggered when the maximum number of updates is reached. -func TestWriteMaxUpdates(t *testing.T) { - t.Skip("Duplicate of winlogbeat/checkpoint") - dir, err := ioutil.TempDir("", "wlb-checkpoint-test") - if err != nil { - t.Fatal(err) - } - defer func() { - err := os.RemoveAll(dir) - if err != nil { - t.Fatal(err) - } - }() - - file := filepath.Join(dir, "some", "new", "dir", ".winlogbeat.yml") - if !assert.False(t, fileExists(file), "%s should not exist", file) { - return - } - - cp, err := NewCheckpoint(file, 2, time.Hour) - if err != nil { - t.Fatal(err) - } - defer cp.Shutdown() - - // Send update - it's not written to disk but it's in memory. - cp.Persist("", "", 123456, 123456) - found := false - eventually(t, func() (bool, error) { - _, found = cp.States()[""] - return found, nil - }, time.Second*15) - assert.True(t, found) - - ps, err := cp.read() - if err != nil { - t.Fatal("read failed", err) - } - assert.Len(t, ps.States, 0) - - // Send update - it is written to disk. - cp.Persist("", "", 123456, 123456) - eventually(t, func() (bool, error) { - ps, err = cp.read() - return ps != nil && len(ps.States) > 0, err - }, time.Second*15) - - if assert.Len(t, ps.States, 1, "state not written, could be a flush timing issue, retry") { - assert.Equal(t, "", ps.States[0].Path) - assert.Equal(t, "", ps.States[0].Cursor) - } -} - -// Test that a write is triggered when the maximum time period since the last -// write is reached. -func TestWriteTimedFlush(t *testing.T) { - t.Skip("Duplicate of winlogbeat/checkpoint") - dir, err := ioutil.TempDir("", "wlb-checkpoint-test") - if err != nil { - t.Fatal(err) - } - defer func() { - err := os.RemoveAll(dir) - if err != nil { - t.Fatal(err) - } - }() - - file := filepath.Join(dir, ".winlogbeat.yml") - if !assert.False(t, fileExists(file), "%s should not exist", file) { - return - } - - cp, err := NewCheckpoint(file, 100, time.Second) - if err != nil { - t.Fatal(err) - } - defer cp.Shutdown() - - // Send update then wait longer than the flush interval and it should be - // on disk. - cp.Persist("", "cursor", 123456, 123456) - eventually(t, func() (bool, error) { - ps, err := cp.read() - return ps != nil && len(ps.States) > 0, err - }, time.Second*15) - - ps, err := cp.read() - if err != nil { - t.Fatal("read failed", err) - } - if assert.Len(t, ps.States, 1) { - assert.Equal(t, "", ps.States[0].Path) - assert.Equal(t, "cursor", ps.States[0].Cursor) - } -} - -// Test that createDir creates the directory with 0750 permissions. -func TestCreateDir(t *testing.T) { - t.Skip("Duplicate of winlogbeat/checkpoint") - dir, err := ioutil.TempDir("", "wlb-checkpoint-test") - if err != nil { - t.Fatal(err) - } - defer func() { - err := os.RemoveAll(dir) - if err != nil { - t.Fatal(err) - } - }() - - stateDir := filepath.Join(dir, "state", "dir", "does", "not", "exists") - file := filepath.Join(stateDir, ".winlogbeat.yml") - cp := &Checkpoint{file: file} - - if !assert.False(t, fileExists(file), "%s should not exist", file) { - return - } - if err = cp.createDir(); err != nil { - t.Fatal("createDir", err) - } - if !assert.True(t, fileExists(stateDir), "%s should exist", file) { - return - } - - // mkdir on Windows does not pass the POSIX mode to the CreateDirectory - // syscall so doesn't test the mode. - if runtime.GOOS != "windows" { - fileInfo, err := os.Stat(stateDir) - if assert.NoError(t, err) { - assert.Equal(t, true, fileInfo.IsDir()) - assert.Equal(t, os.FileMode(0750), fileInfo.Mode().Perm()) - } - } -} - -// Test createDir when the directory already exists to verify that no error is -// returned. -func TestCreateDirAlreadyExists(t *testing.T) { - t.Skip("Duplicate of winlogbeat/checkpoint") - dir, err := ioutil.TempDir("", "wlb-checkpoint-test") - if err != nil { - t.Fatal(err) - } - defer func() { - err := os.RemoveAll(dir) - if err != nil { - t.Fatal(err) - } - }() - - file := filepath.Join(dir, ".winlogbeat.yml") - cp := &Checkpoint{file: file} - - if !assert.True(t, fileExists(dir), "%s should exist", file) { - return - } - assert.NoError(t, cp.createDir()) -} - -// fileExists returns true if the specified file exists. -func fileExists(file string) bool { - _, err := os.Stat(file) - return !os.IsNotExist(err) -} diff --git a/journalbeat/checkpoint/file_unix.go b/journalbeat/checkpoint/file_unix.go deleted file mode 100644 index 248b5301955..00000000000 --- a/journalbeat/checkpoint/file_unix.go +++ /dev/null @@ -1,27 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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. - -//go:build !windows -// +build !windows - -package checkpoint - -import "os" - -func create(path string) (*os.File, error) { - return os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC|os.O_SYNC, 0600) -} diff --git a/journalbeat/checkpoint/file_windows.go b/journalbeat/checkpoint/file_windows.go deleted file mode 100644 index 267086398f3..00000000000 --- a/journalbeat/checkpoint/file_windows.go +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 checkpoint - -import ( - "os" - "syscall" -) - -const ( - _FILE_FLAG_WRITE_THROUGH = 0x80000000 -) - -func create(path string) (*os.File, error) { - return createWriteThroughFile(path) -} - -// createWriteThroughFile creates a file whose write operations do not go -// through any intermediary cache, they go directly to disk. -func createWriteThroughFile(path string) (*os.File, error) { - if len(path) == 0 { - return nil, syscall.ERROR_FILE_NOT_FOUND - } - pathp, err := syscall.UTF16PtrFromString(path) - if err != nil { - return nil, err - } - - h, err := syscall.CreateFile( - pathp, // Path - syscall.GENERIC_READ|syscall.GENERIC_WRITE, // Access Mode - uint32(syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE), // Share Mode - nil, // Security Attributes - syscall.CREATE_ALWAYS, // Create Mode - uint32(syscall.FILE_ATTRIBUTE_NORMAL|_FILE_FLAG_WRITE_THROUGH), // Flags and Attributes - 0) // Template File - - return os.NewFile(uintptr(h), path), err -} diff --git a/journalbeat/cmd/instance/metrics.go b/journalbeat/cmd/instance/metrics.go deleted file mode 100644 index 3d75426c809..00000000000 --- a/journalbeat/cmd/instance/metrics.go +++ /dev/null @@ -1,69 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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. - -//go:build linux && cgo -// +build linux,cgo - -package instance - -import ( - "fmt" - - "github.com/coreos/go-systemd/v22/sdjournal" - - "github.com/elastic/beats/v7/libbeat/monitoring" -) - -var ( - metrics *monitoring.Registry - journals map[string]*sdjournal.Journal -) - -// SetupJournalMetrics initializes and registers monitoring functions. -func SetupJournalMetrics() { - metrics = monitoring.Default.NewRegistry("journalbeat") - journals = make(map[string]*sdjournal.Journal) - - monitoring.NewFunc(metrics, "journals", reportJournalSizes, monitoring.Report) -} - -// AddJournalToMonitor adds a new journal which has to be monitored. -func AddJournalToMonitor(path string, journal *sdjournal.Journal) { - journals[path] = journal -} - -// StopMonitoringJournal stops monitoring the journal under the path. -func StopMonitoringJournal(path string) { - delete(journals, path) -} - -func reportJournalSizes(m monitoring.Mode, V monitoring.Visitor) { - i := 0 - for path, journal := range journals { - s, err := journal.GetUsage() - if err != nil { - continue - } - - ns := fmt.Sprintf("journal_%d", i) - monitoring.ReportNamespace(V, ns, func() { - monitoring.ReportString(V, "path", path) - monitoring.ReportInt(V, "size_in_bytes", int64(s)) - }) - i++ - } -} diff --git a/journalbeat/cmd/instance/metrics_other.go b/journalbeat/cmd/instance/metrics_other.go deleted file mode 100644 index 990d5f06b09..00000000000 --- a/journalbeat/cmd/instance/metrics_other.go +++ /dev/null @@ -1,27 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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. - -//go:build !linux || !cgo -// +build !linux !cgo - -package instance - -// SetupJournalMetrics initializes and registers monitoring functions. -func SetupJournalMetrics() {} - -// StopMonitoringJournal stops monitoring the journal under the path. -func StopMonitoringJournal(path string) {} diff --git a/journalbeat/cmd/root.go b/journalbeat/cmd/root.go deleted file mode 100644 index a7a2d8ddcaa..00000000000 --- a/journalbeat/cmd/root.go +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 cmd - -import ( - "github.com/elastic/beats/v7/journalbeat/beater" - "github.com/elastic/beats/v7/libbeat/cmd" - "github.com/elastic/beats/v7/libbeat/cmd/instance" - "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/v7/libbeat/ecs" - "github.com/elastic/beats/v7/libbeat/publisher/processing" - - // Import processors. - _ "github.com/elastic/beats/v7/libbeat/processors/script" - _ "github.com/elastic/beats/v7/libbeat/processors/timestamp" -) - -const ( - // Name of this beat. - Name = "journalbeat" -) - -// withECSVersion is a modifier that adds ecs.version to events. -var withECSVersion = processing.WithFields(common.MapStr{ - "ecs": common.MapStr{ - "version": ecs.Version, - }, -}) - -// RootCmd to handle beats cli -var RootCmd *cmd.BeatsRootCmd - -// JournalbeatSettings contains the default settings for journalbeat -func JournalbeatSettings() instance.Settings { - return instance.Settings{ - Name: Name, - HasDashboards: false, - Processing: processing.MakeDefaultSupport(true, withECSVersion, processing.WithHost, processing.WithAgentMeta()), - } -} - -// Initialize initializes the entrypoint commands for journalbeat -func Initialize(settings instance.Settings) *cmd.BeatsRootCmd { - return cmd.GenRootCmdWithSettings(beater.New, settings) -} - -func init() { - RootCmd = Initialize(JournalbeatSettings()) -} diff --git a/journalbeat/config/config.go b/journalbeat/config/config.go deleted file mode 100644 index 1771a2a4e7c..00000000000 --- a/journalbeat/config/config.go +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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. - -// Config is put into a different package to prevent cyclic imports in case -// it is needed in several locations - -package config - -import ( - "github.com/elastic/beats/v7/libbeat/common" -) - -// Config stores the configuration of Journalbeat -type Config struct { - Inputs []*common.Config `config:"inputs"` - RegistryFile string `config:"registry_file"` -} - -var ( - // DefaultConfig are the defaults of a Journalbeat instance - DefaultConfig = Config{ - RegistryFile: "registry", - } -) diff --git a/journalbeat/conftest.py b/journalbeat/conftest.py deleted file mode 100644 index 2f3f8199559..00000000000 --- a/journalbeat/conftest.py +++ /dev/null @@ -1,4 +0,0 @@ -import os -import sys - -sys.path.append(os.path.join(os.path.dirname(__file__), '../libbeat/tests/system')) diff --git a/journalbeat/docs/config-options.asciidoc b/journalbeat/docs/config-options.asciidoc deleted file mode 100644 index 106318ceb6d..00000000000 --- a/journalbeat/docs/config-options.asciidoc +++ /dev/null @@ -1,251 +0,0 @@ -[id="configuration-{beatname_lc}-options"] -== Configure inputs - -++++ -Inputs -++++ - -By default, {beatname_uc} reads log events from the default systemd journals. To -specify other journal files, set the <<{beatname_lc}-paths,`paths`>> option in -the +{beatname_lc}.inputs+ section of the +{beatname_lc}.yml+ file. Each path -can be a directory path (to collect events from all journals in a directory), or -a file path. For example: - -["source","sh",subs="attributes"] ----- -{beatname_lc}.inputs: -- paths: - - "/dev/log" - - "/var/log/messages/my-journal-file.journal" ----- - -Within the configuration file, you can also specify options that control how -{beatname_uc} reads the journal files and which fields are sent to the -configured output. See <<{beatname_lc}-options>> for a list of available -options. - -The following examples show how to configure {beatname_uc} for some common use -cases. - -[[monitor-multiple-journals]] -.Example 1: Monitor multiple journals under the same directory -This example configures {beatname_uc} to read from multiple journals that are -stored under the same directory. {beatname_uc} merges all journals under the -directory into a single event stream and reads the events. With `seek` set to -`cursor`, {beatname_uc} starts reading at the beginning of the journal, but will -continue reading at the last known position after a reload or restart. -["source","sh",subs="attributes"] ----- -{beatname_lc}.inputs: -- paths: ["/path/to/journal/directory"] - seek: cursor ----- - -[[filter-using-field-names]] -.Example 2: Fetch log events for Redis running on Docker (uses field names from systemd) -This example configures {beatname_uc} to fetch log events for Redis running in a -Docker container. The fields are matched using field names from the systemd -journal. -["source","sh",subs="attributes"] ----- -{beatname_lc}.inputs: -- paths: [] - include_matches: - - "CONTAINER_TAG=redis" - - "_COMM=redis" ----- - -[[filter-using-translated-names]] -.Example 3: Fetch log events for Redis running on Docker (uses translated field names) -This example also configures {beatname_uc} to fetch log events for Redis running -in a Docker container. However, in this example the fields are matched using the -<> provided by {beatname_uc}. -["source","sh",subs="attributes"] ----- -{beatname_lc}.inputs: -- paths: [] - include_matches: - - "container.image.tag=redis" - - "process.name=redis" ----- - -[id="{beatname_lc}-options"] -[float] -=== Configuration options -You can specify the following options to configure how {beatname_uc} reads the -journal files. - -[float] -[id="{beatname_lc}-id"] -==== `id` - -An optional unique identifier for the input. By providing a unique `id` you can -operate multiple inputs on the same journal. This allows each input's cursor -to be persisted independently in the registry file. - ----- -{beatname_lc}.inputs: -- id: consul.service - paths: [] - include_matches: - - _SYSTEMD_UNIT=consul.service - -- id: vault.service - paths: [] - include_matches: - - _SYSTEMD_UNIT=vault.service ----- - -[float] -[id="{beatname_lc}-paths"] -==== `paths` - -A list of paths that will be crawled and fetched. Each path can be a directory -path (to collect events from all journals in a directory), or a file path. If -you specify a directory, {beatname_uc} merges all journals under the directory -into a single journal and reads them. - -If no paths are specified, {beatname_uc} reads from the default journal. - -[float] -[id="{beatname_lc}-backoff"] -==== `backoff` - -The number of seconds to wait before trying to read again from journals. The -default is 1s. - -[float] -[id="{beatname_lc}-max-backoff"] -==== `max_backoff` - -The maximum number of seconds to wait before attempting to read again from -journals. The default is 60s. - -[float] -[id="seek"] -==== `seek` - -The position to start reading the journal from. Valid settings are: - -* `head`: Starts reading at the beginning of the journal. After a restart, -{beatname_uc} resends all log messages in the journal. -* `tail`: Starts reading at the end of the journal. After a restart, -{beatname_uc} resends the last message, which might result in duplicates. If -multiple log messages are written to a journal while {beatname_uc} is down, -only the last log message is sent on restart. -* `cursor`: On first read, starts reading at the beginning of the journal. After a -reload or restart, continues reading at the last known position. - -When specified under `paths`, the `seek` setting applies to all journals under -the configured paths. When specified directly under the +{beatname_lc}+ -namespace, the setting applies to all journals read by {beatname_uc}. - -If you have old log files and want to skip lines, start {beatname_uc} with -`seek: tail` specified. Then stop {beatname_uc}, set `seek: cursor`, and restart -{beatname_uc}. - -[float] -[id="include-matches"] -==== `include_matches` - -A list of filter expressions used to match fields. The format of the expression -is `field=value`. {beatname_uc} fetches all events that exactly match the -expressions. Pattern matching is not supported. - -To reference fields, use one of the following: - -* The field name used by the systemd journal. For example, -`CONTAINER_TAG=redis` (<>). -* The <> used by -{beatname_uc}. For example, `container.image.tag=redis` -(<>). {beatname_uc} -does not translate all fields from the journal. For custom fields, use the name -specified in the systemd journal. - -When specified under `paths`, the `include_matches` filter is applied to all -journals under the configured paths. When specified directly under the -+{beatname_lc}+ namespace, the setting applies to all journals read by -{beatname_uc}. - -[float] -[[translated-fields]] -=== Translated field names - -You can use the following translated names in filter expressions to reference -journald fields: - -[horizontal] -*Journald field name*:: *Translated name* -`COREDUMP_UNIT`:: `journald.coredump.unit` -`COREDUMP_USER_UNIT`:: `journald.coredump.user_unit` -`OBJECT_AUDIT_LOGINUID`:: `journald.object.audit.login_uid` -`OBJECT_AUDIT_SESSION`:: `journald.object.audit.session` -`OBJECT_CMDLINE`:: `journald.object.cmd` -`OBJECT_COMM`:: `journald.object.name` -`OBJECT_EXE`:: `journald.object.executable` -`OBJECT_GID`:: `journald.object.gid` -`OBJECT_PID`:: `journald.object.pid` -`OBJECT_SYSTEMD_OWNER_UID`:: `journald.object.systemd.owner_uid` -`OBJECT_SYSTEMD_SESSION`:: `journald.object.systemd.session` -`OBJECT_SYSTEMD_UNIT`:: `journald.object.systemd.unit` -`OBJECT_SYSTEMD_USER_UNIT`:: `journald.object.systemd.user_unit` -`OBJECT_UID`:: `journald.object.uid` -`_AUDIT_LOGINUID`:: `process.audit.login_uid` -`_AUDIT_SESSION`:: `process.audit.session` -`_BOOT_ID`:: `host.boot_id` -`_CAP_EFFECTIVE`:: `process.capabilites` -`_CMDLINE`:: `process.cmd` -`_CODE_FILE`:: `journald.code.file` -`_CODE_FUNC`:: `journald.code.func` -`_CODE_LINE`:: `journald.code.line` -`_COMM`:: `process.name` -`_EXE`:: `process.executable` -`_GID`:: `process.uid` -`_HOSTNAME`:: `host.name` -`_KERNEL_DEVICE`:: `journald.kernel.device` -`_KERNEL_SUBSYSTEM`:: `journald.kernel.subsystem` -`_MACHINE_ID`:: `host.id` -`_MESSAGE`:: `message` -`_PID`:: `process.pid` -`_PRIORITY`:: `syslog.priority` -`_SYSLOG_FACILITY`:: `syslog.facility` -`_SYSLOG_IDENTIFIER`:: `syslog.identifier` -`_SYSLOG_PID`:: `syslog.pid` -`_SYSTEMD_CGROUP`:: `systemd.cgroup` -`_SYSTEMD_INVOCATION_ID`:: `systemd.invocation_id` -`_SYSTEMD_OWNER_UID`:: `systemd.owner_uid` -`_SYSTEMD_SESSION`:: `systemd.session` -`_SYSTEMD_SLICE`:: `systemd.slice` -`_SYSTEMD_UNIT`:: `systemd.unit` -`_SYSTEMD_USER_SLICE`:: `systemd.user_slice` -`_SYSTEMD_USER_UNIT`:: `systemd.user_unit` -`_TRANSPORT`:: `systemd.transport` -`_UDEV_DEVLINK`:: `journald.kernel.device_symlinks` -`_UDEV_DEVNODE`:: `journald.kernel.device_node_path` -`_UDEV_SYSNAME`:: `journald.kernel.device_name` -`_UID`:: `process.uid` - - -The following translated fields for -https://docs.docker.com/config/containers/logging/journald/[Docker] are also -available: - -[horizontal] -`CONTAINER_ID`:: `container.id_truncated` -`CONTAINER_ID_FULL`:: `container.id` -`CONTAINER_NAME`:: `container.name` -`CONTAINER_PARTIAL_MESSAGE`:: `container.partial` -`CONTAINER_TAG`:: `container.image.tag` - -[float] -[id="index"] -==== `index` - -If present, this formatted string overrides the index for events from this input -(for elasticsearch outputs), or sets the `raw_index` field of the event's -metadata (for other outputs). This string can only refer to the agent name and -version and the event timestamp; for access to dynamic fields, use -`output.elasticsearch.index` or a processor. - -Example value: `"%{[agent.name]}-myindex-%{+yyyy.MM.dd}"` might -expand to `"journalbeat-myindex-2019.12.13"`. diff --git a/journalbeat/docs/configuring-howto.asciidoc b/journalbeat/docs/configuring-howto.asciidoc deleted file mode 100644 index 246880468e3..00000000000 --- a/journalbeat/docs/configuring-howto.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -[id="configuring-howto-{beatname_lc}"] -= Configure {beatname_uc} - -[partintro] --- -++++ -Configure -++++ - -include::{libbeat-dir}/shared/configuring-intro.asciidoc[] - -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <<{beatname_lc}-reference-yml>> - --- - -include::./config-options.asciidoc[] - -include::./general-options.asciidoc[] - -include::{libbeat-dir}/shared-path-config.asciidoc[] - -include::{libbeat-dir}/outputconfig.asciidoc[] - -ifndef::no_kerberos[] -include::{libbeat-dir}/shared-kerberos-config.asciidoc[] -endif::[] - -include::{libbeat-dir}/shared-ssl-config.asciidoc[] - -include::{libbeat-dir}/shared-ilm.asciidoc[] - -include::{libbeat-dir}/setup-config.asciidoc[] - -include::./filtering.asciidoc[] - -include::{libbeat-dir}/queueconfig.asciidoc[] - -include::{libbeat-dir}/loggingconfig.asciidoc[] - -include::{libbeat-dir}/http-endpoint.asciidoc[] - -include::{libbeat-dir}/regexp.asciidoc[] - -include::{libbeat-dir}/shared-instrumentation.asciidoc[] - -include::{libbeat-dir}/reference-yml.asciidoc[] diff --git a/journalbeat/docs/faq.asciidoc b/journalbeat/docs/faq.asciidoc deleted file mode 100644 index bbe89a61c72..00000000000 --- a/journalbeat/docs/faq.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[[faq]] -== Common problems - -This section describes common problems you might encounter with -{beatname_uc}. Also check out the -https://discuss.elastic.co/c/beats/{beatname_lc}[{beatname_uc} discussion forum]. - -include::{libbeat-dir}/faq-limit-bandwidth.asciidoc[] - -include::{libbeat-dir}/shared-faq.asciidoc[] diff --git a/journalbeat/docs/fields.asciidoc b/journalbeat/docs/fields.asciidoc deleted file mode 100644 index f69b2225c1f..00000000000 --- a/journalbeat/docs/fields.asciidoc +++ /dev/null @@ -1,16301 +0,0 @@ - -//// -This file is generated! See _meta/fields.yml and scripts/generate_fields_docs.py -//// - -[[exported-fields]] -= Exported fields - -[partintro] - --- -This document describes the fields that are exported by Journalbeat. They are -grouped in the following categories: - -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> - --- -[[exported-fields-beat-common]] -== Beat fields - -Contains common beat fields available in all event types. - - - -*`agent.hostname`*:: -+ --- -Deprecated - use agent.name or agent.id to identify an agent. - - -type: alias - -alias to: agent.name - --- - -*`beat.timezone`*:: -+ --- -type: alias - -alias to: event.timezone - --- - -*`fields`*:: -+ --- -Contains user configurable fields. - - -type: object - --- - -*`beat.name`*:: -+ --- -type: alias - -alias to: host.name - --- - -*`beat.hostname`*:: -+ --- -type: alias - -alias to: agent.name - --- - -*`timeseries.instance`*:: -+ --- -Time series instance id - -type: keyword - --- - -[[exported-fields-cloud]] -== Cloud provider metadata fields - -Metadata from cloud providers added by the add_cloud_metadata processor. - - - -*`cloud.image.id`*:: -+ --- -Image ID for the cloud instance. - - -example: ami-abcd1234 - --- - -*`meta.cloud.provider`*:: -+ --- -type: alias - -alias to: cloud.provider - --- - -*`meta.cloud.instance_id`*:: -+ --- -type: alias - -alias to: cloud.instance.id - --- - -*`meta.cloud.instance_name`*:: -+ --- -type: alias - -alias to: cloud.instance.name - --- - -*`meta.cloud.machine_type`*:: -+ --- -type: alias - -alias to: cloud.machine.type - --- - -*`meta.cloud.availability_zone`*:: -+ --- -type: alias - -alias to: cloud.availability_zone - --- - -*`meta.cloud.project_id`*:: -+ --- -type: alias - -alias to: cloud.project.id - --- - -*`meta.cloud.region`*:: -+ --- -type: alias - -alias to: cloud.region - --- - -[[exported-fields-common]] -== Common Journalbeat fields - -Contains common fields available in all event types. - - - -[float] -=== coredump - -Fields used by systemd-coredump kernel helper. - - - -*`coredump.unit`*:: -+ --- -Annotations of messages containing coredumps from system units. - - -type: keyword - --- - -*`coredump.user_unit`*:: -+ --- -Annotations of messages containing coredumps from user units. - - -type: keyword - --- - -[float] -=== journald - -Fields provided by journald. - - - -[float] -=== object - -Fields to log on behalf of a different program. - - - -[float] -=== audit - -Audit fields of event. - - - -*`journald.object.audit.login_uid`*:: -+ --- -The login UID of the object process. - - -type: long - -example: 1000 - -required: False - --- - -*`journald.object.audit.session`*:: -+ --- -The audit session of the object process. - - -type: long - -example: 3 - -required: False - --- - -*`journald.object.process.command_line`*:: -+ --- -The command line of the process. - - -type: keyword - -example: /lib/systemd/systemd --user - -required: False - --- - -*`journald.object.process.name`*:: -+ --- -Name of the executable. - - -type: keyword - -example: /lib/systemd/systemd - -required: False - --- - -*`journald.object.process.executable`*:: -+ --- -Path to the the executable. - - -type: keyword - -example: /lib/systemd/systemd - -required: False - --- - -*`journald.object.uid`*:: -+ --- -UID of the object process. - - -type: long - -required: False - --- - -*`journald.object.gid`*:: -+ --- -GID of the object process. - - -type: long - -required: False - --- - -*`journald.object.pid`*:: -+ --- -PID of the object process. - - -type: long - -required: False - --- - -[float] -=== systemd - -Systemd fields of event. - - - -*`journald.object.systemd.owner_uid`*:: -+ --- -The UID of the owner. - - -type: long - -required: False - --- - -*`journald.object.systemd.session`*:: -+ --- -The ID of the systemd session. - - -type: keyword - -required: False - --- - -*`journald.object.systemd.unit`*:: -+ --- -The name of the systemd unit. - - -type: keyword - -required: False - --- - -*`journald.object.systemd.user_unit`*:: -+ --- -The name of the systemd user unit. - - -type: keyword - -required: False - --- - -[float] -=== kernel - -Fields to log on behalf of a different program. - - - -*`journald.kernel.device`*:: -+ --- -The kernel device name. - - -type: keyword - -required: False - --- - -*`journald.kernel.subsystem`*:: -+ --- -The kernel subsystem name. - - -type: keyword - -required: False - --- - -*`journald.kernel.device_symlinks`*:: -+ --- -Additional symlink names pointing to the device node in /dev. - - -type: keyword - -required: False - --- - -*`journald.kernel.device_node_path`*:: -+ --- -The device node path of this device in /dev. - - -type: keyword - -required: False - --- - -*`journald.kernel.device_name`*:: -+ --- -The kernel device name as it shows up in the device tree below /sys. - - -type: keyword - -required: False - --- - -[float] -=== code - -Fields of the code generating the event. - - - -*`journald.code.file`*:: -+ --- -The name of the source file where the log is generated. - - -type: keyword - -example: ../src/core/manager.c - -required: False - --- - -*`journald.code.function`*:: -+ --- -The name of the function which generated the log message. - - -type: keyword - -example: job_log_status_message - -required: False - --- - -*`journald.code.line`*:: -+ --- -The line number of the code which generated the log message. - - -type: long - -example: 123 - -required: False - --- - -[float] -=== process - -Fields to log on behalf of a different program. - - - -[float] -=== audit - -Audit fields of event. - - - -*`journald.process.audit.loginuid`*:: -+ --- -The login UID of the source process. - - -type: long - -example: 1000 - -required: False - --- - -*`journald.process.audit.session`*:: -+ --- -The audit session of the source process. - - -type: long - -example: 3 - -required: False - --- - -*`journald.process.command_line`*:: -+ --- -The command line of the process. - - -type: keyword - -example: /lib/systemd/systemd --user - -required: False - --- - -*`journald.process.name`*:: -+ --- -Name of the executable. - - -type: keyword - -example: /lib/systemd/systemd - -required: False - --- - -*`journald.process.executable`*:: -+ --- -Path to the the executable. - - -type: keyword - -example: /lib/systemd/systemd - -required: False - --- - -*`journald.process.pid`*:: -+ --- -The ID of the process which logged the message. - - -type: long - -example: 1 - -required: False - --- - -*`journald.process.gid`*:: -+ --- -The ID of the group which runs the process. - - -type: long - -example: 1 - -required: False - --- - -*`journald.process.uid`*:: -+ --- -The ID of the user which runs the process. - - -type: long - -example: 1 - -required: False - --- - -*`journald.process.capabilities`*:: -+ --- -The effective capabilities of the process. - - -required: False - --- - -[float] -=== systemd - -Fields of systemd. - - - -*`systemd.invocation_id`*:: -+ --- -The invocation ID for the runtime cycle of the unit the message was generated in. - - -type: keyword - -example: 8450f1672de646c88cd133aadd4f2d70 - -required: False - --- - -*`systemd.cgroup`*:: -+ --- -The control group path in the systemd hierarchy. - - -type: keyword - -example: /user.slice/user-1234.slice/session-2.scope - -required: False - --- - -*`systemd.owner_uid`*:: -+ --- -The owner UID of the systemd user unit or systemd session. - - -type: long - -required: False - --- - -*`systemd.session`*:: -+ --- -The ID of the systemd session. - - -type: keyword - -required: False - --- - -*`systemd.slice`*:: -+ --- -The systemd slice unit. - - -type: keyword - -example: user-1234.slice - -required: False - --- - -*`systemd.user_slice`*:: -+ --- -The systemd user slice unit. - - -type: keyword - -required: False - --- - -*`systemd.unit`*:: -+ --- -The name of the systemd unit. - - -type: keyword - -example: nginx.service - -required: False - --- - -*`systemd.user_unit`*:: -+ --- -The name of the systemd user unit. - - -type: keyword - -example: user-1234.slice - -required: False - --- - -*`systemd.transport`*:: -+ --- -How the log message was received by journald. - - -type: keyword - -example: syslog - -required: True - --- - -[float] -=== host - -Fields of the host. - - - -*`host.boot_id`*:: -+ --- -The boot ID for the boot the log was generated in. - - -type: keyword - -example: dd8c974asdf01dbe2ef26d7fasdf264c9 - -required: False - --- - -[float] -=== syslog - -Fields of the code generating the event. - - - -*`syslog.priority`*:: -+ --- -The priority of the message. A syslog compatibility field. - - -type: long - -example: 1 - -required: False - --- - -*`syslog.facility`*:: -+ --- -The facility of the message. A syslog compatibility field. - - -type: long - -example: 1 - -required: False - --- - -*`syslog.identifier`*:: -+ --- -The identifier of the message. A syslog compatibility field. - - -type: keyword - -example: su - -required: False - --- - -*`custom`*:: -+ --- -Arbitrary fields coming from processes. - - -type: nested - -required: False - --- - -*`read_timestamp`*:: -+ --- -type: alias - -alias to: event.created - --- - - - -*`container.log.tag`*:: -+ --- -User defined tag of a container. - - -type: keyword - --- - -[[exported-fields-docker-processor]] -== Docker fields - -Docker stats collected from Docker. - - - - -*`docker.container.id`*:: -+ --- -type: alias - -alias to: container.id - --- - -*`docker.container.image`*:: -+ --- -type: alias - -alias to: container.image.name - --- - -*`docker.container.name`*:: -+ --- -type: alias - -alias to: container.name - --- - -*`docker.container.labels`*:: -+ --- -Image labels. - - -type: object - --- - -[[exported-fields-ecs]] -== ECS fields - - -This section defines Elastic Common Schema (ECS) fields—a common set of fields -to be used when storing event data in {es}. - -This is an exhaustive list, and fields listed here are not necessarily used by {beatname_uc}. -The goal of ECS is to enable and encourage users of {es} to normalize their event data, -so that they can better analyze, visualize, and correlate the data represented in their events. - -See the {ecs-ref}[ECS reference] for more information. - -*`@timestamp`*:: -+ --- -Date/time when the event originated. -This is the date/time extracted from the event, typically representing when the event was generated by the source. -If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline. -Required field for all events. - -type: date - -example: 2016-05-23T08:05:34.853Z - -required: True - --- - -*`labels`*:: -+ --- -Custom key/value pairs. -Can be used to add meta information to events. Should not contain nested objects. All values are stored as keyword. -Example: `docker` and `k8s` labels. - -type: object - -example: {"application": "foo-bar", "env": "production"} - --- - -*`message`*:: -+ --- -For log events the message field contains the log message, optimized for viewing in a log viewer. -For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. -If multiple messages exist, they can be combined into one message. - -type: match_only_text - -example: Hello World - --- - -*`tags`*:: -+ --- -List of keywords used to tag each event. - -type: keyword - -example: ["production", "env2"] - --- - -[float] -=== agent - -The agent fields contain the data about the software entity, if any, that collects, detects, or observes events on a host, or takes measurements on a host. -Examples include Beats. Agents may also run on observers. ECS agent.* fields shall be populated with details of the agent running on the host or observer where the event happened or the measurement was taken. - - -*`agent.build.original`*:: -+ --- -Extended build information for the agent. -This field is intended to contain any build information that a data source may provide, no specific formatting is required. - -type: keyword - -example: metricbeat version 7.6.0 (amd64), libbeat 7.6.0 [6a23e8f8f30f5001ba344e4e54d8d9cb82cb107c built 2020-02-05 23:10:10 +0000 UTC] - --- - -*`agent.ephemeral_id`*:: -+ --- -Ephemeral identifier of this agent (if one exists). -This id normally changes across restarts, but `agent.id` does not. - -type: keyword - -example: 8a4f500f - --- - -*`agent.id`*:: -+ --- -Unique identifier of this agent (if one exists). -Example: For Beats this would be beat.id. - -type: keyword - -example: 8a4f500d - --- - -*`agent.name`*:: -+ --- -Custom name of the agent. -This is a name that can be given to an agent. This can be helpful if for example two Filebeat instances are running on the same host but a human readable separation is needed on which Filebeat instance data is coming from. -If no name is given, the name is often left empty. - -type: keyword - -example: foo - --- - -*`agent.type`*:: -+ --- -Type of the agent. -The agent type always stays the same and should be given by the agent used. In case of Filebeat the agent would always be Filebeat also if two Filebeat instances are run on the same machine. - -type: keyword - -example: filebeat - --- - -*`agent.version`*:: -+ --- -Version of the agent. - -type: keyword - -example: 6.0.0-rc2 - --- - -[float] -=== as - -An autonomous system (AS) is a collection of connected Internet Protocol (IP) routing prefixes under the control of one or more network operators on behalf of a single administrative entity or domain that presents a common, clearly defined routing policy to the internet. - - -*`as.number`*:: -+ --- -Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. - -type: long - -example: 15169 - --- - -*`as.organization.name`*:: -+ --- -Organization name. - -type: keyword - -example: Google LLC - --- - -*`as.organization.name.text`*:: -+ --- -type: match_only_text - --- - -[float] -=== client - -A client is defined as the initiator of a network connection for events regarding sessions, connections, or bidirectional flow records. -For TCP events, the client is the initiator of the TCP connection that sends the SYN packet(s). For other protocols, the client is generally the initiator or requestor in the network transaction. Some systems use the term "originator" to refer the client in TCP connections. The client fields describe details about the system acting as the client in the network event. Client fields are usually populated in conjunction with server fields. Client fields are generally not populated for packet-level events. -Client / server representations can add semantic context to an exchange, which is helpful to visualize the data in certain situations. If your context falls in that category, you should still ensure that source and destination are filled appropriately. - - -*`client.address`*:: -+ --- -Some event client addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. -Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. - -type: keyword - --- - -*`client.as.number`*:: -+ --- -Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. - -type: long - -example: 15169 - --- - -*`client.as.organization.name`*:: -+ --- -Organization name. - -type: keyword - -example: Google LLC - --- - -*`client.as.organization.name.text`*:: -+ --- -type: match_only_text - --- - -*`client.bytes`*:: -+ --- -Bytes sent from the client to the server. - -type: long - -example: 184 - -format: bytes - --- - -*`client.domain`*:: -+ --- -Client domain. - -type: keyword - --- - -*`client.geo.city_name`*:: -+ --- -City name. - -type: keyword - -example: Montreal - --- - -*`client.geo.continent_code`*:: -+ --- -Two-letter code representing continent's name. - -type: keyword - -example: NA - --- - -*`client.geo.continent_name`*:: -+ --- -Name of the continent. - -type: keyword - -example: North America - --- - -*`client.geo.country_iso_code`*:: -+ --- -Country ISO code. - -type: keyword - -example: CA - --- - -*`client.geo.country_name`*:: -+ --- -Country name. - -type: keyword - -example: Canada - --- - -*`client.geo.location`*:: -+ --- -Longitude and latitude. - -type: geo_point - -example: { "lon": -73.614830, "lat": 45.505918 } - --- - -*`client.geo.name`*:: -+ --- -User-defined description of a location, at the level of granularity they care about. -Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. -Not typically used in automated geolocation. - -type: keyword - -example: boston-dc - --- - -*`client.geo.postal_code`*:: -+ --- -Postal code associated with the location. -Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. - -type: keyword - -example: 94040 - --- - -*`client.geo.region_iso_code`*:: -+ --- -Region ISO code. - -type: keyword - -example: CA-QC - --- - -*`client.geo.region_name`*:: -+ --- -Region name. - -type: keyword - -example: Quebec - --- - -*`client.geo.timezone`*:: -+ --- -The time zone of the location, such as IANA time zone name. - -type: keyword - -example: America/Argentina/Buenos_Aires - --- - -*`client.ip`*:: -+ --- -IP address of the client (IPv4 or IPv6). - -type: ip - --- - -*`client.mac`*:: -+ --- -MAC address of the client. -The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen. - -type: keyword - -example: 00-00-5E-00-53-23 - --- - -*`client.nat.ip`*:: -+ --- -Translated IP of source based NAT sessions (e.g. internal client to internet). -Typically connections traversing load balancers, firewalls, or routers. - -type: ip - --- - -*`client.nat.port`*:: -+ --- -Translated port of source based NAT sessions (e.g. internal client to internet). -Typically connections traversing load balancers, firewalls, or routers. - -type: long - -format: string - --- - -*`client.packets`*:: -+ --- -Packets sent from the client to the server. - -type: long - -example: 12 - --- - -*`client.port`*:: -+ --- -Port of the client. - -type: long - -format: string - --- - -*`client.registered_domain`*:: -+ --- -The highest registered client domain, stripped of the subdomain. -For example, the registered domain for "foo.example.com" is "example.com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk". - -type: keyword - -example: example.com - --- - -*`client.subdomain`*:: -+ --- -The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain. -For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period. - -type: keyword - -example: east - --- - -*`client.top_level_domain`*:: -+ --- -The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk". - -type: keyword - -example: co.uk - --- - -*`client.user.domain`*:: -+ --- -Name of the directory the user is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`client.user.email`*:: -+ --- -User email address. - -type: keyword - --- - -*`client.user.full_name`*:: -+ --- -User's full name, if available. - -type: keyword - -example: Albert Einstein - --- - -*`client.user.full_name.text`*:: -+ --- -type: match_only_text - --- - -*`client.user.group.domain`*:: -+ --- -Name of the directory the group is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`client.user.group.id`*:: -+ --- -Unique identifier for the group on the system/platform. - -type: keyword - --- - -*`client.user.group.name`*:: -+ --- -Name of the group. - -type: keyword - --- - -*`client.user.hash`*:: -+ --- -Unique user hash to correlate information for a user in anonymized form. -Useful if `user.id` or `user.name` contain confidential information and cannot be used. - -type: keyword - --- - -*`client.user.id`*:: -+ --- -Unique identifier of the user. - -type: keyword - -example: S-1-5-21-202424912787-2692429404-2351956786-1000 - --- - -*`client.user.name`*:: -+ --- -Short name or login of the user. - -type: keyword - -example: a.einstein - --- - -*`client.user.name.text`*:: -+ --- -type: match_only_text - --- - -*`client.user.roles`*:: -+ --- -Array of user roles at the time of the event. - -type: keyword - -example: ["kibana_admin", "reporting_user"] - --- - -[float] -=== cloud - -Fields related to the cloud or infrastructure the events are coming from. - - -*`cloud.account.id`*:: -+ --- -The cloud account or organization id used to identify different entities in a multi-tenant environment. -Examples: AWS account id, Google Cloud ORG Id, or other unique identifier. - -type: keyword - -example: 666777888999 - --- - -*`cloud.account.name`*:: -+ --- -The cloud account name or alias used to identify different entities in a multi-tenant environment. -Examples: AWS account name, Google Cloud ORG display name. - -type: keyword - -example: elastic-dev - --- - -*`cloud.availability_zone`*:: -+ --- -Availability zone in which this host, resource, or service is located. - -type: keyword - -example: us-east-1c - --- - -*`cloud.instance.id`*:: -+ --- -Instance ID of the host machine. - -type: keyword - -example: i-1234567890abcdef0 - --- - -*`cloud.instance.name`*:: -+ --- -Instance name of the host machine. - -type: keyword - --- - -*`cloud.machine.type`*:: -+ --- -Machine type of the host machine. - -type: keyword - -example: t2.medium - --- - -*`cloud.origin.account.id`*:: -+ --- -The cloud account or organization id used to identify different entities in a multi-tenant environment. -Examples: AWS account id, Google Cloud ORG Id, or other unique identifier. - -type: keyword - -example: 666777888999 - --- - -*`cloud.origin.account.name`*:: -+ --- -The cloud account name or alias used to identify different entities in a multi-tenant environment. -Examples: AWS account name, Google Cloud ORG display name. - -type: keyword - -example: elastic-dev - --- - -*`cloud.origin.availability_zone`*:: -+ --- -Availability zone in which this host, resource, or service is located. - -type: keyword - -example: us-east-1c - --- - -*`cloud.origin.instance.id`*:: -+ --- -Instance ID of the host machine. - -type: keyword - -example: i-1234567890abcdef0 - --- - -*`cloud.origin.instance.name`*:: -+ --- -Instance name of the host machine. - -type: keyword - --- - -*`cloud.origin.machine.type`*:: -+ --- -Machine type of the host machine. - -type: keyword - -example: t2.medium - --- - -*`cloud.origin.project.id`*:: -+ --- -The cloud project identifier. -Examples: Google Cloud Project id, Azure Project id. - -type: keyword - -example: my-project - --- - -*`cloud.origin.project.name`*:: -+ --- -The cloud project name. -Examples: Google Cloud Project name, Azure Project name. - -type: keyword - -example: my project - --- - -*`cloud.origin.provider`*:: -+ --- -Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. - -type: keyword - -example: aws - --- - -*`cloud.origin.region`*:: -+ --- -Region in which this host, resource, or service is located. - -type: keyword - -example: us-east-1 - --- - -*`cloud.origin.service.name`*:: -+ --- -The cloud service name is intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server. -Examples: app engine, app service, cloud run, fargate, lambda. - -type: keyword - -example: lambda - --- - -*`cloud.project.id`*:: -+ --- -The cloud project identifier. -Examples: Google Cloud Project id, Azure Project id. - -type: keyword - -example: my-project - --- - -*`cloud.project.name`*:: -+ --- -The cloud project name. -Examples: Google Cloud Project name, Azure Project name. - -type: keyword - -example: my project - --- - -*`cloud.provider`*:: -+ --- -Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. - -type: keyword - -example: aws - --- - -*`cloud.region`*:: -+ --- -Region in which this host, resource, or service is located. - -type: keyword - -example: us-east-1 - --- - -*`cloud.service.name`*:: -+ --- -The cloud service name is intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server. -Examples: app engine, app service, cloud run, fargate, lambda. - -type: keyword - -example: lambda - --- - -*`cloud.target.account.id`*:: -+ --- -The cloud account or organization id used to identify different entities in a multi-tenant environment. -Examples: AWS account id, Google Cloud ORG Id, or other unique identifier. - -type: keyword - -example: 666777888999 - --- - -*`cloud.target.account.name`*:: -+ --- -The cloud account name or alias used to identify different entities in a multi-tenant environment. -Examples: AWS account name, Google Cloud ORG display name. - -type: keyword - -example: elastic-dev - --- - -*`cloud.target.availability_zone`*:: -+ --- -Availability zone in which this host, resource, or service is located. - -type: keyword - -example: us-east-1c - --- - -*`cloud.target.instance.id`*:: -+ --- -Instance ID of the host machine. - -type: keyword - -example: i-1234567890abcdef0 - --- - -*`cloud.target.instance.name`*:: -+ --- -Instance name of the host machine. - -type: keyword - --- - -*`cloud.target.machine.type`*:: -+ --- -Machine type of the host machine. - -type: keyword - -example: t2.medium - --- - -*`cloud.target.project.id`*:: -+ --- -The cloud project identifier. -Examples: Google Cloud Project id, Azure Project id. - -type: keyword - -example: my-project - --- - -*`cloud.target.project.name`*:: -+ --- -The cloud project name. -Examples: Google Cloud Project name, Azure Project name. - -type: keyword - -example: my project - --- - -*`cloud.target.provider`*:: -+ --- -Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. - -type: keyword - -example: aws - --- - -*`cloud.target.region`*:: -+ --- -Region in which this host, resource, or service is located. - -type: keyword - -example: us-east-1 - --- - -*`cloud.target.service.name`*:: -+ --- -The cloud service name is intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server. -Examples: app engine, app service, cloud run, fargate, lambda. - -type: keyword - -example: lambda - --- - -[float] -=== code_signature - -These fields contain information about binary code signatures. - - -*`code_signature.digest_algorithm`*:: -+ --- -The hashing algorithm used to sign the process. -This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm. - -type: keyword - -example: sha256 - --- - -*`code_signature.exists`*:: -+ --- -Boolean to capture if a signature is present. - -type: boolean - -example: true - --- - -*`code_signature.signing_id`*:: -+ --- -The identifier used to sign the process. -This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only. - -type: keyword - -example: com.apple.xpc.proxy - --- - -*`code_signature.status`*:: -+ --- -Additional information about the certificate status. -This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked. - -type: keyword - -example: ERROR_UNTRUSTED_ROOT - --- - -*`code_signature.subject_name`*:: -+ --- -Subject name of the code signer - -type: keyword - -example: Microsoft Corporation - --- - -*`code_signature.team_id`*:: -+ --- -The team identifier used to sign the process. -This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only. - -type: keyword - -example: EQHXZ8M8AV - --- - -*`code_signature.timestamp`*:: -+ --- -Date and time when the code signature was generated and signed. - -type: date - -example: 2021-01-01T12:10:30Z - --- - -*`code_signature.trusted`*:: -+ --- -Stores the trust status of the certificate chain. -Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status. - -type: boolean - -example: true - --- - -*`code_signature.valid`*:: -+ --- -Boolean to capture if the digital signature is verified against the binary content. -Leave unpopulated if a certificate was unchecked. - -type: boolean - -example: true - --- - -[float] -=== container - -Container fields are used for meta information about the specific container that is the source of information. -These fields help correlate data based containers from any runtime. - - -*`container.id`*:: -+ --- -Unique container id. - -type: keyword - --- - -*`container.image.name`*:: -+ --- -Name of the image the container was built on. - -type: keyword - --- - -*`container.image.tag`*:: -+ --- -Container image tags. - -type: keyword - --- - -*`container.labels`*:: -+ --- -Image labels. - -type: object - --- - -*`container.name`*:: -+ --- -Container name. - -type: keyword - --- - -*`container.runtime`*:: -+ --- -Runtime managing this container. - -type: keyword - -example: docker - --- - -[float] -=== data_stream - -The data_stream fields take part in defining the new data stream naming scheme. -In the new data stream naming scheme the value of the data stream fields combine to the name of the actual data stream in the following manner: `{data_stream.type}-{data_stream.dataset}-{data_stream.namespace}`. This means the fields can only contain characters that are valid as part of names of data streams. More details about this can be found in this https://www.elastic.co/blog/an-introduction-to-the-elastic-data-stream-naming-scheme[blog post]. -An Elasticsearch data stream consists of one or more backing indices, and a data stream name forms part of the backing indices names. Due to this convention, data streams must also follow index naming restrictions. For example, data stream names cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#`. Please see the Elasticsearch reference for additional https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params[restrictions]. - - -*`data_stream.dataset`*:: -+ --- -The field can contain anything that makes sense to signify the source of the data. -Examples include `nginx.access`, `prometheus`, `endpoint` etc. For data streams that otherwise fit, but that do not have dataset set we use the value "generic" for the dataset value. `event.dataset` should have the same value as `data_stream.dataset`. -Beyond the Elasticsearch data stream naming criteria noted above, the `dataset` value has additional restrictions: - * Must not contain `-` - * No longer than 100 characters - -type: constant_keyword - -example: nginx.access - --- - -*`data_stream.namespace`*:: -+ --- -A user defined namespace. Namespaces are useful to allow grouping of data. -Many users already organize their indices this way, and the data stream naming scheme now provides this best practice as a default. Many users will populate this field with `default`. If no value is used, it falls back to `default`. -Beyond the Elasticsearch index naming criteria noted above, `namespace` value has the additional restrictions: - * Must not contain `-` - * No longer than 100 characters - -type: constant_keyword - -example: production - --- - -*`data_stream.type`*:: -+ --- -An overarching type for the data stream. -Currently allowed values are "logs" and "metrics". We expect to also add "traces" and "synthetics" in the near future. - -type: constant_keyword - -example: logs - --- - -[float] -=== destination - -Destination fields capture details about the receiver of a network exchange/packet. These fields are populated from a network event, packet, or other event containing details of a network transaction. -Destination fields are usually populated in conjunction with source fields. The source and destination fields are considered the baseline and should always be filled if an event contains source and destination details from a network transaction. If the event also contains identification of the client and server roles, then the client and server fields should also be populated. - - -*`destination.address`*:: -+ --- -Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. -Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. - -type: keyword - --- - -*`destination.as.number`*:: -+ --- -Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. - -type: long - -example: 15169 - --- - -*`destination.as.organization.name`*:: -+ --- -Organization name. - -type: keyword - -example: Google LLC - --- - -*`destination.as.organization.name.text`*:: -+ --- -type: match_only_text - --- - -*`destination.bytes`*:: -+ --- -Bytes sent from the destination to the source. - -type: long - -example: 184 - -format: bytes - --- - -*`destination.domain`*:: -+ --- -Destination domain. - -type: keyword - --- - -*`destination.geo.city_name`*:: -+ --- -City name. - -type: keyword - -example: Montreal - --- - -*`destination.geo.continent_code`*:: -+ --- -Two-letter code representing continent's name. - -type: keyword - -example: NA - --- - -*`destination.geo.continent_name`*:: -+ --- -Name of the continent. - -type: keyword - -example: North America - --- - -*`destination.geo.country_iso_code`*:: -+ --- -Country ISO code. - -type: keyword - -example: CA - --- - -*`destination.geo.country_name`*:: -+ --- -Country name. - -type: keyword - -example: Canada - --- - -*`destination.geo.location`*:: -+ --- -Longitude and latitude. - -type: geo_point - -example: { "lon": -73.614830, "lat": 45.505918 } - --- - -*`destination.geo.name`*:: -+ --- -User-defined description of a location, at the level of granularity they care about. -Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. -Not typically used in automated geolocation. - -type: keyword - -example: boston-dc - --- - -*`destination.geo.postal_code`*:: -+ --- -Postal code associated with the location. -Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. - -type: keyword - -example: 94040 - --- - -*`destination.geo.region_iso_code`*:: -+ --- -Region ISO code. - -type: keyword - -example: CA-QC - --- - -*`destination.geo.region_name`*:: -+ --- -Region name. - -type: keyword - -example: Quebec - --- - -*`destination.geo.timezone`*:: -+ --- -The time zone of the location, such as IANA time zone name. - -type: keyword - -example: America/Argentina/Buenos_Aires - --- - -*`destination.ip`*:: -+ --- -IP address of the destination (IPv4 or IPv6). - -type: ip - --- - -*`destination.mac`*:: -+ --- -MAC address of the destination. -The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen. - -type: keyword - -example: 00-00-5E-00-53-23 - --- - -*`destination.nat.ip`*:: -+ --- -Translated ip of destination based NAT sessions (e.g. internet to private DMZ) -Typically used with load balancers, firewalls, or routers. - -type: ip - --- - -*`destination.nat.port`*:: -+ --- -Port the source session is translated to by NAT Device. -Typically used with load balancers, firewalls, or routers. - -type: long - -format: string - --- - -*`destination.packets`*:: -+ --- -Packets sent from the destination to the source. - -type: long - -example: 12 - --- - -*`destination.port`*:: -+ --- -Port of the destination. - -type: long - -format: string - --- - -*`destination.registered_domain`*:: -+ --- -The highest registered destination domain, stripped of the subdomain. -For example, the registered domain for "foo.example.com" is "example.com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk". - -type: keyword - -example: example.com - --- - -*`destination.subdomain`*:: -+ --- -The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain. -For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period. - -type: keyword - -example: east - --- - -*`destination.top_level_domain`*:: -+ --- -The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk". - -type: keyword - -example: co.uk - --- - -*`destination.user.domain`*:: -+ --- -Name of the directory the user is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`destination.user.email`*:: -+ --- -User email address. - -type: keyword - --- - -*`destination.user.full_name`*:: -+ --- -User's full name, if available. - -type: keyword - -example: Albert Einstein - --- - -*`destination.user.full_name.text`*:: -+ --- -type: match_only_text - --- - -*`destination.user.group.domain`*:: -+ --- -Name of the directory the group is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`destination.user.group.id`*:: -+ --- -Unique identifier for the group on the system/platform. - -type: keyword - --- - -*`destination.user.group.name`*:: -+ --- -Name of the group. - -type: keyword - --- - -*`destination.user.hash`*:: -+ --- -Unique user hash to correlate information for a user in anonymized form. -Useful if `user.id` or `user.name` contain confidential information and cannot be used. - -type: keyword - --- - -*`destination.user.id`*:: -+ --- -Unique identifier of the user. - -type: keyword - -example: S-1-5-21-202424912787-2692429404-2351956786-1000 - --- - -*`destination.user.name`*:: -+ --- -Short name or login of the user. - -type: keyword - -example: a.einstein - --- - -*`destination.user.name.text`*:: -+ --- -type: match_only_text - --- - -*`destination.user.roles`*:: -+ --- -Array of user roles at the time of the event. - -type: keyword - -example: ["kibana_admin", "reporting_user"] - --- - -[float] -=== dll - -These fields contain information about code libraries dynamically loaded into processes. - -Many operating systems refer to "shared code libraries" with different names, but this field set refers to all of the following: -* Dynamic-link library (`.dll`) commonly used on Windows -* Shared Object (`.so`) commonly used on Unix-like operating systems -* Dynamic library (`.dylib`) commonly used on macOS - - -*`dll.code_signature.digest_algorithm`*:: -+ --- -The hashing algorithm used to sign the process. -This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm. - -type: keyword - -example: sha256 - --- - -*`dll.code_signature.exists`*:: -+ --- -Boolean to capture if a signature is present. - -type: boolean - -example: true - --- - -*`dll.code_signature.signing_id`*:: -+ --- -The identifier used to sign the process. -This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only. - -type: keyword - -example: com.apple.xpc.proxy - --- - -*`dll.code_signature.status`*:: -+ --- -Additional information about the certificate status. -This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked. - -type: keyword - -example: ERROR_UNTRUSTED_ROOT - --- - -*`dll.code_signature.subject_name`*:: -+ --- -Subject name of the code signer - -type: keyword - -example: Microsoft Corporation - --- - -*`dll.code_signature.team_id`*:: -+ --- -The team identifier used to sign the process. -This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only. - -type: keyword - -example: EQHXZ8M8AV - --- - -*`dll.code_signature.timestamp`*:: -+ --- -Date and time when the code signature was generated and signed. - -type: date - -example: 2021-01-01T12:10:30Z - --- - -*`dll.code_signature.trusted`*:: -+ --- -Stores the trust status of the certificate chain. -Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status. - -type: boolean - -example: true - --- - -*`dll.code_signature.valid`*:: -+ --- -Boolean to capture if the digital signature is verified against the binary content. -Leave unpopulated if a certificate was unchecked. - -type: boolean - -example: true - --- - -*`dll.hash.md5`*:: -+ --- -MD5 hash. - -type: keyword - --- - -*`dll.hash.sha1`*:: -+ --- -SHA1 hash. - -type: keyword - --- - -*`dll.hash.sha256`*:: -+ --- -SHA256 hash. - -type: keyword - --- - -*`dll.hash.sha512`*:: -+ --- -SHA512 hash. - -type: keyword - --- - -*`dll.hash.ssdeep`*:: -+ --- -SSDEEP hash. - -type: keyword - --- - -*`dll.name`*:: -+ --- -Name of the library. -This generally maps to the name of the file on disk. - -type: keyword - -example: kernel32.dll - --- - -*`dll.path`*:: -+ --- -Full file path of the library. - -type: keyword - -example: C:\Windows\System32\kernel32.dll - --- - -*`dll.pe.architecture`*:: -+ --- -CPU architecture target for the file. - -type: keyword - -example: x64 - --- - -*`dll.pe.company`*:: -+ --- -Internal company name of the file, provided at compile-time. - -type: keyword - -example: Microsoft Corporation - --- - -*`dll.pe.description`*:: -+ --- -Internal description of the file, provided at compile-time. - -type: keyword - -example: Paint - --- - -*`dll.pe.file_version`*:: -+ --- -Internal version of the file, provided at compile-time. - -type: keyword - -example: 6.3.9600.17415 - --- - -*`dll.pe.imphash`*:: -+ --- -A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values. -Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html. - -type: keyword - -example: 0c6803c4e922103c4dca5963aad36ddf - --- - -*`dll.pe.original_file_name`*:: -+ --- -Internal name of the file, provided at compile-time. - -type: keyword - -example: MSPAINT.EXE - --- - -*`dll.pe.product`*:: -+ --- -Internal product name of the file, provided at compile-time. - -type: keyword - -example: Microsoft® Windows® Operating System - --- - -[float] -=== dns - -Fields describing DNS queries and answers. -DNS events should either represent a single DNS query prior to getting answers (`dns.type:query`) or they should represent a full exchange and contain the query details as well as all of the answers that were provided for this query (`dns.type:answer`). - - -*`dns.answers`*:: -+ --- -An array containing an object for each answer section returned by the server. -The main keys that should be present in these objects are defined by ECS. Records that have more information may contain more keys than what ECS defines. -Not all DNS data sources give all details about DNS answers. At minimum, answer objects must contain the `data` key. If more information is available, map as much of it to ECS as possible, and add any additional fields to the answer objects as custom fields. - -type: object - --- - -*`dns.answers.class`*:: -+ --- -The class of DNS data contained in this resource record. - -type: keyword - -example: IN - --- - -*`dns.answers.data`*:: -+ --- -The data describing the resource. -The meaning of this data depends on the type and class of the resource record. - -type: keyword - -example: 10.10.10.10 - --- - -*`dns.answers.name`*:: -+ --- -The domain name to which this resource record pertains. -If a chain of CNAME is being resolved, each answer's `name` should be the one that corresponds with the answer's `data`. It should not simply be the original `question.name` repeated. - -type: keyword - -example: www.example.com - --- - -*`dns.answers.ttl`*:: -+ --- -The time interval in seconds that this resource record may be cached before it should be discarded. Zero values mean that the data should not be cached. - -type: long - -example: 180 - --- - -*`dns.answers.type`*:: -+ --- -The type of data contained in this resource record. - -type: keyword - -example: CNAME - --- - -*`dns.header_flags`*:: -+ --- -Array of 2 letter DNS header flags. -Expected values are: AA, TC, RD, RA, AD, CD, DO. - -type: keyword - -example: ["RD", "RA"] - --- - -*`dns.id`*:: -+ --- -The DNS packet identifier assigned by the program that generated the query. The identifier is copied to the response. - -type: keyword - -example: 62111 - --- - -*`dns.op_code`*:: -+ --- -The DNS operation code that specifies the kind of query in the message. This value is set by the originator of a query and copied into the response. - -type: keyword - -example: QUERY - --- - -*`dns.question.class`*:: -+ --- -The class of records being queried. - -type: keyword - -example: IN - --- - -*`dns.question.name`*:: -+ --- -The name being queried. -If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n respectively. - -type: keyword - -example: www.example.com - --- - -*`dns.question.registered_domain`*:: -+ --- -The highest registered domain, stripped of the subdomain. -For example, the registered domain for "foo.example.com" is "example.com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk". - -type: keyword - -example: example.com - --- - -*`dns.question.subdomain`*:: -+ --- -The subdomain is all of the labels under the registered_domain. -If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period. - -type: keyword - -example: www - --- - -*`dns.question.top_level_domain`*:: -+ --- -The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk". - -type: keyword - -example: co.uk - --- - -*`dns.question.type`*:: -+ --- -The type of record being queried. - -type: keyword - -example: AAAA - --- - -*`dns.resolved_ip`*:: -+ --- -Array containing all IPs seen in `answers.data`. -The `answers` array can be difficult to use, because of the variety of data formats it can contain. Extracting all IP addresses seen in there to `dns.resolved_ip` makes it possible to index them as IP addresses, and makes them easier to visualize and query for. - -type: ip - -example: ["10.10.10.10", "10.10.10.11"] - --- - -*`dns.response_code`*:: -+ --- -The DNS response code. - -type: keyword - -example: NOERROR - --- - -*`dns.type`*:: -+ --- -The type of DNS event captured, query or answer. -If your source of DNS events only gives you DNS queries, you should only create dns events of type `dns.type:query`. -If your source of DNS events gives you answers as well, you should create one event per query (optionally as soon as the query is seen). And a second event containing all query details as well as an array of answers. - -type: keyword - -example: answer - --- - -[float] -=== ecs - -Meta-information specific to ECS. - - -*`ecs.version`*:: -+ --- -ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. -When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. - -type: keyword - -example: 1.0.0 - -required: True - --- - -[float] -=== elf - -These fields contain Linux Executable Linkable Format (ELF) metadata. - - -*`elf.architecture`*:: -+ --- -Machine architecture of the ELF file. - -type: keyword - -example: x86-64 - --- - -*`elf.byte_order`*:: -+ --- -Byte sequence of ELF file. - -type: keyword - -example: Little Endian - --- - -*`elf.cpu_type`*:: -+ --- -CPU type of the ELF file. - -type: keyword - -example: Intel - --- - -*`elf.creation_date`*:: -+ --- -Extracted when possible from the file's metadata. Indicates when it was built or compiled. It can also be faked by malware creators. - -type: date - --- - -*`elf.exports`*:: -+ --- -List of exported element names and types. - -type: flattened - --- - -*`elf.header.abi_version`*:: -+ --- -Version of the ELF Application Binary Interface (ABI). - -type: keyword - --- - -*`elf.header.class`*:: -+ --- -Header class of the ELF file. - -type: keyword - --- - -*`elf.header.data`*:: -+ --- -Data table of the ELF header. - -type: keyword - --- - -*`elf.header.entrypoint`*:: -+ --- -Header entrypoint of the ELF file. - -type: long - -format: string - --- - -*`elf.header.object_version`*:: -+ --- -"0x1" for original ELF files. - -type: keyword - --- - -*`elf.header.os_abi`*:: -+ --- -Application Binary Interface (ABI) of the Linux OS. - -type: keyword - --- - -*`elf.header.type`*:: -+ --- -Header type of the ELF file. - -type: keyword - --- - -*`elf.header.version`*:: -+ --- -Version of the ELF header. - -type: keyword - --- - -*`elf.imports`*:: -+ --- -List of imported element names and types. - -type: flattened - --- - -*`elf.sections`*:: -+ --- -An array containing an object for each section of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.sections.*`. - -type: nested - --- - -*`elf.sections.chi2`*:: -+ --- -Chi-square probability distribution of the section. - -type: long - -format: number - --- - -*`elf.sections.entropy`*:: -+ --- -Shannon entropy calculation from the section. - -type: long - -format: number - --- - -*`elf.sections.flags`*:: -+ --- -ELF Section List flags. - -type: keyword - --- - -*`elf.sections.name`*:: -+ --- -ELF Section List name. - -type: keyword - --- - -*`elf.sections.physical_offset`*:: -+ --- -ELF Section List offset. - -type: keyword - --- - -*`elf.sections.physical_size`*:: -+ --- -ELF Section List physical size. - -type: long - -format: bytes - --- - -*`elf.sections.type`*:: -+ --- -ELF Section List type. - -type: keyword - --- - -*`elf.sections.virtual_address`*:: -+ --- -ELF Section List virtual address. - -type: long - -format: string - --- - -*`elf.sections.virtual_size`*:: -+ --- -ELF Section List virtual size. - -type: long - -format: string - --- - -*`elf.segments`*:: -+ --- -An array containing an object for each segment of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.segments.*`. - -type: nested - --- - -*`elf.segments.sections`*:: -+ --- -ELF object segment sections. - -type: keyword - --- - -*`elf.segments.type`*:: -+ --- -ELF object segment type. - -type: keyword - --- - -*`elf.shared_libraries`*:: -+ --- -List of shared libraries used by this ELF object. - -type: keyword - --- - -*`elf.telfhash`*:: -+ --- -telfhash symbol hash for ELF file. - -type: keyword - --- - -[float] -=== error - -These fields can represent errors of any kind. -Use them for errors that happen while fetching events or in cases where the event itself contains an error. - - -*`error.code`*:: -+ --- -Error code describing the error. - -type: keyword - --- - -*`error.id`*:: -+ --- -Unique identifier for the error. - -type: keyword - --- - -*`error.message`*:: -+ --- -Error message. - -type: match_only_text - --- - -*`error.stack_trace`*:: -+ --- -The stack trace of this error in plain text. - -type: wildcard - --- - -*`error.stack_trace.text`*:: -+ --- -type: match_only_text - --- - -*`error.type`*:: -+ --- -The type of the error, for example the class name of the exception. - -type: keyword - -example: java.lang.NullPointerException - --- - -[float] -=== event - -The event fields are used for context information about the log or metric event itself. -A log is defined as an event containing details of something that happened. Log events must include the time at which the thing happened. Examples of log events include a process starting on a host, a network packet being sent from a source to a destination, or a network connection between a client and a server being initiated or closed. A metric is defined as an event containing one or more numerical measurements and the time at which the measurement was taken. Examples of metric events include memory pressure measured on a host and device temperature. See the `event.kind` definition in this section for additional details about metric and state events. - - -*`event.action`*:: -+ --- -The action captured by the event. -This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. - -type: keyword - -example: user-password-change - --- - -*`event.agent_id_status`*:: -+ --- -Agents are normally responsible for populating the `agent.id` field value. If the system receiving events is capable of validating the value based on authentication information for the client then this field can be used to reflect the outcome of that validation. -For example if the agent's connection is authenticated with mTLS and the client cert contains the ID of the agent to which the cert was issued then the `agent.id` value in events can be checked against the certificate. If the values match then `event.agent_id_status: verified` is added to the event, otherwise one of the other allowed values should be used. -If no validation is performed then the field should be omitted. -The allowed values are: -`verified` - The `agent.id` field value matches expected value obtained from auth metadata. -`mismatch` - The `agent.id` field value does not match the expected value obtained from auth metadata. -`missing` - There was no `agent.id` field in the event to validate. -`auth_metadata_missing` - There was no auth metadata or it was missing information about the agent ID. - -type: keyword - -example: verified - --- - -*`event.category`*:: -+ --- -This is one of four ECS Categorization Fields, and indicates the second level in the ECS category hierarchy. -`event.category` represents the "big buckets" of ECS categories. For example, filtering on `event.category:process` yields all events relating to process activity. This field is closely related to `event.type`, which is used as a subcategory. -This field is an array. This will allow proper categorization of some events that fall in multiple categories. - -type: keyword - -example: authentication - --- - -*`event.code`*:: -+ --- -Identification code for this event, if one exists. -Some event sources use event codes to identify messages unambiguously, regardless of message language or wording adjustments over time. An example of this is the Windows Event ID. - -type: keyword - -example: 4648 - --- - -*`event.created`*:: -+ --- -event.created contains the date/time when the event was first read by an agent, or by your pipeline. -This field is distinct from @timestamp in that @timestamp typically contain the time extracted from the original event. -In most situations, these two timestamps will be slightly different. The difference can be used to calculate the delay between your source generating an event, and the time when your agent first processed it. This can be used to monitor your agent's or pipeline's ability to keep up with your event source. -In case the two timestamps are identical, @timestamp should be used. - -type: date - -example: 2016-05-23T08:05:34.857Z - --- - -*`event.dataset`*:: -+ --- -Name of the dataset. -If an event source publishes more than one type of log or events (e.g. access log, error log), the dataset is used to specify which one the event comes from. -It's recommended but not required to start the dataset name with the module name, followed by a dot, then the dataset name. - -type: keyword - -example: apache.access - --- - -*`event.duration`*:: -+ --- -Duration of the event in nanoseconds. -If event.start and event.end are known this value should be the difference between the end and start time. - -type: long - -format: duration - --- - -*`event.end`*:: -+ --- -event.end contains the date when the event ended or when the activity was last observed. - -type: date - --- - -*`event.hash`*:: -+ --- -Hash (perhaps logstash fingerprint) of raw field to be able to demonstrate log integrity. - -type: keyword - -example: 123456789012345678901234567890ABCD - --- - -*`event.id`*:: -+ --- -Unique ID to describe the event. - -type: keyword - -example: 8a4f500d - --- - -*`event.ingested`*:: -+ --- -Timestamp when an event arrived in the central data store. -This is different from `@timestamp`, which is when the event originally occurred. It's also different from `event.created`, which is meant to capture the first time an agent saw the event. -In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` < `event.created` < `event.ingested`. - -type: date - -example: 2016-05-23T08:05:35.101Z - --- - -*`event.kind`*:: -+ --- -This is one of four ECS Categorization Fields, and indicates the highest level in the ECS category hierarchy. -`event.kind` gives high-level information about what type of information the event contains, without being specific to the contents of the event. For example, values of this field distinguish alert events from metric events. -The value of this field can be used to inform how these kinds of events should be handled. They may warrant different retention, different access control, it may also help understand whether the data coming in at a regular interval or not. - -type: keyword - -example: alert - --- - -*`event.module`*:: -+ --- -Name of the module this data is coming from. -If your monitoring agent supports the concept of modules or plugins to process events of a given source (e.g. Apache logs), `event.module` should contain the name of this module. - -type: keyword - -example: apache - --- - -*`event.original`*:: -+ --- -Raw text message of entire event. Used to demonstrate log integrity or where the full log message (before splitting it up in multiple parts) may be required, e.g. for reindex. -This field is not indexed and doc_values are disabled. It cannot be searched, but it can be retrieved from `_source`. If users wish to override this and index this field, please see `Field data types` in the `Elasticsearch Reference`. - -type: keyword - -example: Sep 19 08:26:10 host CEF:0|Security| threatmanager|1.0|100| worm successfully stopped|10|src=10.0.0.1 dst=2.1.2.2spt=1232 - -Field is not indexed. - --- - -*`event.outcome`*:: -+ --- -This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy. -`event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event. -Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective. -Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer. -Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense. - -type: keyword - -example: success - --- - -*`event.provider`*:: -+ --- -Source of the event. -Event transports such as Syslog or the Windows Event Log typically mention the source of an event. It can be the name of the software that generated the event (e.g. Sysmon, httpd), or of a subsystem of the operating system (kernel, Microsoft-Windows-Security-Auditing). - -type: keyword - -example: kernel - --- - -*`event.reason`*:: -+ --- -Reason why this event happened, according to the source. -This describes the why of a particular action or outcome captured in the event. Where `event.action` captures the action from the event, `event.reason` describes why that action was taken. For example, a web proxy with an `event.action` which denied the request may also populate `event.reason` with the reason why (e.g. `blocked site`). - -type: keyword - -example: Terminated an unexpected process - --- - -*`event.reference`*:: -+ --- -Reference URL linking to additional information about this event. -This URL links to a static definition of this event. Alert events, indicated by `event.kind:alert`, are a common use case for this field. - -type: keyword - -example: https://system.example.com/event/#0001234 - --- - -*`event.risk_score`*:: -+ --- -Risk score or priority of the event (e.g. security solutions). Use your system's original value here. - -type: float - --- - -*`event.risk_score_norm`*:: -+ --- -Normalized risk score or priority of the event, on a scale of 0 to 100. -This is mainly useful if you use more than one system that assigns risk scores, and you want to see a normalized value across all systems. - -type: float - --- - -*`event.sequence`*:: -+ --- -Sequence number of the event. -The sequence number is a value published by some event sources, to make the exact ordering of events unambiguous, regardless of the timestamp precision. - -type: long - -format: string - --- - -*`event.severity`*:: -+ --- -The numeric severity of the event according to your event source. -What the different severity values mean can be different between sources and use cases. It's up to the implementer to make sure severities are consistent across events from the same source. -The Syslog severity belongs in `log.syslog.severity.code`. `event.severity` is meant to represent the severity according to the event source (e.g. firewall, IDS). If the event source does not publish its own severity, you may optionally copy the `log.syslog.severity.code` to `event.severity`. - -type: long - -example: 7 - -format: string - --- - -*`event.start`*:: -+ --- -event.start contains the date when the event started or when the activity was first observed. - -type: date - --- - -*`event.timezone`*:: -+ --- -This field should be populated when the event's timestamp does not include timezone information already (e.g. default Syslog timestamps). It's optional otherwise. -Acceptable timezone formats are: a canonical ID (e.g. "Europe/Amsterdam"), abbreviated (e.g. "EST") or an HH:mm differential (e.g. "-05:00"). - -type: keyword - --- - -*`event.type`*:: -+ --- -This is one of four ECS Categorization Fields, and indicates the third level in the ECS category hierarchy. -`event.type` represents a categorization "sub-bucket" that, when used along with the `event.category` field values, enables filtering events down to a level appropriate for single visualization. -This field is an array. This will allow proper categorization of some events that fall in multiple event types. - -type: keyword - --- - -*`event.url`*:: -+ --- -URL linking to an external system to continue investigation of this event. -This URL links to another system where in-depth investigation of the specific occurrence of this event can take place. Alert events, indicated by `event.kind:alert`, are a common use case for this field. - -type: keyword - -example: https://mysystem.example.com/alert/5271dedb-f5b0-4218-87f0-4ac4870a38fe - --- - -[float] -=== faas - -The user fields describe information about the function as a service that is relevant to the event. - - -*`faas.coldstart`*:: -+ --- -Boolean value indicating a cold start of a function. - -type: boolean - --- - -*`faas.execution`*:: -+ --- -The execution ID of the current function execution. - -type: keyword - -example: af9d5aa4-a685-4c5f-a22b-444f80b3cc28 - --- - -*`faas.trigger`*:: -+ --- -Details about the function trigger. - -type: nested - --- - -*`faas.trigger.request_id`*:: -+ --- -The ID of the trigger request , message, event, etc. - -type: keyword - -example: 123456789 - --- - -*`faas.trigger.type`*:: -+ --- -The trigger for the function execution. -Expected values are: - * http - * pubsub - * datasource - * timer - * other - -type: keyword - -example: http - --- - -[float] -=== file - -A file is defined as a set of information that has been created on, or has existed on a filesystem. -File objects can be associated with host events, network events, and/or file events (e.g., those produced by File Integrity Monitoring [FIM] products or services). File fields provide details about the affected file associated with the event or metric. - - -*`file.accessed`*:: -+ --- -Last time the file was accessed. -Note that not all filesystems keep track of access time. - -type: date - --- - -*`file.attributes`*:: -+ --- -Array of file attributes. -Attributes names will vary by platform. Here's a non-exhaustive list of values that are expected in this field: archive, compressed, directory, encrypted, execute, hidden, read, readonly, system, write. - -type: keyword - -example: ["readonly", "system"] - --- - -*`file.code_signature.digest_algorithm`*:: -+ --- -The hashing algorithm used to sign the process. -This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm. - -type: keyword - -example: sha256 - --- - -*`file.code_signature.exists`*:: -+ --- -Boolean to capture if a signature is present. - -type: boolean - -example: true - --- - -*`file.code_signature.signing_id`*:: -+ --- -The identifier used to sign the process. -This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only. - -type: keyword - -example: com.apple.xpc.proxy - --- - -*`file.code_signature.status`*:: -+ --- -Additional information about the certificate status. -This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked. - -type: keyword - -example: ERROR_UNTRUSTED_ROOT - --- - -*`file.code_signature.subject_name`*:: -+ --- -Subject name of the code signer - -type: keyword - -example: Microsoft Corporation - --- - -*`file.code_signature.team_id`*:: -+ --- -The team identifier used to sign the process. -This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only. - -type: keyword - -example: EQHXZ8M8AV - --- - -*`file.code_signature.timestamp`*:: -+ --- -Date and time when the code signature was generated and signed. - -type: date - -example: 2021-01-01T12:10:30Z - --- - -*`file.code_signature.trusted`*:: -+ --- -Stores the trust status of the certificate chain. -Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status. - -type: boolean - -example: true - --- - -*`file.code_signature.valid`*:: -+ --- -Boolean to capture if the digital signature is verified against the binary content. -Leave unpopulated if a certificate was unchecked. - -type: boolean - -example: true - --- - -*`file.created`*:: -+ --- -File creation time. -Note that not all filesystems store the creation time. - -type: date - --- - -*`file.ctime`*:: -+ --- -Last time the file attributes or metadata changed. -Note that changes to the file content will update `mtime`. This implies `ctime` will be adjusted at the same time, since `mtime` is an attribute of the file. - -type: date - --- - -*`file.device`*:: -+ --- -Device that is the source of the file. - -type: keyword - -example: sda - --- - -*`file.directory`*:: -+ --- -Directory where the file is located. It should include the drive letter, when appropriate. - -type: keyword - -example: /home/alice - --- - -*`file.drive_letter`*:: -+ --- -Drive letter where the file is located. This field is only relevant on Windows. -The value should be uppercase, and not include the colon. - -type: keyword - -example: C - --- - -*`file.elf.architecture`*:: -+ --- -Machine architecture of the ELF file. - -type: keyword - -example: x86-64 - --- - -*`file.elf.byte_order`*:: -+ --- -Byte sequence of ELF file. - -type: keyword - -example: Little Endian - --- - -*`file.elf.cpu_type`*:: -+ --- -CPU type of the ELF file. - -type: keyword - -example: Intel - --- - -*`file.elf.creation_date`*:: -+ --- -Extracted when possible from the file's metadata. Indicates when it was built or compiled. It can also be faked by malware creators. - -type: date - --- - -*`file.elf.exports`*:: -+ --- -List of exported element names and types. - -type: flattened - --- - -*`file.elf.header.abi_version`*:: -+ --- -Version of the ELF Application Binary Interface (ABI). - -type: keyword - --- - -*`file.elf.header.class`*:: -+ --- -Header class of the ELF file. - -type: keyword - --- - -*`file.elf.header.data`*:: -+ --- -Data table of the ELF header. - -type: keyword - --- - -*`file.elf.header.entrypoint`*:: -+ --- -Header entrypoint of the ELF file. - -type: long - -format: string - --- - -*`file.elf.header.object_version`*:: -+ --- -"0x1" for original ELF files. - -type: keyword - --- - -*`file.elf.header.os_abi`*:: -+ --- -Application Binary Interface (ABI) of the Linux OS. - -type: keyword - --- - -*`file.elf.header.type`*:: -+ --- -Header type of the ELF file. - -type: keyword - --- - -*`file.elf.header.version`*:: -+ --- -Version of the ELF header. - -type: keyword - --- - -*`file.elf.imports`*:: -+ --- -List of imported element names and types. - -type: flattened - --- - -*`file.elf.sections`*:: -+ --- -An array containing an object for each section of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.sections.*`. - -type: nested - --- - -*`file.elf.sections.chi2`*:: -+ --- -Chi-square probability distribution of the section. - -type: long - -format: number - --- - -*`file.elf.sections.entropy`*:: -+ --- -Shannon entropy calculation from the section. - -type: long - -format: number - --- - -*`file.elf.sections.flags`*:: -+ --- -ELF Section List flags. - -type: keyword - --- - -*`file.elf.sections.name`*:: -+ --- -ELF Section List name. - -type: keyword - --- - -*`file.elf.sections.physical_offset`*:: -+ --- -ELF Section List offset. - -type: keyword - --- - -*`file.elf.sections.physical_size`*:: -+ --- -ELF Section List physical size. - -type: long - -format: bytes - --- - -*`file.elf.sections.type`*:: -+ --- -ELF Section List type. - -type: keyword - --- - -*`file.elf.sections.virtual_address`*:: -+ --- -ELF Section List virtual address. - -type: long - -format: string - --- - -*`file.elf.sections.virtual_size`*:: -+ --- -ELF Section List virtual size. - -type: long - -format: string - --- - -*`file.elf.segments`*:: -+ --- -An array containing an object for each segment of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.segments.*`. - -type: nested - --- - -*`file.elf.segments.sections`*:: -+ --- -ELF object segment sections. - -type: keyword - --- - -*`file.elf.segments.type`*:: -+ --- -ELF object segment type. - -type: keyword - --- - -*`file.elf.shared_libraries`*:: -+ --- -List of shared libraries used by this ELF object. - -type: keyword - --- - -*`file.elf.telfhash`*:: -+ --- -telfhash symbol hash for ELF file. - -type: keyword - --- - -*`file.extension`*:: -+ --- -File extension, excluding the leading dot. -Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz"). - -type: keyword - -example: png - --- - -*`file.fork_name`*:: -+ --- -A fork is additional data associated with a filesystem object. -On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at least one fork for the data portion, and additional forks may exist. -On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. An ADS is typically of the form: `C:\path\to\filename.extension:some_fork_name`, and `some_fork_name` is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name. - -type: keyword - -example: Zone.Identifer - --- - -*`file.gid`*:: -+ --- -Primary group ID (GID) of the file. - -type: keyword - -example: 1001 - --- - -*`file.group`*:: -+ --- -Primary group name of the file. - -type: keyword - -example: alice - --- - -*`file.hash.md5`*:: -+ --- -MD5 hash. - -type: keyword - --- - -*`file.hash.sha1`*:: -+ --- -SHA1 hash. - -type: keyword - --- - -*`file.hash.sha256`*:: -+ --- -SHA256 hash. - -type: keyword - --- - -*`file.hash.sha512`*:: -+ --- -SHA512 hash. - -type: keyword - --- - -*`file.hash.ssdeep`*:: -+ --- -SSDEEP hash. - -type: keyword - --- - -*`file.inode`*:: -+ --- -Inode representing the file in the filesystem. - -type: keyword - -example: 256383 - --- - -*`file.mime_type`*:: -+ --- -MIME type should identify the format of the file or stream of bytes using https://www.iana.org/assignments/media-types/media-types.xhtml[IANA official types], where possible. When more than one type is applicable, the most specific type should be used. - -type: keyword - --- - -*`file.mode`*:: -+ --- -Mode of the file in octal representation. - -type: keyword - -example: 0640 - --- - -*`file.mtime`*:: -+ --- -Last time the file content was modified. - -type: date - --- - -*`file.name`*:: -+ --- -Name of the file including the extension, without the directory. - -type: keyword - -example: example.png - --- - -*`file.owner`*:: -+ --- -File owner's username. - -type: keyword - -example: alice - --- - -*`file.path`*:: -+ --- -Full path to the file, including the file name. It should include the drive letter, when appropriate. - -type: keyword - -example: /home/alice/example.png - --- - -*`file.path.text`*:: -+ --- -type: match_only_text - --- - -*`file.pe.architecture`*:: -+ --- -CPU architecture target for the file. - -type: keyword - -example: x64 - --- - -*`file.pe.company`*:: -+ --- -Internal company name of the file, provided at compile-time. - -type: keyword - -example: Microsoft Corporation - --- - -*`file.pe.description`*:: -+ --- -Internal description of the file, provided at compile-time. - -type: keyword - -example: Paint - --- - -*`file.pe.file_version`*:: -+ --- -Internal version of the file, provided at compile-time. - -type: keyword - -example: 6.3.9600.17415 - --- - -*`file.pe.imphash`*:: -+ --- -A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values. -Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html. - -type: keyword - -example: 0c6803c4e922103c4dca5963aad36ddf - --- - -*`file.pe.original_file_name`*:: -+ --- -Internal name of the file, provided at compile-time. - -type: keyword - -example: MSPAINT.EXE - --- - -*`file.pe.product`*:: -+ --- -Internal product name of the file, provided at compile-time. - -type: keyword - -example: Microsoft® Windows® Operating System - --- - -*`file.size`*:: -+ --- -File size in bytes. -Only relevant when `file.type` is "file". - -type: long - -example: 16384 - --- - -*`file.target_path`*:: -+ --- -Target path for symlinks. - -type: keyword - --- - -*`file.target_path.text`*:: -+ --- -type: match_only_text - --- - -*`file.type`*:: -+ --- -File type (file, dir, or symlink). - -type: keyword - -example: file - --- - -*`file.uid`*:: -+ --- -The user ID (UID) or security identifier (SID) of the file owner. - -type: keyword - -example: 1001 - --- - -*`file.x509.alternative_names`*:: -+ --- -List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses. - -type: keyword - -example: *.elastic.co - --- - -*`file.x509.issuer.common_name`*:: -+ --- -List of common name (CN) of issuing certificate authority. - -type: keyword - -example: Example SHA2 High Assurance Server CA - --- - -*`file.x509.issuer.country`*:: -+ --- -List of country (C) codes - -type: keyword - -example: US - --- - -*`file.x509.issuer.distinguished_name`*:: -+ --- -Distinguished name (DN) of issuing certificate authority. - -type: keyword - -example: C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA - --- - -*`file.x509.issuer.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: Mountain View - --- - -*`file.x509.issuer.organization`*:: -+ --- -List of organizations (O) of issuing certificate authority. - -type: keyword - -example: Example Inc - --- - -*`file.x509.issuer.organizational_unit`*:: -+ --- -List of organizational units (OU) of issuing certificate authority. - -type: keyword - -example: www.example.com - --- - -*`file.x509.issuer.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`file.x509.not_after`*:: -+ --- -Time at which the certificate is no longer considered valid. - -type: date - -example: 2020-07-16 03:15:39+00:00 - --- - -*`file.x509.not_before`*:: -+ --- -Time at which the certificate is first considered valid. - -type: date - -example: 2019-08-16 01:40:25+00:00 - --- - -*`file.x509.public_key_algorithm`*:: -+ --- -Algorithm used to generate the public key. - -type: keyword - -example: RSA - --- - -*`file.x509.public_key_curve`*:: -+ --- -The curve used by the elliptic curve public key algorithm. This is algorithm specific. - -type: keyword - -example: nistp521 - --- - -*`file.x509.public_key_exponent`*:: -+ --- -Exponent used to derive the public key. This is algorithm specific. - -type: long - -example: 65537 - -Field is not indexed. - --- - -*`file.x509.public_key_size`*:: -+ --- -The size of the public key space in bits. - -type: long - -example: 2048 - --- - -*`file.x509.serial_number`*:: -+ --- -Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters. - -type: keyword - -example: 55FBB9C7DEBF09809D12CCAA - --- - -*`file.x509.signature_algorithm`*:: -+ --- -Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353. - -type: keyword - -example: SHA256-RSA - --- - -*`file.x509.subject.common_name`*:: -+ --- -List of common names (CN) of subject. - -type: keyword - -example: shared.global.example.net - --- - -*`file.x509.subject.country`*:: -+ --- -List of country (C) code - -type: keyword - -example: US - --- - -*`file.x509.subject.distinguished_name`*:: -+ --- -Distinguished name (DN) of the certificate subject entity. - -type: keyword - -example: C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net - --- - -*`file.x509.subject.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: San Francisco - --- - -*`file.x509.subject.organization`*:: -+ --- -List of organizations (O) of subject. - -type: keyword - -example: Example, Inc. - --- - -*`file.x509.subject.organizational_unit`*:: -+ --- -List of organizational units (OU) of subject. - -type: keyword - --- - -*`file.x509.subject.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`file.x509.version_number`*:: -+ --- -Version of x509 format. - -type: keyword - -example: 3 - --- - -[float] -=== geo - -Geo fields can carry data about a specific location related to an event. -This geolocation information can be derived from techniques such as Geo IP, or be user-supplied. - - -*`geo.city_name`*:: -+ --- -City name. - -type: keyword - -example: Montreal - --- - -*`geo.continent_code`*:: -+ --- -Two-letter code representing continent's name. - -type: keyword - -example: NA - --- - -*`geo.continent_name`*:: -+ --- -Name of the continent. - -type: keyword - -example: North America - --- - -*`geo.country_iso_code`*:: -+ --- -Country ISO code. - -type: keyword - -example: CA - --- - -*`geo.country_name`*:: -+ --- -Country name. - -type: keyword - -example: Canada - --- - -*`geo.location`*:: -+ --- -Longitude and latitude. - -type: geo_point - -example: { "lon": -73.614830, "lat": 45.505918 } - --- - -*`geo.name`*:: -+ --- -User-defined description of a location, at the level of granularity they care about. -Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. -Not typically used in automated geolocation. - -type: keyword - -example: boston-dc - --- - -*`geo.postal_code`*:: -+ --- -Postal code associated with the location. -Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. - -type: keyword - -example: 94040 - --- - -*`geo.region_iso_code`*:: -+ --- -Region ISO code. - -type: keyword - -example: CA-QC - --- - -*`geo.region_name`*:: -+ --- -Region name. - -type: keyword - -example: Quebec - --- - -*`geo.timezone`*:: -+ --- -The time zone of the location, such as IANA time zone name. - -type: keyword - -example: America/Argentina/Buenos_Aires - --- - -[float] -=== group - -The group fields are meant to represent groups that are relevant to the event. - - -*`group.domain`*:: -+ --- -Name of the directory the group is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`group.id`*:: -+ --- -Unique identifier for the group on the system/platform. - -type: keyword - --- - -*`group.name`*:: -+ --- -Name of the group. - -type: keyword - --- - -[float] -=== hash - -The hash fields represent different bitwise hash algorithms and their values. -Field names for common hashes (e.g. MD5, SHA1) are predefined. Add fields for other hashes by lowercasing the hash algorithm name and using underscore separators as appropriate (snake case, e.g. sha3_512). -Note that this fieldset is used for common hashes that may be computed over a range of generic bytes. Entity-specific hashes such as ja3 or imphash are placed in the fieldsets to which they relate (tls and pe, respectively). - - -*`hash.md5`*:: -+ --- -MD5 hash. - -type: keyword - --- - -*`hash.sha1`*:: -+ --- -SHA1 hash. - -type: keyword - --- - -*`hash.sha256`*:: -+ --- -SHA256 hash. - -type: keyword - --- - -*`hash.sha512`*:: -+ --- -SHA512 hash. - -type: keyword - --- - -*`hash.ssdeep`*:: -+ --- -SSDEEP hash. - -type: keyword - --- - -[float] -=== host - -A host is defined as a general computing instance. -ECS host.* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes. - - -*`host.architecture`*:: -+ --- -Operating system architecture. - -type: keyword - -example: x86_64 - --- - -*`host.cpu.usage`*:: -+ --- -Percent CPU used which is normalized by the number of CPU cores and it ranges from 0 to 1. -Scaling factor: 1000. -For example: For a two core host, this value should be the average of the two cores, between 0 and 1. - -type: scaled_float - --- - -*`host.disk.read.bytes`*:: -+ --- -The total number of bytes (gauge) read successfully (aggregated from all disks) since the last metric collection. - -type: long - --- - -*`host.disk.write.bytes`*:: -+ --- -The total number of bytes (gauge) written successfully (aggregated from all disks) since the last metric collection. - -type: long - --- - -*`host.domain`*:: -+ --- -Name of the domain of which the host is a member. -For example, on Windows this could be the host's Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host's LDAP provider. - -type: keyword - -example: CONTOSO - --- - -*`host.geo.city_name`*:: -+ --- -City name. - -type: keyword - -example: Montreal - --- - -*`host.geo.continent_code`*:: -+ --- -Two-letter code representing continent's name. - -type: keyword - -example: NA - --- - -*`host.geo.continent_name`*:: -+ --- -Name of the continent. - -type: keyword - -example: North America - --- - -*`host.geo.country_iso_code`*:: -+ --- -Country ISO code. - -type: keyword - -example: CA - --- - -*`host.geo.country_name`*:: -+ --- -Country name. - -type: keyword - -example: Canada - --- - -*`host.geo.location`*:: -+ --- -Longitude and latitude. - -type: geo_point - -example: { "lon": -73.614830, "lat": 45.505918 } - --- - -*`host.geo.name`*:: -+ --- -User-defined description of a location, at the level of granularity they care about. -Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. -Not typically used in automated geolocation. - -type: keyword - -example: boston-dc - --- - -*`host.geo.postal_code`*:: -+ --- -Postal code associated with the location. -Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. - -type: keyword - -example: 94040 - --- - -*`host.geo.region_iso_code`*:: -+ --- -Region ISO code. - -type: keyword - -example: CA-QC - --- - -*`host.geo.region_name`*:: -+ --- -Region name. - -type: keyword - -example: Quebec - --- - -*`host.geo.timezone`*:: -+ --- -The time zone of the location, such as IANA time zone name. - -type: keyword - -example: America/Argentina/Buenos_Aires - --- - -*`host.hostname`*:: -+ --- -Hostname of the host. -It normally contains what the `hostname` command returns on the host machine. - -type: keyword - --- - -*`host.id`*:: -+ --- -Unique host id. -As hostname is not always unique, use values that are meaningful in your environment. -Example: The current usage of `beat.name`. - -type: keyword - --- - -*`host.ip`*:: -+ --- -Host ip addresses. - -type: ip - --- - -*`host.mac`*:: -+ --- -Host MAC addresses. -The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen. - -type: keyword - -example: ["00-00-5E-00-53-23", "00-00-5E-00-53-24"] - --- - -*`host.name`*:: -+ --- -Name of the host. -It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use. - -type: keyword - --- - -*`host.network.egress.bytes`*:: -+ --- -The number of bytes (gauge) sent out on all network interfaces by the host since the last metric collection. - -type: long - --- - -*`host.network.egress.packets`*:: -+ --- -The number of packets (gauge) sent out on all network interfaces by the host since the last metric collection. - -type: long - --- - -*`host.network.ingress.bytes`*:: -+ --- -The number of bytes received (gauge) on all network interfaces by the host since the last metric collection. - -type: long - --- - -*`host.network.ingress.packets`*:: -+ --- -The number of packets (gauge) received on all network interfaces by the host since the last metric collection. - -type: long - --- - -*`host.os.family`*:: -+ --- -OS family (such as redhat, debian, freebsd, windows). - -type: keyword - -example: debian - --- - -*`host.os.full`*:: -+ --- -Operating system name, including the version or code name. - -type: keyword - -example: Mac OS Mojave - --- - -*`host.os.full.text`*:: -+ --- -type: match_only_text - --- - -*`host.os.kernel`*:: -+ --- -Operating system kernel version as a raw string. - -type: keyword - -example: 4.4.0-112-generic - --- - -*`host.os.name`*:: -+ --- -Operating system name, without the version. - -type: keyword - -example: Mac OS X - --- - -*`host.os.name.text`*:: -+ --- -type: match_only_text - --- - -*`host.os.platform`*:: -+ --- -Operating system platform (such centos, ubuntu, windows). - -type: keyword - -example: darwin - --- - -*`host.os.type`*:: -+ --- -Use the `os.type` field to categorize the operating system into one of the broad commercial families. -One of these following values should be used (lowercase): linux, macos, unix, windows. -If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition. - -type: keyword - -example: macos - --- - -*`host.os.version`*:: -+ --- -Operating system version as a raw string. - -type: keyword - -example: 10.14.1 - --- - -*`host.type`*:: -+ --- -Type of host. -For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment. - -type: keyword - --- - -*`host.uptime`*:: -+ --- -Seconds the host has been up. - -type: long - -example: 1325 - --- - -[float] -=== http - -Fields related to HTTP activity. Use the `url` field set to store the url of the request. - - -*`http.request.body.bytes`*:: -+ --- -Size in bytes of the request body. - -type: long - -example: 887 - -format: bytes - --- - -*`http.request.body.content`*:: -+ --- -The full HTTP request body. - -type: wildcard - -example: Hello world - --- - -*`http.request.body.content.text`*:: -+ --- -type: match_only_text - --- - -*`http.request.bytes`*:: -+ --- -Total size in bytes of the request (body and headers). - -type: long - -example: 1437 - -format: bytes - --- - -*`http.request.id`*:: -+ --- -A unique identifier for each HTTP request to correlate logs between clients and servers in transactions. -The id may be contained in a non-standard HTTP header, such as `X-Request-ID` or `X-Correlation-ID`. - -type: keyword - -example: 123e4567-e89b-12d3-a456-426614174000 - --- - -*`http.request.method`*:: -+ --- -HTTP request method. -The value should retain its casing from the original event. For example, `GET`, `get`, and `GeT` are all considered valid values for this field. - -type: keyword - -example: POST - --- - -*`http.request.mime_type`*:: -+ --- -Mime type of the body of the request. -This value must only be populated based on the content of the request body, not on the `Content-Type` header. Comparing the mime type of a request with the request's Content-Type header can be helpful in detecting threats or misconfigured clients. - -type: keyword - -example: image/gif - --- - -*`http.request.referrer`*:: -+ --- -Referrer for this HTTP request. - -type: keyword - -example: https://blog.example.com/ - --- - -*`http.response.body.bytes`*:: -+ --- -Size in bytes of the response body. - -type: long - -example: 887 - -format: bytes - --- - -*`http.response.body.content`*:: -+ --- -The full HTTP response body. - -type: wildcard - -example: Hello world - --- - -*`http.response.body.content.text`*:: -+ --- -type: match_only_text - --- - -*`http.response.bytes`*:: -+ --- -Total size in bytes of the response (body and headers). - -type: long - -example: 1437 - -format: bytes - --- - -*`http.response.mime_type`*:: -+ --- -Mime type of the body of the response. -This value must only be populated based on the content of the response body, not on the `Content-Type` header. Comparing the mime type of a response with the response's Content-Type header can be helpful in detecting misconfigured servers. - -type: keyword - -example: image/gif - --- - -*`http.response.status_code`*:: -+ --- -HTTP response status code. - -type: long - -example: 404 - -format: string - --- - -*`http.version`*:: -+ --- -HTTP version. - -type: keyword - -example: 1.1 - --- - -[float] -=== interface - -The interface fields are used to record ingress and egress interface information when reported by an observer (e.g. firewall, router, load balancer) in the context of the observer handling a network connection. In the case of a single observer interface (e.g. network sensor on a span port) only the observer.ingress information should be populated. - - -*`interface.alias`*:: -+ --- -Interface alias as reported by the system, typically used in firewall implementations for e.g. inside, outside, or dmz logical interface naming. - -type: keyword - -example: outside - --- - -*`interface.id`*:: -+ --- -Interface ID as reported by an observer (typically SNMP interface ID). - -type: keyword - -example: 10 - --- - -*`interface.name`*:: -+ --- -Interface name as reported by the system. - -type: keyword - -example: eth0 - --- - -[float] -=== log - -Details about the event's logging mechanism or logging transport. -The log.* fields are typically populated with details about the logging mechanism used to create and/or transport the event. For example, syslog details belong under `log.syslog.*`. -The details specific to your event source are typically not logged under `log.*`, but rather in `event.*` or in other ECS fields. - - -*`log.file.path`*:: -+ --- -Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate. -If the event wasn't read from a log file, do not populate this field. - -type: keyword - -example: /var/log/fun-times.log - --- - -*`log.level`*:: -+ --- -Original log level of the log event. -If the source of the event provides a log level or textual severity, this is the one that goes in `log.level`. If your source doesn't specify one, you may put your event transport's severity here (e.g. Syslog severity). -Some examples are `warn`, `err`, `i`, `informational`. - -type: keyword - -example: error - --- - -*`log.logger`*:: -+ --- -The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name. - -type: keyword - -example: org.elasticsearch.bootstrap.Bootstrap - --- - -*`log.origin.file.line`*:: -+ --- -The line number of the file containing the source code which originated the log event. - -type: long - -example: 42 - --- - -*`log.origin.file.name`*:: -+ --- -The name of the file containing the source code which originated the log event. -Note that this field is not meant to capture the log file. The correct field to capture the log file is `log.file.path`. - -type: keyword - -example: Bootstrap.java - --- - -*`log.origin.function`*:: -+ --- -The name of the function or method which originated the log event. - -type: keyword - -example: init - --- - -*`log.syslog`*:: -+ --- -The Syslog metadata of the event, if the event was transmitted via Syslog. Please see RFCs 5424 or 3164. - -type: object - --- - -*`log.syslog.facility.code`*:: -+ --- -The Syslog numeric facility of the log event, if available. -According to RFCs 5424 and 3164, this value should be an integer between 0 and 23. - -type: long - -example: 23 - -format: string - --- - -*`log.syslog.facility.name`*:: -+ --- -The Syslog text-based facility of the log event, if available. - -type: keyword - -example: local7 - --- - -*`log.syslog.priority`*:: -+ --- -Syslog numeric priority of the event, if available. -According to RFCs 5424 and 3164, the priority is 8 * facility + severity. This number is therefore expected to contain a value between 0 and 191. - -type: long - -example: 135 - -format: string - --- - -*`log.syslog.severity.code`*:: -+ --- -The Syslog numeric severity of the log event, if available. -If the event source publishing via Syslog provides a different numeric severity value (e.g. firewall, IDS), your source's numeric severity should go to `event.severity`. If the event source does not specify a distinct severity, you can optionally copy the Syslog severity to `event.severity`. - -type: long - -example: 3 - --- - -*`log.syslog.severity.name`*:: -+ --- -The Syslog numeric severity of the log event, if available. -If the event source publishing via Syslog provides a different severity value (e.g. firewall, IDS), your source's text severity should go to `log.level`. If the event source does not specify a distinct severity, you can optionally copy the Syslog severity to `log.level`. - -type: keyword - -example: Error - --- - -[float] -=== network - -The network is defined as the communication path over which a host or network event happens. -The network.* fields should be populated with details about the network activity associated with an event. - - -*`network.application`*:: -+ --- -When a specific application or service is identified from network connection details (source/dest IPs, ports, certificates, or wire format), this field captures the application's or service's name. -For example, the original event identifies the network connection being from a specific web service in a `https` network connection, like `facebook` or `twitter`. -The field value must be normalized to lowercase for querying. - -type: keyword - -example: aim - --- - -*`network.bytes`*:: -+ --- -Total bytes transferred in both directions. -If `source.bytes` and `destination.bytes` are known, `network.bytes` is their sum. - -type: long - -example: 368 - -format: bytes - --- - -*`network.community_id`*:: -+ --- -A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows. -Learn more at https://github.com/corelight/community-id-spec. - -type: keyword - -example: 1:hO+sN4H+MG5MY/8hIrXPqc4ZQz0= - --- - -*`network.direction`*:: -+ --- -Direction of the network traffic. -Recommended values are: - * ingress - * egress - * inbound - * outbound - * internal - * external - * unknown - -When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress". -When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external". -Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers. - -type: keyword - -example: inbound - --- - -*`network.forwarded_ip`*:: -+ --- -Host IP address when the source IP address is the proxy. - -type: ip - -example: 192.1.1.2 - --- - -*`network.iana_number`*:: -+ --- -IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number. - -type: keyword - -example: 6 - --- - -*`network.inner`*:: -+ --- -Network.inner fields are added in addition to network.vlan fields to describe the innermost VLAN when q-in-q VLAN tagging is present. Allowed fields include vlan.id and vlan.name. Inner vlan fields are typically used when sending traffic with multiple 802.1q encapsulations to a network sensor (e.g. Zeek, Wireshark.) - -type: object - --- - -*`network.inner.vlan.id`*:: -+ --- -VLAN ID as reported by the observer. - -type: keyword - -example: 10 - --- - -*`network.inner.vlan.name`*:: -+ --- -Optional VLAN name as reported by the observer. - -type: keyword - -example: outside - --- - -*`network.name`*:: -+ --- -Name given by operators to sections of their network. - -type: keyword - -example: Guest Wifi - --- - -*`network.packets`*:: -+ --- -Total packets transferred in both directions. -If `source.packets` and `destination.packets` are known, `network.packets` is their sum. - -type: long - -example: 24 - --- - -*`network.protocol`*:: -+ --- -In the OSI Model this would be the Application Layer protocol. For example, `http`, `dns`, or `ssh`. -The field value must be normalized to lowercase for querying. - -type: keyword - -example: http - --- - -*`network.transport`*:: -+ --- -Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.) -The field value must be normalized to lowercase for querying. - -type: keyword - -example: tcp - --- - -*`network.type`*:: -+ --- -In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc -The field value must be normalized to lowercase for querying. - -type: keyword - -example: ipv4 - --- - -*`network.vlan.id`*:: -+ --- -VLAN ID as reported by the observer. - -type: keyword - -example: 10 - --- - -*`network.vlan.name`*:: -+ --- -Optional VLAN name as reported by the observer. - -type: keyword - -example: outside - --- - -[float] -=== observer - -An observer is defined as a special network, security, or application device used to detect, observe, or create network, security, or application-related events and metrics. -This could be a custom hardware appliance or a server that has been configured to run special network, security, or application software. Examples include firewalls, web proxies, intrusion detection/prevention systems, network monitoring sensors, web application firewalls, data loss prevention systems, and APM servers. The observer.* fields shall be populated with details of the system, if any, that detects, observes and/or creates a network, security, or application event or metric. Message queues and ETL components used in processing events or metrics are not considered observers in ECS. - - -*`observer.egress`*:: -+ --- -Observer.egress holds information like interface number and name, vlan, and zone information to classify egress traffic. Single armed monitoring such as a network sensor on a span port should only use observer.ingress to categorize traffic. - -type: object - --- - -*`observer.egress.interface.alias`*:: -+ --- -Interface alias as reported by the system, typically used in firewall implementations for e.g. inside, outside, or dmz logical interface naming. - -type: keyword - -example: outside - --- - -*`observer.egress.interface.id`*:: -+ --- -Interface ID as reported by an observer (typically SNMP interface ID). - -type: keyword - -example: 10 - --- - -*`observer.egress.interface.name`*:: -+ --- -Interface name as reported by the system. - -type: keyword - -example: eth0 - --- - -*`observer.egress.vlan.id`*:: -+ --- -VLAN ID as reported by the observer. - -type: keyword - -example: 10 - --- - -*`observer.egress.vlan.name`*:: -+ --- -Optional VLAN name as reported by the observer. - -type: keyword - -example: outside - --- - -*`observer.egress.zone`*:: -+ --- -Network zone of outbound traffic as reported by the observer to categorize the destination area of egress traffic, e.g. Internal, External, DMZ, HR, Legal, etc. - -type: keyword - -example: Public_Internet - --- - -*`observer.geo.city_name`*:: -+ --- -City name. - -type: keyword - -example: Montreal - --- - -*`observer.geo.continent_code`*:: -+ --- -Two-letter code representing continent's name. - -type: keyword - -example: NA - --- - -*`observer.geo.continent_name`*:: -+ --- -Name of the continent. - -type: keyword - -example: North America - --- - -*`observer.geo.country_iso_code`*:: -+ --- -Country ISO code. - -type: keyword - -example: CA - --- - -*`observer.geo.country_name`*:: -+ --- -Country name. - -type: keyword - -example: Canada - --- - -*`observer.geo.location`*:: -+ --- -Longitude and latitude. - -type: geo_point - -example: { "lon": -73.614830, "lat": 45.505918 } - --- - -*`observer.geo.name`*:: -+ --- -User-defined description of a location, at the level of granularity they care about. -Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. -Not typically used in automated geolocation. - -type: keyword - -example: boston-dc - --- - -*`observer.geo.postal_code`*:: -+ --- -Postal code associated with the location. -Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. - -type: keyword - -example: 94040 - --- - -*`observer.geo.region_iso_code`*:: -+ --- -Region ISO code. - -type: keyword - -example: CA-QC - --- - -*`observer.geo.region_name`*:: -+ --- -Region name. - -type: keyword - -example: Quebec - --- - -*`observer.geo.timezone`*:: -+ --- -The time zone of the location, such as IANA time zone name. - -type: keyword - -example: America/Argentina/Buenos_Aires - --- - -*`observer.hostname`*:: -+ --- -Hostname of the observer. - -type: keyword - --- - -*`observer.ingress`*:: -+ --- -Observer.ingress holds information like interface number and name, vlan, and zone information to classify ingress traffic. Single armed monitoring such as a network sensor on a span port should only use observer.ingress to categorize traffic. - -type: object - --- - -*`observer.ingress.interface.alias`*:: -+ --- -Interface alias as reported by the system, typically used in firewall implementations for e.g. inside, outside, or dmz logical interface naming. - -type: keyword - -example: outside - --- - -*`observer.ingress.interface.id`*:: -+ --- -Interface ID as reported by an observer (typically SNMP interface ID). - -type: keyword - -example: 10 - --- - -*`observer.ingress.interface.name`*:: -+ --- -Interface name as reported by the system. - -type: keyword - -example: eth0 - --- - -*`observer.ingress.vlan.id`*:: -+ --- -VLAN ID as reported by the observer. - -type: keyword - -example: 10 - --- - -*`observer.ingress.vlan.name`*:: -+ --- -Optional VLAN name as reported by the observer. - -type: keyword - -example: outside - --- - -*`observer.ingress.zone`*:: -+ --- -Network zone of incoming traffic as reported by the observer to categorize the source area of ingress traffic. e.g. internal, External, DMZ, HR, Legal, etc. - -type: keyword - -example: DMZ - --- - -*`observer.ip`*:: -+ --- -IP addresses of the observer. - -type: ip - --- - -*`observer.mac`*:: -+ --- -MAC addresses of the observer. -The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen. - -type: keyword - -example: ["00-00-5E-00-53-23", "00-00-5E-00-53-24"] - --- - -*`observer.name`*:: -+ --- -Custom name of the observer. -This is a name that can be given to an observer. This can be helpful for example if multiple firewalls of the same model are used in an organization. -If no custom name is needed, the field can be left empty. - -type: keyword - -example: 1_proxySG - --- - -*`observer.os.family`*:: -+ --- -OS family (such as redhat, debian, freebsd, windows). - -type: keyword - -example: debian - --- - -*`observer.os.full`*:: -+ --- -Operating system name, including the version or code name. - -type: keyword - -example: Mac OS Mojave - --- - -*`observer.os.full.text`*:: -+ --- -type: match_only_text - --- - -*`observer.os.kernel`*:: -+ --- -Operating system kernel version as a raw string. - -type: keyword - -example: 4.4.0-112-generic - --- - -*`observer.os.name`*:: -+ --- -Operating system name, without the version. - -type: keyword - -example: Mac OS X - --- - -*`observer.os.name.text`*:: -+ --- -type: match_only_text - --- - -*`observer.os.platform`*:: -+ --- -Operating system platform (such centos, ubuntu, windows). - -type: keyword - -example: darwin - --- - -*`observer.os.type`*:: -+ --- -Use the `os.type` field to categorize the operating system into one of the broad commercial families. -One of these following values should be used (lowercase): linux, macos, unix, windows. -If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition. - -type: keyword - -example: macos - --- - -*`observer.os.version`*:: -+ --- -Operating system version as a raw string. - -type: keyword - -example: 10.14.1 - --- - -*`observer.product`*:: -+ --- -The product name of the observer. - -type: keyword - -example: s200 - --- - -*`observer.serial_number`*:: -+ --- -Observer serial number. - -type: keyword - --- - -*`observer.type`*:: -+ --- -The type of the observer the data is coming from. -There is no predefined list of observer types. Some examples are `forwarder`, `firewall`, `ids`, `ips`, `proxy`, `poller`, `sensor`, `APM server`. - -type: keyword - -example: firewall - --- - -*`observer.vendor`*:: -+ --- -Vendor name of the observer. - -type: keyword - -example: Symantec - --- - -*`observer.version`*:: -+ --- -Observer version. - -type: keyword - --- - -[float] -=== orchestrator - -Fields that describe the resources which container orchestrators manage or act upon. - - -*`orchestrator.api_version`*:: -+ --- -API version being used to carry out the action - -type: keyword - -example: v1beta1 - --- - -*`orchestrator.cluster.name`*:: -+ --- -Name of the cluster. - -type: keyword - --- - -*`orchestrator.cluster.url`*:: -+ --- -URL of the API used to manage the cluster. - -type: keyword - --- - -*`orchestrator.cluster.version`*:: -+ --- -The version of the cluster. - -type: keyword - --- - -*`orchestrator.namespace`*:: -+ --- -Namespace in which the action is taking place. - -type: keyword - -example: kube-system - --- - -*`orchestrator.organization`*:: -+ --- -Organization affected by the event (for multi-tenant orchestrator setups). - -type: keyword - -example: elastic - --- - -*`orchestrator.resource.name`*:: -+ --- -Name of the resource being acted upon. - -type: keyword - -example: test-pod-cdcws - --- - -*`orchestrator.resource.type`*:: -+ --- -Type of resource being acted upon. - -type: keyword - -example: service - --- - -*`orchestrator.type`*:: -+ --- -Orchestrator cluster type (e.g. kubernetes, nomad or cloudfoundry). - -type: keyword - -example: kubernetes - --- - -[float] -=== organization - -The organization fields enrich data with information about the company or entity the data is associated with. -These fields help you arrange or filter data stored in an index by one or multiple organizations. - - -*`organization.id`*:: -+ --- -Unique identifier for the organization. - -type: keyword - --- - -*`organization.name`*:: -+ --- -Organization name. - -type: keyword - --- - -*`organization.name.text`*:: -+ --- -type: match_only_text - --- - -[float] -=== os - -The OS fields contain information about the operating system. - - -*`os.family`*:: -+ --- -OS family (such as redhat, debian, freebsd, windows). - -type: keyword - -example: debian - --- - -*`os.full`*:: -+ --- -Operating system name, including the version or code name. - -type: keyword - -example: Mac OS Mojave - --- - -*`os.full.text`*:: -+ --- -type: match_only_text - --- - -*`os.kernel`*:: -+ --- -Operating system kernel version as a raw string. - -type: keyword - -example: 4.4.0-112-generic - --- - -*`os.name`*:: -+ --- -Operating system name, without the version. - -type: keyword - -example: Mac OS X - --- - -*`os.name.text`*:: -+ --- -type: match_only_text - --- - -*`os.platform`*:: -+ --- -Operating system platform (such centos, ubuntu, windows). - -type: keyword - -example: darwin - --- - -*`os.type`*:: -+ --- -Use the `os.type` field to categorize the operating system into one of the broad commercial families. -One of these following values should be used (lowercase): linux, macos, unix, windows. -If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition. - -type: keyword - -example: macos - --- - -*`os.version`*:: -+ --- -Operating system version as a raw string. - -type: keyword - -example: 10.14.1 - --- - -[float] -=== package - -These fields contain information about an installed software package. It contains general information about a package, such as name, version or size. It also contains installation details, such as time or location. - - -*`package.architecture`*:: -+ --- -Package architecture. - -type: keyword - -example: x86_64 - --- - -*`package.build_version`*:: -+ --- -Additional information about the build version of the installed package. -For example use the commit SHA of a non-released package. - -type: keyword - -example: 36f4f7e89dd61b0988b12ee000b98966867710cd - --- - -*`package.checksum`*:: -+ --- -Checksum of the installed package for verification. - -type: keyword - -example: 68b329da9893e34099c7d8ad5cb9c940 - --- - -*`package.description`*:: -+ --- -Description of the package. - -type: keyword - -example: Open source programming language to build simple/reliable/efficient software. - --- - -*`package.install_scope`*:: -+ --- -Indicating how the package was installed, e.g. user-local, global. - -type: keyword - -example: global - --- - -*`package.installed`*:: -+ --- -Time when package was installed. - -type: date - --- - -*`package.license`*:: -+ --- -License under which the package was released. -Use a short name, e.g. the license identifier from SPDX License List where possible (https://spdx.org/licenses/). - -type: keyword - -example: Apache License 2.0 - --- - -*`package.name`*:: -+ --- -Package name - -type: keyword - -example: go - --- - -*`package.path`*:: -+ --- -Path where the package is installed. - -type: keyword - -example: /usr/local/Cellar/go/1.12.9/ - --- - -*`package.reference`*:: -+ --- -Home page or reference URL of the software in this package, if available. - -type: keyword - -example: https://golang.org - --- - -*`package.size`*:: -+ --- -Package size in bytes. - -type: long - -example: 62231 - -format: string - --- - -*`package.type`*:: -+ --- -Type of package. -This should contain the package file type, rather than the package manager name. Examples: rpm, dpkg, brew, npm, gem, nupkg, jar. - -type: keyword - -example: rpm - --- - -*`package.version`*:: -+ --- -Package version - -type: keyword - -example: 1.12.9 - --- - -[float] -=== pe - -These fields contain Windows Portable Executable (PE) metadata. - - -*`pe.architecture`*:: -+ --- -CPU architecture target for the file. - -type: keyword - -example: x64 - --- - -*`pe.company`*:: -+ --- -Internal company name of the file, provided at compile-time. - -type: keyword - -example: Microsoft Corporation - --- - -*`pe.description`*:: -+ --- -Internal description of the file, provided at compile-time. - -type: keyword - -example: Paint - --- - -*`pe.file_version`*:: -+ --- -Internal version of the file, provided at compile-time. - -type: keyword - -example: 6.3.9600.17415 - --- - -*`pe.imphash`*:: -+ --- -A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values. -Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html. - -type: keyword - -example: 0c6803c4e922103c4dca5963aad36ddf - --- - -*`pe.original_file_name`*:: -+ --- -Internal name of the file, provided at compile-time. - -type: keyword - -example: MSPAINT.EXE - --- - -*`pe.product`*:: -+ --- -Internal product name of the file, provided at compile-time. - -type: keyword - -example: Microsoft® Windows® Operating System - --- - -[float] -=== process - -These fields contain information about a process. -These fields can help you correlate metrics information with a process id/name from a log message. The `process.pid` often stays in the metric itself and is copied to the global field for correlation. - - -*`process.args`*:: -+ --- -Array of process arguments, starting with the absolute path to the executable. -May be filtered to protect sensitive information. - -type: keyword - -example: ["/usr/bin/ssh", "-l", "user", "10.0.0.16"] - --- - -*`process.args_count`*:: -+ --- -Length of the process.args array. -This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity. - -type: long - -example: 4 - --- - -*`process.code_signature.digest_algorithm`*:: -+ --- -The hashing algorithm used to sign the process. -This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm. - -type: keyword - -example: sha256 - --- - -*`process.code_signature.exists`*:: -+ --- -Boolean to capture if a signature is present. - -type: boolean - -example: true - --- - -*`process.code_signature.signing_id`*:: -+ --- -The identifier used to sign the process. -This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only. - -type: keyword - -example: com.apple.xpc.proxy - --- - -*`process.code_signature.status`*:: -+ --- -Additional information about the certificate status. -This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked. - -type: keyword - -example: ERROR_UNTRUSTED_ROOT - --- - -*`process.code_signature.subject_name`*:: -+ --- -Subject name of the code signer - -type: keyword - -example: Microsoft Corporation - --- - -*`process.code_signature.team_id`*:: -+ --- -The team identifier used to sign the process. -This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only. - -type: keyword - -example: EQHXZ8M8AV - --- - -*`process.code_signature.timestamp`*:: -+ --- -Date and time when the code signature was generated and signed. - -type: date - -example: 2021-01-01T12:10:30Z - --- - -*`process.code_signature.trusted`*:: -+ --- -Stores the trust status of the certificate chain. -Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status. - -type: boolean - -example: true - --- - -*`process.code_signature.valid`*:: -+ --- -Boolean to capture if the digital signature is verified against the binary content. -Leave unpopulated if a certificate was unchecked. - -type: boolean - -example: true - --- - -*`process.command_line`*:: -+ --- -Full command line that started the process, including the absolute path to the executable, and all arguments. -Some arguments may be filtered to protect sensitive information. - -type: wildcard - -example: /usr/bin/ssh -l user 10.0.0.16 - --- - -*`process.command_line.text`*:: -+ --- -type: match_only_text - --- - -*`process.elf.architecture`*:: -+ --- -Machine architecture of the ELF file. - -type: keyword - -example: x86-64 - --- - -*`process.elf.byte_order`*:: -+ --- -Byte sequence of ELF file. - -type: keyword - -example: Little Endian - --- - -*`process.elf.cpu_type`*:: -+ --- -CPU type of the ELF file. - -type: keyword - -example: Intel - --- - -*`process.elf.creation_date`*:: -+ --- -Extracted when possible from the file's metadata. Indicates when it was built or compiled. It can also be faked by malware creators. - -type: date - --- - -*`process.elf.exports`*:: -+ --- -List of exported element names and types. - -type: flattened - --- - -*`process.elf.header.abi_version`*:: -+ --- -Version of the ELF Application Binary Interface (ABI). - -type: keyword - --- - -*`process.elf.header.class`*:: -+ --- -Header class of the ELF file. - -type: keyword - --- - -*`process.elf.header.data`*:: -+ --- -Data table of the ELF header. - -type: keyword - --- - -*`process.elf.header.entrypoint`*:: -+ --- -Header entrypoint of the ELF file. - -type: long - -format: string - --- - -*`process.elf.header.object_version`*:: -+ --- -"0x1" for original ELF files. - -type: keyword - --- - -*`process.elf.header.os_abi`*:: -+ --- -Application Binary Interface (ABI) of the Linux OS. - -type: keyword - --- - -*`process.elf.header.type`*:: -+ --- -Header type of the ELF file. - -type: keyword - --- - -*`process.elf.header.version`*:: -+ --- -Version of the ELF header. - -type: keyword - --- - -*`process.elf.imports`*:: -+ --- -List of imported element names and types. - -type: flattened - --- - -*`process.elf.sections`*:: -+ --- -An array containing an object for each section of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.sections.*`. - -type: nested - --- - -*`process.elf.sections.chi2`*:: -+ --- -Chi-square probability distribution of the section. - -type: long - -format: number - --- - -*`process.elf.sections.entropy`*:: -+ --- -Shannon entropy calculation from the section. - -type: long - -format: number - --- - -*`process.elf.sections.flags`*:: -+ --- -ELF Section List flags. - -type: keyword - --- - -*`process.elf.sections.name`*:: -+ --- -ELF Section List name. - -type: keyword - --- - -*`process.elf.sections.physical_offset`*:: -+ --- -ELF Section List offset. - -type: keyword - --- - -*`process.elf.sections.physical_size`*:: -+ --- -ELF Section List physical size. - -type: long - -format: bytes - --- - -*`process.elf.sections.type`*:: -+ --- -ELF Section List type. - -type: keyword - --- - -*`process.elf.sections.virtual_address`*:: -+ --- -ELF Section List virtual address. - -type: long - -format: string - --- - -*`process.elf.sections.virtual_size`*:: -+ --- -ELF Section List virtual size. - -type: long - -format: string - --- - -*`process.elf.segments`*:: -+ --- -An array containing an object for each segment of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.segments.*`. - -type: nested - --- - -*`process.elf.segments.sections`*:: -+ --- -ELF object segment sections. - -type: keyword - --- - -*`process.elf.segments.type`*:: -+ --- -ELF object segment type. - -type: keyword - --- - -*`process.elf.shared_libraries`*:: -+ --- -List of shared libraries used by this ELF object. - -type: keyword - --- - -*`process.elf.telfhash`*:: -+ --- -telfhash symbol hash for ELF file. - -type: keyword - --- - -*`process.end`*:: -+ --- -The time the process ended. - -type: date - -example: 2016-05-23T08:05:34.853Z - --- - -*`process.entity_id`*:: -+ --- -Unique identifier for the process. -The implementation of this is specified by the data source, but some examples of what could be used here are a process-generated UUID, Sysmon Process GUIDs, or a hash of some uniquely identifying components of a process. -Constructing a globally unique identifier is a common practice to mitigate PID reuse as well as to identify a specific process over time, across multiple monitored hosts. - -type: keyword - -example: c2c455d9f99375d - --- - -*`process.executable`*:: -+ --- -Absolute path to the process executable. - -type: keyword - -example: /usr/bin/ssh - --- - -*`process.executable.text`*:: -+ --- -type: match_only_text - --- - -*`process.exit_code`*:: -+ --- -The exit code of the process, if this is a termination event. -The field should be absent if there is no exit code for the event (e.g. process start). - -type: long - -example: 137 - --- - -*`process.hash.md5`*:: -+ --- -MD5 hash. - -type: keyword - --- - -*`process.hash.sha1`*:: -+ --- -SHA1 hash. - -type: keyword - --- - -*`process.hash.sha256`*:: -+ --- -SHA256 hash. - -type: keyword - --- - -*`process.hash.sha512`*:: -+ --- -SHA512 hash. - -type: keyword - --- - -*`process.hash.ssdeep`*:: -+ --- -SSDEEP hash. - -type: keyword - --- - -*`process.name`*:: -+ --- -Process name. -Sometimes called program name or similar. - -type: keyword - -example: ssh - --- - -*`process.name.text`*:: -+ --- -type: match_only_text - --- - -*`process.parent.args`*:: -+ --- -Array of process arguments, starting with the absolute path to the executable. -May be filtered to protect sensitive information. - -type: keyword - -example: ["/usr/bin/ssh", "-l", "user", "10.0.0.16"] - --- - -*`process.parent.args_count`*:: -+ --- -Length of the process.args array. -This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity. - -type: long - -example: 4 - --- - -*`process.parent.code_signature.digest_algorithm`*:: -+ --- -The hashing algorithm used to sign the process. -This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm. - -type: keyword - -example: sha256 - --- - -*`process.parent.code_signature.exists`*:: -+ --- -Boolean to capture if a signature is present. - -type: boolean - -example: true - --- - -*`process.parent.code_signature.signing_id`*:: -+ --- -The identifier used to sign the process. -This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only. - -type: keyword - -example: com.apple.xpc.proxy - --- - -*`process.parent.code_signature.status`*:: -+ --- -Additional information about the certificate status. -This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked. - -type: keyword - -example: ERROR_UNTRUSTED_ROOT - --- - -*`process.parent.code_signature.subject_name`*:: -+ --- -Subject name of the code signer - -type: keyword - -example: Microsoft Corporation - --- - -*`process.parent.code_signature.team_id`*:: -+ --- -The team identifier used to sign the process. -This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only. - -type: keyword - -example: EQHXZ8M8AV - --- - -*`process.parent.code_signature.timestamp`*:: -+ --- -Date and time when the code signature was generated and signed. - -type: date - -example: 2021-01-01T12:10:30Z - --- - -*`process.parent.code_signature.trusted`*:: -+ --- -Stores the trust status of the certificate chain. -Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status. - -type: boolean - -example: true - --- - -*`process.parent.code_signature.valid`*:: -+ --- -Boolean to capture if the digital signature is verified against the binary content. -Leave unpopulated if a certificate was unchecked. - -type: boolean - -example: true - --- - -*`process.parent.command_line`*:: -+ --- -Full command line that started the process, including the absolute path to the executable, and all arguments. -Some arguments may be filtered to protect sensitive information. - -type: wildcard - -example: /usr/bin/ssh -l user 10.0.0.16 - --- - -*`process.parent.command_line.text`*:: -+ --- -type: match_only_text - --- - -*`process.parent.elf.architecture`*:: -+ --- -Machine architecture of the ELF file. - -type: keyword - -example: x86-64 - --- - -*`process.parent.elf.byte_order`*:: -+ --- -Byte sequence of ELF file. - -type: keyword - -example: Little Endian - --- - -*`process.parent.elf.cpu_type`*:: -+ --- -CPU type of the ELF file. - -type: keyword - -example: Intel - --- - -*`process.parent.elf.creation_date`*:: -+ --- -Extracted when possible from the file's metadata. Indicates when it was built or compiled. It can also be faked by malware creators. - -type: date - --- - -*`process.parent.elf.exports`*:: -+ --- -List of exported element names and types. - -type: flattened - --- - -*`process.parent.elf.header.abi_version`*:: -+ --- -Version of the ELF Application Binary Interface (ABI). - -type: keyword - --- - -*`process.parent.elf.header.class`*:: -+ --- -Header class of the ELF file. - -type: keyword - --- - -*`process.parent.elf.header.data`*:: -+ --- -Data table of the ELF header. - -type: keyword - --- - -*`process.parent.elf.header.entrypoint`*:: -+ --- -Header entrypoint of the ELF file. - -type: long - -format: string - --- - -*`process.parent.elf.header.object_version`*:: -+ --- -"0x1" for original ELF files. - -type: keyword - --- - -*`process.parent.elf.header.os_abi`*:: -+ --- -Application Binary Interface (ABI) of the Linux OS. - -type: keyword - --- - -*`process.parent.elf.header.type`*:: -+ --- -Header type of the ELF file. - -type: keyword - --- - -*`process.parent.elf.header.version`*:: -+ --- -Version of the ELF header. - -type: keyword - --- - -*`process.parent.elf.imports`*:: -+ --- -List of imported element names and types. - -type: flattened - --- - -*`process.parent.elf.sections`*:: -+ --- -An array containing an object for each section of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.sections.*`. - -type: nested - --- - -*`process.parent.elf.sections.chi2`*:: -+ --- -Chi-square probability distribution of the section. - -type: long - -format: number - --- - -*`process.parent.elf.sections.entropy`*:: -+ --- -Shannon entropy calculation from the section. - -type: long - -format: number - --- - -*`process.parent.elf.sections.flags`*:: -+ --- -ELF Section List flags. - -type: keyword - --- - -*`process.parent.elf.sections.name`*:: -+ --- -ELF Section List name. - -type: keyword - --- - -*`process.parent.elf.sections.physical_offset`*:: -+ --- -ELF Section List offset. - -type: keyword - --- - -*`process.parent.elf.sections.physical_size`*:: -+ --- -ELF Section List physical size. - -type: long - -format: bytes - --- - -*`process.parent.elf.sections.type`*:: -+ --- -ELF Section List type. - -type: keyword - --- - -*`process.parent.elf.sections.virtual_address`*:: -+ --- -ELF Section List virtual address. - -type: long - -format: string - --- - -*`process.parent.elf.sections.virtual_size`*:: -+ --- -ELF Section List virtual size. - -type: long - -format: string - --- - -*`process.parent.elf.segments`*:: -+ --- -An array containing an object for each segment of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.segments.*`. - -type: nested - --- - -*`process.parent.elf.segments.sections`*:: -+ --- -ELF object segment sections. - -type: keyword - --- - -*`process.parent.elf.segments.type`*:: -+ --- -ELF object segment type. - -type: keyword - --- - -*`process.parent.elf.shared_libraries`*:: -+ --- -List of shared libraries used by this ELF object. - -type: keyword - --- - -*`process.parent.elf.telfhash`*:: -+ --- -telfhash symbol hash for ELF file. - -type: keyword - --- - -*`process.parent.end`*:: -+ --- -The time the process ended. - -type: date - -example: 2016-05-23T08:05:34.853Z - --- - -*`process.parent.entity_id`*:: -+ --- -Unique identifier for the process. -The implementation of this is specified by the data source, but some examples of what could be used here are a process-generated UUID, Sysmon Process GUIDs, or a hash of some uniquely identifying components of a process. -Constructing a globally unique identifier is a common practice to mitigate PID reuse as well as to identify a specific process over time, across multiple monitored hosts. - -type: keyword - -example: c2c455d9f99375d - --- - -*`process.parent.executable`*:: -+ --- -Absolute path to the process executable. - -type: keyword - -example: /usr/bin/ssh - --- - -*`process.parent.executable.text`*:: -+ --- -type: match_only_text - --- - -*`process.parent.exit_code`*:: -+ --- -The exit code of the process, if this is a termination event. -The field should be absent if there is no exit code for the event (e.g. process start). - -type: long - -example: 137 - --- - -*`process.parent.hash.md5`*:: -+ --- -MD5 hash. - -type: keyword - --- - -*`process.parent.hash.sha1`*:: -+ --- -SHA1 hash. - -type: keyword - --- - -*`process.parent.hash.sha256`*:: -+ --- -SHA256 hash. - -type: keyword - --- - -*`process.parent.hash.sha512`*:: -+ --- -SHA512 hash. - -type: keyword - --- - -*`process.parent.hash.ssdeep`*:: -+ --- -SSDEEP hash. - -type: keyword - --- - -*`process.parent.name`*:: -+ --- -Process name. -Sometimes called program name or similar. - -type: keyword - -example: ssh - --- - -*`process.parent.name.text`*:: -+ --- -type: match_only_text - --- - -*`process.parent.pe.architecture`*:: -+ --- -CPU architecture target for the file. - -type: keyword - -example: x64 - --- - -*`process.parent.pe.company`*:: -+ --- -Internal company name of the file, provided at compile-time. - -type: keyword - -example: Microsoft Corporation - --- - -*`process.parent.pe.description`*:: -+ --- -Internal description of the file, provided at compile-time. - -type: keyword - -example: Paint - --- - -*`process.parent.pe.file_version`*:: -+ --- -Internal version of the file, provided at compile-time. - -type: keyword - -example: 6.3.9600.17415 - --- - -*`process.parent.pe.imphash`*:: -+ --- -A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values. -Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html. - -type: keyword - -example: 0c6803c4e922103c4dca5963aad36ddf - --- - -*`process.parent.pe.original_file_name`*:: -+ --- -Internal name of the file, provided at compile-time. - -type: keyword - -example: MSPAINT.EXE - --- - -*`process.parent.pe.product`*:: -+ --- -Internal product name of the file, provided at compile-time. - -type: keyword - -example: Microsoft® Windows® Operating System - --- - -*`process.parent.pgid`*:: -+ --- -Identifier of the group of processes the process belongs to. - -type: long - -format: string - --- - -*`process.parent.pid`*:: -+ --- -Process id. - -type: long - -example: 4242 - -format: string - --- - -*`process.parent.start`*:: -+ --- -The time the process started. - -type: date - -example: 2016-05-23T08:05:34.853Z - --- - -*`process.parent.thread.id`*:: -+ --- -Thread ID. - -type: long - -example: 4242 - -format: string - --- - -*`process.parent.thread.name`*:: -+ --- -Thread name. - -type: keyword - -example: thread-0 - --- - -*`process.parent.title`*:: -+ --- -Process title. -The proctitle, some times the same as process name. Can also be different: for example a browser setting its title to the web page currently opened. - -type: keyword - --- - -*`process.parent.title.text`*:: -+ --- -type: match_only_text - --- - -*`process.parent.uptime`*:: -+ --- -Seconds the process has been up. - -type: long - -example: 1325 - --- - -*`process.parent.working_directory`*:: -+ --- -The working directory of the process. - -type: keyword - -example: /home/alice - --- - -*`process.parent.working_directory.text`*:: -+ --- -type: match_only_text - --- - -*`process.pe.architecture`*:: -+ --- -CPU architecture target for the file. - -type: keyword - -example: x64 - --- - -*`process.pe.company`*:: -+ --- -Internal company name of the file, provided at compile-time. - -type: keyword - -example: Microsoft Corporation - --- - -*`process.pe.description`*:: -+ --- -Internal description of the file, provided at compile-time. - -type: keyword - -example: Paint - --- - -*`process.pe.file_version`*:: -+ --- -Internal version of the file, provided at compile-time. - -type: keyword - -example: 6.3.9600.17415 - --- - -*`process.pe.imphash`*:: -+ --- -A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values. -Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html. - -type: keyword - -example: 0c6803c4e922103c4dca5963aad36ddf - --- - -*`process.pe.original_file_name`*:: -+ --- -Internal name of the file, provided at compile-time. - -type: keyword - -example: MSPAINT.EXE - --- - -*`process.pe.product`*:: -+ --- -Internal product name of the file, provided at compile-time. - -type: keyword - -example: Microsoft® Windows® Operating System - --- - -*`process.pgid`*:: -+ --- -Identifier of the group of processes the process belongs to. - -type: long - -format: string - --- - -*`process.pid`*:: -+ --- -Process id. - -type: long - -example: 4242 - -format: string - --- - -*`process.start`*:: -+ --- -The time the process started. - -type: date - -example: 2016-05-23T08:05:34.853Z - --- - -*`process.thread.id`*:: -+ --- -Thread ID. - -type: long - -example: 4242 - -format: string - --- - -*`process.thread.name`*:: -+ --- -Thread name. - -type: keyword - -example: thread-0 - --- - -*`process.title`*:: -+ --- -Process title. -The proctitle, some times the same as process name. Can also be different: for example a browser setting its title to the web page currently opened. - -type: keyword - --- - -*`process.title.text`*:: -+ --- -type: match_only_text - --- - -*`process.uptime`*:: -+ --- -Seconds the process has been up. - -type: long - -example: 1325 - --- - -*`process.working_directory`*:: -+ --- -The working directory of the process. - -type: keyword - -example: /home/alice - --- - -*`process.working_directory.text`*:: -+ --- -type: match_only_text - --- - -[float] -=== registry - -Fields related to Windows Registry operations. - - -*`registry.data.bytes`*:: -+ --- -Original bytes written with base64 encoding. -For Windows registry operations, such as SetValueEx and RegQueryValueEx, this corresponds to the data pointed by `lp_data`. This is optional but provides better recoverability and should be populated for REG_BINARY encoded values. - -type: keyword - -example: ZQBuAC0AVQBTAAAAZQBuAAAAAAA= - --- - -*`registry.data.strings`*:: -+ --- -Content when writing string types. -Populated as an array when writing string data to the registry. For single string registry types (REG_SZ, REG_EXPAND_SZ), this should be an array with one string. For sequences of string with REG_MULTI_SZ, this array will be variable length. For numeric data, such as REG_DWORD and REG_QWORD, this should be populated with the decimal representation (e.g `"1"`). - -type: wildcard - -example: ["C:\rta\red_ttp\bin\myapp.exe"] - --- - -*`registry.data.type`*:: -+ --- -Standard registry type for encoding contents - -type: keyword - -example: REG_SZ - --- - -*`registry.hive`*:: -+ --- -Abbreviated name for the hive. - -type: keyword - -example: HKLM - --- - -*`registry.key`*:: -+ --- -Hive-relative path of keys. - -type: keyword - -example: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe - --- - -*`registry.path`*:: -+ --- -Full path, including hive, key and value - -type: keyword - -example: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe\Debugger - --- - -*`registry.value`*:: -+ --- -Name of the value written. - -type: keyword - -example: Debugger - --- - -[float] -=== related - -This field set is meant to facilitate pivoting around a piece of data. -Some pieces of information can be seen in many places in an ECS event. To facilitate searching for them, store an array of all seen values to their corresponding field in `related.`. -A concrete example is IP addresses, which can be under host, observer, source, destination, client, server, and network.forwarded_ip. If you append all IPs to `related.ip`, you can then search for a given IP trivially, no matter where it appeared, by querying `related.ip:192.0.2.15`. - - -*`related.hash`*:: -+ --- -All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). - -type: keyword - --- - -*`related.hosts`*:: -+ --- -All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. - -type: keyword - --- - -*`related.ip`*:: -+ --- -All of the IPs seen on your event. - -type: ip - --- - -*`related.user`*:: -+ --- -All the user names or other user identifiers seen on the event. - -type: keyword - --- - -[float] -=== rule - -Rule fields are used to capture the specifics of any observer or agent rules that generate alerts or other notable events. -Examples of data sources that would populate the rule fields include: network admission control platforms, network or host IDS/IPS, network firewalls, web application firewalls, url filters, endpoint detection and response (EDR) systems, etc. - - -*`rule.author`*:: -+ --- -Name, organization, or pseudonym of the author or authors who created the rule used to generate this event. - -type: keyword - -example: ["Star-Lord"] - --- - -*`rule.category`*:: -+ --- -A categorization value keyword used by the entity using the rule for detection of this event. - -type: keyword - -example: Attempted Information Leak - --- - -*`rule.description`*:: -+ --- -The description of the rule generating the event. - -type: keyword - -example: Block requests to public DNS over HTTPS / TLS protocols - --- - -*`rule.id`*:: -+ --- -A rule ID that is unique within the scope of an agent, observer, or other entity using the rule for detection of this event. - -type: keyword - -example: 101 - --- - -*`rule.license`*:: -+ --- -Name of the license under which the rule used to generate this event is made available. - -type: keyword - -example: Apache 2.0 - --- - -*`rule.name`*:: -+ --- -The name of the rule or signature generating the event. - -type: keyword - -example: BLOCK_DNS_over_TLS - --- - -*`rule.reference`*:: -+ --- -Reference URL to additional information about the rule used to generate this event. -The URL can point to the vendor's documentation about the rule. If that's not available, it can also be a link to a more general page describing this type of alert. - -type: keyword - -example: https://en.wikipedia.org/wiki/DNS_over_TLS - --- - -*`rule.ruleset`*:: -+ --- -Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member. - -type: keyword - -example: Standard_Protocol_Filters - --- - -*`rule.uuid`*:: -+ --- -A rule ID that is unique within the scope of a set or group of agents, observers, or other entities using the rule for detection of this event. - -type: keyword - -example: 1100110011 - --- - -*`rule.version`*:: -+ --- -The version / revision of the rule being used for analysis. - -type: keyword - -example: 1.1 - --- - -[float] -=== server - -A Server is defined as the responder in a network connection for events regarding sessions, connections, or bidirectional flow records. -For TCP events, the server is the receiver of the initial SYN packet(s) of the TCP connection. For other protocols, the server is generally the responder in the network transaction. Some systems actually use the term "responder" to refer the server in TCP connections. The server fields describe details about the system acting as the server in the network event. Server fields are usually populated in conjunction with client fields. Server fields are generally not populated for packet-level events. -Client / server representations can add semantic context to an exchange, which is helpful to visualize the data in certain situations. If your context falls in that category, you should still ensure that source and destination are filled appropriately. - - -*`server.address`*:: -+ --- -Some event server addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. -Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. - -type: keyword - --- - -*`server.as.number`*:: -+ --- -Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. - -type: long - -example: 15169 - --- - -*`server.as.organization.name`*:: -+ --- -Organization name. - -type: keyword - -example: Google LLC - --- - -*`server.as.organization.name.text`*:: -+ --- -type: match_only_text - --- - -*`server.bytes`*:: -+ --- -Bytes sent from the server to the client. - -type: long - -example: 184 - -format: bytes - --- - -*`server.domain`*:: -+ --- -Server domain. - -type: keyword - --- - -*`server.geo.city_name`*:: -+ --- -City name. - -type: keyword - -example: Montreal - --- - -*`server.geo.continent_code`*:: -+ --- -Two-letter code representing continent's name. - -type: keyword - -example: NA - --- - -*`server.geo.continent_name`*:: -+ --- -Name of the continent. - -type: keyword - -example: North America - --- - -*`server.geo.country_iso_code`*:: -+ --- -Country ISO code. - -type: keyword - -example: CA - --- - -*`server.geo.country_name`*:: -+ --- -Country name. - -type: keyword - -example: Canada - --- - -*`server.geo.location`*:: -+ --- -Longitude and latitude. - -type: geo_point - -example: { "lon": -73.614830, "lat": 45.505918 } - --- - -*`server.geo.name`*:: -+ --- -User-defined description of a location, at the level of granularity they care about. -Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. -Not typically used in automated geolocation. - -type: keyword - -example: boston-dc - --- - -*`server.geo.postal_code`*:: -+ --- -Postal code associated with the location. -Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. - -type: keyword - -example: 94040 - --- - -*`server.geo.region_iso_code`*:: -+ --- -Region ISO code. - -type: keyword - -example: CA-QC - --- - -*`server.geo.region_name`*:: -+ --- -Region name. - -type: keyword - -example: Quebec - --- - -*`server.geo.timezone`*:: -+ --- -The time zone of the location, such as IANA time zone name. - -type: keyword - -example: America/Argentina/Buenos_Aires - --- - -*`server.ip`*:: -+ --- -IP address of the server (IPv4 or IPv6). - -type: ip - --- - -*`server.mac`*:: -+ --- -MAC address of the server. -The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen. - -type: keyword - -example: 00-00-5E-00-53-23 - --- - -*`server.nat.ip`*:: -+ --- -Translated ip of destination based NAT sessions (e.g. internet to private DMZ) -Typically used with load balancers, firewalls, or routers. - -type: ip - --- - -*`server.nat.port`*:: -+ --- -Translated port of destination based NAT sessions (e.g. internet to private DMZ) -Typically used with load balancers, firewalls, or routers. - -type: long - -format: string - --- - -*`server.packets`*:: -+ --- -Packets sent from the server to the client. - -type: long - -example: 12 - --- - -*`server.port`*:: -+ --- -Port of the server. - -type: long - -format: string - --- - -*`server.registered_domain`*:: -+ --- -The highest registered server domain, stripped of the subdomain. -For example, the registered domain for "foo.example.com" is "example.com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk". - -type: keyword - -example: example.com - --- - -*`server.subdomain`*:: -+ --- -The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain. -For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period. - -type: keyword - -example: east - --- - -*`server.top_level_domain`*:: -+ --- -The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk". - -type: keyword - -example: co.uk - --- - -*`server.user.domain`*:: -+ --- -Name of the directory the user is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`server.user.email`*:: -+ --- -User email address. - -type: keyword - --- - -*`server.user.full_name`*:: -+ --- -User's full name, if available. - -type: keyword - -example: Albert Einstein - --- - -*`server.user.full_name.text`*:: -+ --- -type: match_only_text - --- - -*`server.user.group.domain`*:: -+ --- -Name of the directory the group is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`server.user.group.id`*:: -+ --- -Unique identifier for the group on the system/platform. - -type: keyword - --- - -*`server.user.group.name`*:: -+ --- -Name of the group. - -type: keyword - --- - -*`server.user.hash`*:: -+ --- -Unique user hash to correlate information for a user in anonymized form. -Useful if `user.id` or `user.name` contain confidential information and cannot be used. - -type: keyword - --- - -*`server.user.id`*:: -+ --- -Unique identifier of the user. - -type: keyword - -example: S-1-5-21-202424912787-2692429404-2351956786-1000 - --- - -*`server.user.name`*:: -+ --- -Short name or login of the user. - -type: keyword - -example: a.einstein - --- - -*`server.user.name.text`*:: -+ --- -type: match_only_text - --- - -*`server.user.roles`*:: -+ --- -Array of user roles at the time of the event. - -type: keyword - -example: ["kibana_admin", "reporting_user"] - --- - -[float] -=== service - -The service fields describe the service for or from which the data was collected. -These fields help you find and correlate logs for a specific service and version. - - -*`service.address`*:: -+ --- -Address where data about this service was collected from. -This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets). - -type: keyword - -example: 172.26.0.2:5432 - --- - -*`service.environment`*:: -+ --- -Identifies the environment where the service is running. -If the same service runs in different environments (production, staging, QA, development, etc.), the environment can identify other instances of the same service. Can also group services and applications from the same environment. - -type: keyword - -example: production - --- - -*`service.ephemeral_id`*:: -+ --- -Ephemeral identifier of this service (if one exists). -This id normally changes across restarts, but `service.id` does not. - -type: keyword - -example: 8a4f500f - --- - -*`service.id`*:: -+ --- -Unique identifier of the running service. If the service is comprised of many nodes, the `service.id` should be the same for all nodes. -This id should uniquely identify the service. This makes it possible to correlate logs and metrics for one specific service, no matter which particular node emitted the event. -Note that if you need to see the events from one specific host of the service, you should filter on that `host.name` or `host.id` instead. - -type: keyword - -example: d37e5ebfe0ae6c4972dbe9f0174a1637bb8247f6 - --- - -*`service.name`*:: -+ --- -Name of the service data is collected from. -The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name. -In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified. - -type: keyword - -example: elasticsearch-metrics - --- - -*`service.node.name`*:: -+ --- -Name of a service node. -This allows for two nodes of the same service running on the same host to be differentiated. Therefore, `service.node.name` should typically be unique across nodes of a given service. -In the case of Elasticsearch, the `service.node.name` could contain the unique node name within the Elasticsearch cluster. In cases where the service doesn't have the concept of a node name, the host name or container name can be used to distinguish running instances that make up this service. If those do not provide uniqueness (e.g. multiple instances of the service running on the same host) - the node name can be manually set. - -type: keyword - -example: instance-0000000016 - --- - -*`service.origin.address`*:: -+ --- -Address where data about this service was collected from. -This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets). - -type: keyword - -example: 172.26.0.2:5432 - --- - -*`service.origin.environment`*:: -+ --- -Identifies the environment where the service is running. -If the same service runs in different environments (production, staging, QA, development, etc.), the environment can identify other instances of the same service. Can also group services and applications from the same environment. - -type: keyword - -example: production - --- - -*`service.origin.ephemeral_id`*:: -+ --- -Ephemeral identifier of this service (if one exists). -This id normally changes across restarts, but `service.id` does not. - -type: keyword - -example: 8a4f500f - --- - -*`service.origin.id`*:: -+ --- -Unique identifier of the running service. If the service is comprised of many nodes, the `service.id` should be the same for all nodes. -This id should uniquely identify the service. This makes it possible to correlate logs and metrics for one specific service, no matter which particular node emitted the event. -Note that if you need to see the events from one specific host of the service, you should filter on that `host.name` or `host.id` instead. - -type: keyword - -example: d37e5ebfe0ae6c4972dbe9f0174a1637bb8247f6 - --- - -*`service.origin.name`*:: -+ --- -Name of the service data is collected from. -The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name. -In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified. - -type: keyword - -example: elasticsearch-metrics - --- - -*`service.origin.node.name`*:: -+ --- -Name of a service node. -This allows for two nodes of the same service running on the same host to be differentiated. Therefore, `service.node.name` should typically be unique across nodes of a given service. -In the case of Elasticsearch, the `service.node.name` could contain the unique node name within the Elasticsearch cluster. In cases where the service doesn't have the concept of a node name, the host name or container name can be used to distinguish running instances that make up this service. If those do not provide uniqueness (e.g. multiple instances of the service running on the same host) - the node name can be manually set. - -type: keyword - -example: instance-0000000016 - --- - -*`service.origin.state`*:: -+ --- -Current state of the service. - -type: keyword - --- - -*`service.origin.type`*:: -+ --- -The type of the service data is collected from. -The type can be used to group and correlate logs and metrics from one service type. -Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`. - -type: keyword - -example: elasticsearch - --- - -*`service.origin.version`*:: -+ --- -Version of the service the data was collected from. -This allows to look at a data set only for a specific version of a service. - -type: keyword - -example: 3.2.4 - --- - -*`service.state`*:: -+ --- -Current state of the service. - -type: keyword - --- - -*`service.target.address`*:: -+ --- -Address where data about this service was collected from. -This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets). - -type: keyword - -example: 172.26.0.2:5432 - --- - -*`service.target.environment`*:: -+ --- -Identifies the environment where the service is running. -If the same service runs in different environments (production, staging, QA, development, etc.), the environment can identify other instances of the same service. Can also group services and applications from the same environment. - -type: keyword - -example: production - --- - -*`service.target.ephemeral_id`*:: -+ --- -Ephemeral identifier of this service (if one exists). -This id normally changes across restarts, but `service.id` does not. - -type: keyword - -example: 8a4f500f - --- - -*`service.target.id`*:: -+ --- -Unique identifier of the running service. If the service is comprised of many nodes, the `service.id` should be the same for all nodes. -This id should uniquely identify the service. This makes it possible to correlate logs and metrics for one specific service, no matter which particular node emitted the event. -Note that if you need to see the events from one specific host of the service, you should filter on that `host.name` or `host.id` instead. - -type: keyword - -example: d37e5ebfe0ae6c4972dbe9f0174a1637bb8247f6 - --- - -*`service.target.name`*:: -+ --- -Name of the service data is collected from. -The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name. -In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified. - -type: keyword - -example: elasticsearch-metrics - --- - -*`service.target.node.name`*:: -+ --- -Name of a service node. -This allows for two nodes of the same service running on the same host to be differentiated. Therefore, `service.node.name` should typically be unique across nodes of a given service. -In the case of Elasticsearch, the `service.node.name` could contain the unique node name within the Elasticsearch cluster. In cases where the service doesn't have the concept of a node name, the host name or container name can be used to distinguish running instances that make up this service. If those do not provide uniqueness (e.g. multiple instances of the service running on the same host) - the node name can be manually set. - -type: keyword - -example: instance-0000000016 - --- - -*`service.target.state`*:: -+ --- -Current state of the service. - -type: keyword - --- - -*`service.target.type`*:: -+ --- -The type of the service data is collected from. -The type can be used to group and correlate logs and metrics from one service type. -Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`. - -type: keyword - -example: elasticsearch - --- - -*`service.target.version`*:: -+ --- -Version of the service the data was collected from. -This allows to look at a data set only for a specific version of a service. - -type: keyword - -example: 3.2.4 - --- - -*`service.type`*:: -+ --- -The type of the service data is collected from. -The type can be used to group and correlate logs and metrics from one service type. -Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`. - -type: keyword - -example: elasticsearch - --- - -*`service.version`*:: -+ --- -Version of the service the data was collected from. -This allows to look at a data set only for a specific version of a service. - -type: keyword - -example: 3.2.4 - --- - -[float] -=== source - -Source fields capture details about the sender of a network exchange/packet. These fields are populated from a network event, packet, or other event containing details of a network transaction. -Source fields are usually populated in conjunction with destination fields. The source and destination fields are considered the baseline and should always be filled if an event contains source and destination details from a network transaction. If the event also contains identification of the client and server roles, then the client and server fields should also be populated. - - -*`source.address`*:: -+ --- -Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. -Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. - -type: keyword - --- - -*`source.as.number`*:: -+ --- -Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. - -type: long - -example: 15169 - --- - -*`source.as.organization.name`*:: -+ --- -Organization name. - -type: keyword - -example: Google LLC - --- - -*`source.as.organization.name.text`*:: -+ --- -type: match_only_text - --- - -*`source.bytes`*:: -+ --- -Bytes sent from the source to the destination. - -type: long - -example: 184 - -format: bytes - --- - -*`source.domain`*:: -+ --- -Source domain. - -type: keyword - --- - -*`source.geo.city_name`*:: -+ --- -City name. - -type: keyword - -example: Montreal - --- - -*`source.geo.continent_code`*:: -+ --- -Two-letter code representing continent's name. - -type: keyword - -example: NA - --- - -*`source.geo.continent_name`*:: -+ --- -Name of the continent. - -type: keyword - -example: North America - --- - -*`source.geo.country_iso_code`*:: -+ --- -Country ISO code. - -type: keyword - -example: CA - --- - -*`source.geo.country_name`*:: -+ --- -Country name. - -type: keyword - -example: Canada - --- - -*`source.geo.location`*:: -+ --- -Longitude and latitude. - -type: geo_point - -example: { "lon": -73.614830, "lat": 45.505918 } - --- - -*`source.geo.name`*:: -+ --- -User-defined description of a location, at the level of granularity they care about. -Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. -Not typically used in automated geolocation. - -type: keyword - -example: boston-dc - --- - -*`source.geo.postal_code`*:: -+ --- -Postal code associated with the location. -Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. - -type: keyword - -example: 94040 - --- - -*`source.geo.region_iso_code`*:: -+ --- -Region ISO code. - -type: keyword - -example: CA-QC - --- - -*`source.geo.region_name`*:: -+ --- -Region name. - -type: keyword - -example: Quebec - --- - -*`source.geo.timezone`*:: -+ --- -The time zone of the location, such as IANA time zone name. - -type: keyword - -example: America/Argentina/Buenos_Aires - --- - -*`source.ip`*:: -+ --- -IP address of the source (IPv4 or IPv6). - -type: ip - --- - -*`source.mac`*:: -+ --- -MAC address of the source. -The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen. - -type: keyword - -example: 00-00-5E-00-53-23 - --- - -*`source.nat.ip`*:: -+ --- -Translated ip of source based NAT sessions (e.g. internal client to internet) -Typically connections traversing load balancers, firewalls, or routers. - -type: ip - --- - -*`source.nat.port`*:: -+ --- -Translated port of source based NAT sessions. (e.g. internal client to internet) -Typically used with load balancers, firewalls, or routers. - -type: long - -format: string - --- - -*`source.packets`*:: -+ --- -Packets sent from the source to the destination. - -type: long - -example: 12 - --- - -*`source.port`*:: -+ --- -Port of the source. - -type: long - -format: string - --- - -*`source.registered_domain`*:: -+ --- -The highest registered source domain, stripped of the subdomain. -For example, the registered domain for "foo.example.com" is "example.com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk". - -type: keyword - -example: example.com - --- - -*`source.subdomain`*:: -+ --- -The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain. -For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period. - -type: keyword - -example: east - --- - -*`source.top_level_domain`*:: -+ --- -The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk". - -type: keyword - -example: co.uk - --- - -*`source.user.domain`*:: -+ --- -Name of the directory the user is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`source.user.email`*:: -+ --- -User email address. - -type: keyword - --- - -*`source.user.full_name`*:: -+ --- -User's full name, if available. - -type: keyword - -example: Albert Einstein - --- - -*`source.user.full_name.text`*:: -+ --- -type: match_only_text - --- - -*`source.user.group.domain`*:: -+ --- -Name of the directory the group is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`source.user.group.id`*:: -+ --- -Unique identifier for the group on the system/platform. - -type: keyword - --- - -*`source.user.group.name`*:: -+ --- -Name of the group. - -type: keyword - --- - -*`source.user.hash`*:: -+ --- -Unique user hash to correlate information for a user in anonymized form. -Useful if `user.id` or `user.name` contain confidential information and cannot be used. - -type: keyword - --- - -*`source.user.id`*:: -+ --- -Unique identifier of the user. - -type: keyword - -example: S-1-5-21-202424912787-2692429404-2351956786-1000 - --- - -*`source.user.name`*:: -+ --- -Short name or login of the user. - -type: keyword - -example: a.einstein - --- - -*`source.user.name.text`*:: -+ --- -type: match_only_text - --- - -*`source.user.roles`*:: -+ --- -Array of user roles at the time of the event. - -type: keyword - -example: ["kibana_admin", "reporting_user"] - --- - -[float] -=== threat - -Fields to classify events and alerts according to a threat taxonomy such as the MITRE ATT&CK® framework. -These fields are for users to classify alerts from all of their sources (e.g. IDS, NGFW, etc.) within a common taxonomy. The threat.tactic.* fields are meant to capture the high level category of the threat (e.g. "impact"). The threat.technique.* fields are meant to capture which kind of approach is used by this detected threat, to accomplish the goal (e.g. "endpoint denial of service"). - - -*`threat.enrichments`*:: -+ --- -A list of associated indicators objects enriching the event, and the context of that association/enrichment. - -type: nested - --- - -*`threat.enrichments.indicator`*:: -+ --- -Object containing associated indicators enriching the event. - -type: object - --- - -*`threat.enrichments.indicator.as.number`*:: -+ --- -Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. - -type: long - -example: 15169 - --- - -*`threat.enrichments.indicator.as.organization.name`*:: -+ --- -Organization name. - -type: keyword - -example: Google LLC - --- - -*`threat.enrichments.indicator.as.organization.name.text`*:: -+ --- -type: match_only_text - --- - -*`threat.enrichments.indicator.confidence`*:: -+ --- -Identifies the vendor-neutral confidence rating using the None/Low/Medium/High scale defined in Appendix A of the STIX 2.1 framework. Vendor-specific confidence scales may be added as custom fields. -Expected values are: - * Not Specified - * None - * Low - * Medium - * High - -type: keyword - -example: Medium - --- - -*`threat.enrichments.indicator.description`*:: -+ --- -Describes the type of action conducted by the threat. - -type: keyword - -example: IP x.x.x.x was observed delivering the Angler EK. - --- - -*`threat.enrichments.indicator.email.address`*:: -+ --- -Identifies a threat indicator as an email address (irrespective of direction). - -type: keyword - -example: phish@example.com - --- - -*`threat.enrichments.indicator.file.accessed`*:: -+ --- -Last time the file was accessed. -Note that not all filesystems keep track of access time. - -type: date - --- - -*`threat.enrichments.indicator.file.attributes`*:: -+ --- -Array of file attributes. -Attributes names will vary by platform. Here's a non-exhaustive list of values that are expected in this field: archive, compressed, directory, encrypted, execute, hidden, read, readonly, system, write. - -type: keyword - -example: ["readonly", "system"] - --- - -*`threat.enrichments.indicator.file.code_signature.digest_algorithm`*:: -+ --- -The hashing algorithm used to sign the process. -This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm. - -type: keyword - -example: sha256 - --- - -*`threat.enrichments.indicator.file.code_signature.exists`*:: -+ --- -Boolean to capture if a signature is present. - -type: boolean - -example: true - --- - -*`threat.enrichments.indicator.file.code_signature.signing_id`*:: -+ --- -The identifier used to sign the process. -This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only. - -type: keyword - -example: com.apple.xpc.proxy - --- - -*`threat.enrichments.indicator.file.code_signature.status`*:: -+ --- -Additional information about the certificate status. -This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked. - -type: keyword - -example: ERROR_UNTRUSTED_ROOT - --- - -*`threat.enrichments.indicator.file.code_signature.subject_name`*:: -+ --- -Subject name of the code signer - -type: keyword - -example: Microsoft Corporation - --- - -*`threat.enrichments.indicator.file.code_signature.team_id`*:: -+ --- -The team identifier used to sign the process. -This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only. - -type: keyword - -example: EQHXZ8M8AV - --- - -*`threat.enrichments.indicator.file.code_signature.timestamp`*:: -+ --- -Date and time when the code signature was generated and signed. - -type: date - -example: 2021-01-01T12:10:30Z - --- - -*`threat.enrichments.indicator.file.code_signature.trusted`*:: -+ --- -Stores the trust status of the certificate chain. -Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status. - -type: boolean - -example: true - --- - -*`threat.enrichments.indicator.file.code_signature.valid`*:: -+ --- -Boolean to capture if the digital signature is verified against the binary content. -Leave unpopulated if a certificate was unchecked. - -type: boolean - -example: true - --- - -*`threat.enrichments.indicator.file.created`*:: -+ --- -File creation time. -Note that not all filesystems store the creation time. - -type: date - --- - -*`threat.enrichments.indicator.file.ctime`*:: -+ --- -Last time the file attributes or metadata changed. -Note that changes to the file content will update `mtime`. This implies `ctime` will be adjusted at the same time, since `mtime` is an attribute of the file. - -type: date - --- - -*`threat.enrichments.indicator.file.device`*:: -+ --- -Device that is the source of the file. - -type: keyword - -example: sda - --- - -*`threat.enrichments.indicator.file.directory`*:: -+ --- -Directory where the file is located. It should include the drive letter, when appropriate. - -type: keyword - -example: /home/alice - --- - -*`threat.enrichments.indicator.file.drive_letter`*:: -+ --- -Drive letter where the file is located. This field is only relevant on Windows. -The value should be uppercase, and not include the colon. - -type: keyword - -example: C - --- - -*`threat.enrichments.indicator.file.elf.architecture`*:: -+ --- -Machine architecture of the ELF file. - -type: keyword - -example: x86-64 - --- - -*`threat.enrichments.indicator.file.elf.byte_order`*:: -+ --- -Byte sequence of ELF file. - -type: keyword - -example: Little Endian - --- - -*`threat.enrichments.indicator.file.elf.cpu_type`*:: -+ --- -CPU type of the ELF file. - -type: keyword - -example: Intel - --- - -*`threat.enrichments.indicator.file.elf.creation_date`*:: -+ --- -Extracted when possible from the file's metadata. Indicates when it was built or compiled. It can also be faked by malware creators. - -type: date - --- - -*`threat.enrichments.indicator.file.elf.exports`*:: -+ --- -List of exported element names and types. - -type: flattened - --- - -*`threat.enrichments.indicator.file.elf.header.abi_version`*:: -+ --- -Version of the ELF Application Binary Interface (ABI). - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.header.class`*:: -+ --- -Header class of the ELF file. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.header.data`*:: -+ --- -Data table of the ELF header. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.header.entrypoint`*:: -+ --- -Header entrypoint of the ELF file. - -type: long - -format: string - --- - -*`threat.enrichments.indicator.file.elf.header.object_version`*:: -+ --- -"0x1" for original ELF files. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.header.os_abi`*:: -+ --- -Application Binary Interface (ABI) of the Linux OS. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.header.type`*:: -+ --- -Header type of the ELF file. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.header.version`*:: -+ --- -Version of the ELF header. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.imports`*:: -+ --- -List of imported element names and types. - -type: flattened - --- - -*`threat.enrichments.indicator.file.elf.sections`*:: -+ --- -An array containing an object for each section of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.sections.*`. - -type: nested - --- - -*`threat.enrichments.indicator.file.elf.sections.chi2`*:: -+ --- -Chi-square probability distribution of the section. - -type: long - -format: number - --- - -*`threat.enrichments.indicator.file.elf.sections.entropy`*:: -+ --- -Shannon entropy calculation from the section. - -type: long - -format: number - --- - -*`threat.enrichments.indicator.file.elf.sections.flags`*:: -+ --- -ELF Section List flags. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.sections.name`*:: -+ --- -ELF Section List name. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.sections.physical_offset`*:: -+ --- -ELF Section List offset. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.sections.physical_size`*:: -+ --- -ELF Section List physical size. - -type: long - -format: bytes - --- - -*`threat.enrichments.indicator.file.elf.sections.type`*:: -+ --- -ELF Section List type. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.sections.virtual_address`*:: -+ --- -ELF Section List virtual address. - -type: long - -format: string - --- - -*`threat.enrichments.indicator.file.elf.sections.virtual_size`*:: -+ --- -ELF Section List virtual size. - -type: long - -format: string - --- - -*`threat.enrichments.indicator.file.elf.segments`*:: -+ --- -An array containing an object for each segment of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.segments.*`. - -type: nested - --- - -*`threat.enrichments.indicator.file.elf.segments.sections`*:: -+ --- -ELF object segment sections. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.segments.type`*:: -+ --- -ELF object segment type. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.shared_libraries`*:: -+ --- -List of shared libraries used by this ELF object. - -type: keyword - --- - -*`threat.enrichments.indicator.file.elf.telfhash`*:: -+ --- -telfhash symbol hash for ELF file. - -type: keyword - --- - -*`threat.enrichments.indicator.file.extension`*:: -+ --- -File extension, excluding the leading dot. -Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz"). - -type: keyword - -example: png - --- - -*`threat.enrichments.indicator.file.fork_name`*:: -+ --- -A fork is additional data associated with a filesystem object. -On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at least one fork for the data portion, and additional forks may exist. -On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. An ADS is typically of the form: `C:\path\to\filename.extension:some_fork_name`, and `some_fork_name` is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name. - -type: keyword - -example: Zone.Identifer - --- - -*`threat.enrichments.indicator.file.gid`*:: -+ --- -Primary group ID (GID) of the file. - -type: keyword - -example: 1001 - --- - -*`threat.enrichments.indicator.file.group`*:: -+ --- -Primary group name of the file. - -type: keyword - -example: alice - --- - -*`threat.enrichments.indicator.file.hash.md5`*:: -+ --- -MD5 hash. - -type: keyword - --- - -*`threat.enrichments.indicator.file.hash.sha1`*:: -+ --- -SHA1 hash. - -type: keyword - --- - -*`threat.enrichments.indicator.file.hash.sha256`*:: -+ --- -SHA256 hash. - -type: keyword - --- - -*`threat.enrichments.indicator.file.hash.sha512`*:: -+ --- -SHA512 hash. - -type: keyword - --- - -*`threat.enrichments.indicator.file.hash.ssdeep`*:: -+ --- -SSDEEP hash. - -type: keyword - --- - -*`threat.enrichments.indicator.file.inode`*:: -+ --- -Inode representing the file in the filesystem. - -type: keyword - -example: 256383 - --- - -*`threat.enrichments.indicator.file.mime_type`*:: -+ --- -MIME type should identify the format of the file or stream of bytes using https://www.iana.org/assignments/media-types/media-types.xhtml[IANA official types], where possible. When more than one type is applicable, the most specific type should be used. - -type: keyword - --- - -*`threat.enrichments.indicator.file.mode`*:: -+ --- -Mode of the file in octal representation. - -type: keyword - -example: 0640 - --- - -*`threat.enrichments.indicator.file.mtime`*:: -+ --- -Last time the file content was modified. - -type: date - --- - -*`threat.enrichments.indicator.file.name`*:: -+ --- -Name of the file including the extension, without the directory. - -type: keyword - -example: example.png - --- - -*`threat.enrichments.indicator.file.owner`*:: -+ --- -File owner's username. - -type: keyword - -example: alice - --- - -*`threat.enrichments.indicator.file.path`*:: -+ --- -Full path to the file, including the file name. It should include the drive letter, when appropriate. - -type: keyword - -example: /home/alice/example.png - --- - -*`threat.enrichments.indicator.file.path.text`*:: -+ --- -type: match_only_text - --- - -*`threat.enrichments.indicator.file.pe.architecture`*:: -+ --- -CPU architecture target for the file. - -type: keyword - -example: x64 - --- - -*`threat.enrichments.indicator.file.pe.company`*:: -+ --- -Internal company name of the file, provided at compile-time. - -type: keyword - -example: Microsoft Corporation - --- - -*`threat.enrichments.indicator.file.pe.description`*:: -+ --- -Internal description of the file, provided at compile-time. - -type: keyword - -example: Paint - --- - -*`threat.enrichments.indicator.file.pe.file_version`*:: -+ --- -Internal version of the file, provided at compile-time. - -type: keyword - -example: 6.3.9600.17415 - --- - -*`threat.enrichments.indicator.file.pe.imphash`*:: -+ --- -A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values. -Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html. - -type: keyword - -example: 0c6803c4e922103c4dca5963aad36ddf - --- - -*`threat.enrichments.indicator.file.pe.original_file_name`*:: -+ --- -Internal name of the file, provided at compile-time. - -type: keyword - -example: MSPAINT.EXE - --- - -*`threat.enrichments.indicator.file.pe.product`*:: -+ --- -Internal product name of the file, provided at compile-time. - -type: keyword - -example: Microsoft® Windows® Operating System - --- - -*`threat.enrichments.indicator.file.size`*:: -+ --- -File size in bytes. -Only relevant when `file.type` is "file". - -type: long - -example: 16384 - --- - -*`threat.enrichments.indicator.file.target_path`*:: -+ --- -Target path for symlinks. - -type: keyword - --- - -*`threat.enrichments.indicator.file.target_path.text`*:: -+ --- -type: match_only_text - --- - -*`threat.enrichments.indicator.file.type`*:: -+ --- -File type (file, dir, or symlink). - -type: keyword - -example: file - --- - -*`threat.enrichments.indicator.file.uid`*:: -+ --- -The user ID (UID) or security identifier (SID) of the file owner. - -type: keyword - -example: 1001 - --- - -*`threat.enrichments.indicator.file.x509.alternative_names`*:: -+ --- -List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses. - -type: keyword - -example: *.elastic.co - --- - -*`threat.enrichments.indicator.file.x509.issuer.common_name`*:: -+ --- -List of common name (CN) of issuing certificate authority. - -type: keyword - -example: Example SHA2 High Assurance Server CA - --- - -*`threat.enrichments.indicator.file.x509.issuer.country`*:: -+ --- -List of country (C) codes - -type: keyword - -example: US - --- - -*`threat.enrichments.indicator.file.x509.issuer.distinguished_name`*:: -+ --- -Distinguished name (DN) of issuing certificate authority. - -type: keyword - -example: C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA - --- - -*`threat.enrichments.indicator.file.x509.issuer.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: Mountain View - --- - -*`threat.enrichments.indicator.file.x509.issuer.organization`*:: -+ --- -List of organizations (O) of issuing certificate authority. - -type: keyword - -example: Example Inc - --- - -*`threat.enrichments.indicator.file.x509.issuer.organizational_unit`*:: -+ --- -List of organizational units (OU) of issuing certificate authority. - -type: keyword - -example: www.example.com - --- - -*`threat.enrichments.indicator.file.x509.issuer.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`threat.enrichments.indicator.file.x509.not_after`*:: -+ --- -Time at which the certificate is no longer considered valid. - -type: date - -example: 2020-07-16 03:15:39+00:00 - --- - -*`threat.enrichments.indicator.file.x509.not_before`*:: -+ --- -Time at which the certificate is first considered valid. - -type: date - -example: 2019-08-16 01:40:25+00:00 - --- - -*`threat.enrichments.indicator.file.x509.public_key_algorithm`*:: -+ --- -Algorithm used to generate the public key. - -type: keyword - -example: RSA - --- - -*`threat.enrichments.indicator.file.x509.public_key_curve`*:: -+ --- -The curve used by the elliptic curve public key algorithm. This is algorithm specific. - -type: keyword - -example: nistp521 - --- - -*`threat.enrichments.indicator.file.x509.public_key_exponent`*:: -+ --- -Exponent used to derive the public key. This is algorithm specific. - -type: long - -example: 65537 - -Field is not indexed. - --- - -*`threat.enrichments.indicator.file.x509.public_key_size`*:: -+ --- -The size of the public key space in bits. - -type: long - -example: 2048 - --- - -*`threat.enrichments.indicator.file.x509.serial_number`*:: -+ --- -Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters. - -type: keyword - -example: 55FBB9C7DEBF09809D12CCAA - --- - -*`threat.enrichments.indicator.file.x509.signature_algorithm`*:: -+ --- -Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353. - -type: keyword - -example: SHA256-RSA - --- - -*`threat.enrichments.indicator.file.x509.subject.common_name`*:: -+ --- -List of common names (CN) of subject. - -type: keyword - -example: shared.global.example.net - --- - -*`threat.enrichments.indicator.file.x509.subject.country`*:: -+ --- -List of country (C) code - -type: keyword - -example: US - --- - -*`threat.enrichments.indicator.file.x509.subject.distinguished_name`*:: -+ --- -Distinguished name (DN) of the certificate subject entity. - -type: keyword - -example: C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net - --- - -*`threat.enrichments.indicator.file.x509.subject.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: San Francisco - --- - -*`threat.enrichments.indicator.file.x509.subject.organization`*:: -+ --- -List of organizations (O) of subject. - -type: keyword - -example: Example, Inc. - --- - -*`threat.enrichments.indicator.file.x509.subject.organizational_unit`*:: -+ --- -List of organizational units (OU) of subject. - -type: keyword - --- - -*`threat.enrichments.indicator.file.x509.subject.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`threat.enrichments.indicator.file.x509.version_number`*:: -+ --- -Version of x509 format. - -type: keyword - -example: 3 - --- - -*`threat.enrichments.indicator.first_seen`*:: -+ --- -The date and time when intelligence source first reported sighting this indicator. - -type: date - -example: 2020-11-05T17:25:47.000Z - --- - -*`threat.enrichments.indicator.geo.city_name`*:: -+ --- -City name. - -type: keyword - -example: Montreal - --- - -*`threat.enrichments.indicator.geo.continent_code`*:: -+ --- -Two-letter code representing continent's name. - -type: keyword - -example: NA - --- - -*`threat.enrichments.indicator.geo.continent_name`*:: -+ --- -Name of the continent. - -type: keyword - -example: North America - --- - -*`threat.enrichments.indicator.geo.country_iso_code`*:: -+ --- -Country ISO code. - -type: keyword - -example: CA - --- - -*`threat.enrichments.indicator.geo.country_name`*:: -+ --- -Country name. - -type: keyword - -example: Canada - --- - -*`threat.enrichments.indicator.geo.location`*:: -+ --- -Longitude and latitude. - -type: geo_point - -example: { "lon": -73.614830, "lat": 45.505918 } - --- - -*`threat.enrichments.indicator.geo.name`*:: -+ --- -User-defined description of a location, at the level of granularity they care about. -Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. -Not typically used in automated geolocation. - -type: keyword - -example: boston-dc - --- - -*`threat.enrichments.indicator.geo.postal_code`*:: -+ --- -Postal code associated with the location. -Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. - -type: keyword - -example: 94040 - --- - -*`threat.enrichments.indicator.geo.region_iso_code`*:: -+ --- -Region ISO code. - -type: keyword - -example: CA-QC - --- - -*`threat.enrichments.indicator.geo.region_name`*:: -+ --- -Region name. - -type: keyword - -example: Quebec - --- - -*`threat.enrichments.indicator.geo.timezone`*:: -+ --- -The time zone of the location, such as IANA time zone name. - -type: keyword - -example: America/Argentina/Buenos_Aires - --- - -*`threat.enrichments.indicator.ip`*:: -+ --- -Identifies a threat indicator as an IP address (irrespective of direction). - -type: ip - -example: 1.2.3.4 - --- - -*`threat.enrichments.indicator.last_seen`*:: -+ --- -The date and time when intelligence source last reported sighting this indicator. - -type: date - -example: 2020-11-05T17:25:47.000Z - --- - -*`threat.enrichments.indicator.marking.tlp`*:: -+ --- -Traffic Light Protocol sharing markings. Recommended values are: - * WHITE - * GREEN - * AMBER - * RED - -type: keyword - -example: White - --- - -*`threat.enrichments.indicator.modified_at`*:: -+ --- -The date and time when intelligence source last modified information for this indicator. - -type: date - -example: 2020-11-05T17:25:47.000Z - --- - -*`threat.enrichments.indicator.port`*:: -+ --- -Identifies a threat indicator as a port number (irrespective of direction). - -type: long - -example: 443 - --- - -*`threat.enrichments.indicator.provider`*:: -+ --- -The name of the indicator's provider. - -type: keyword - -example: lrz_urlhaus - --- - -*`threat.enrichments.indicator.reference`*:: -+ --- -Reference URL linking to additional information about this indicator. - -type: keyword - -example: https://system.example.com/indicator/0001234 - --- - -*`threat.enrichments.indicator.registry.data.bytes`*:: -+ --- -Original bytes written with base64 encoding. -For Windows registry operations, such as SetValueEx and RegQueryValueEx, this corresponds to the data pointed by `lp_data`. This is optional but provides better recoverability and should be populated for REG_BINARY encoded values. - -type: keyword - -example: ZQBuAC0AVQBTAAAAZQBuAAAAAAA= - --- - -*`threat.enrichments.indicator.registry.data.strings`*:: -+ --- -Content when writing string types. -Populated as an array when writing string data to the registry. For single string registry types (REG_SZ, REG_EXPAND_SZ), this should be an array with one string. For sequences of string with REG_MULTI_SZ, this array will be variable length. For numeric data, such as REG_DWORD and REG_QWORD, this should be populated with the decimal representation (e.g `"1"`). - -type: wildcard - -example: ["C:\rta\red_ttp\bin\myapp.exe"] - --- - -*`threat.enrichments.indicator.registry.data.type`*:: -+ --- -Standard registry type for encoding contents - -type: keyword - -example: REG_SZ - --- - -*`threat.enrichments.indicator.registry.hive`*:: -+ --- -Abbreviated name for the hive. - -type: keyword - -example: HKLM - --- - -*`threat.enrichments.indicator.registry.key`*:: -+ --- -Hive-relative path of keys. - -type: keyword - -example: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe - --- - -*`threat.enrichments.indicator.registry.path`*:: -+ --- -Full path, including hive, key and value - -type: keyword - -example: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe\Debugger - --- - -*`threat.enrichments.indicator.registry.value`*:: -+ --- -Name of the value written. - -type: keyword - -example: Debugger - --- - -*`threat.enrichments.indicator.scanner_stats`*:: -+ --- -Count of AV/EDR vendors that successfully detected malicious file or URL. - -type: long - -example: 4 - --- - -*`threat.enrichments.indicator.sightings`*:: -+ --- -Number of times this indicator was observed conducting threat activity. - -type: long - -example: 20 - --- - -*`threat.enrichments.indicator.type`*:: -+ --- -Type of indicator as represented by Cyber Observable in STIX 2.0. Recommended values: - * autonomous-system - * artifact - * directory - * domain-name - * email-addr - * file - * ipv4-addr - * ipv6-addr - * mac-addr - * mutex - * port - * process - * software - * url - * user-account - * windows-registry-key - * x509-certificate - -type: keyword - -example: ipv4-addr - --- - -*`threat.enrichments.indicator.url.domain`*:: -+ --- -Domain of the url, such as "www.elastic.co". -In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the `domain` field. -If the URL contains a literal IPv6 address enclosed by `[` and `]` (IETF RFC 2732), the `[` and `]` characters should also be captured in the `domain` field. - -type: keyword - -example: www.elastic.co - --- - -*`threat.enrichments.indicator.url.extension`*:: -+ --- -The field contains the file extension from the original request url, excluding the leading dot. -The file extension is only set if it exists, as not every url has a file extension. -The leading period must not be included. For example, the value must be "png", not ".png". -Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz"). - -type: keyword - -example: png - --- - -*`threat.enrichments.indicator.url.fragment`*:: -+ --- -Portion of the url after the `#`, such as "top". -The `#` is not part of the fragment. - -type: keyword - --- - -*`threat.enrichments.indicator.url.full`*:: -+ --- -If full URLs are important to your use case, they should be stored in `url.full`, whether this field is reconstructed or present in the event source. - -type: wildcard - -example: https://www.elastic.co:443/search?q=elasticsearch#top - --- - -*`threat.enrichments.indicator.url.full.text`*:: -+ --- -type: match_only_text - --- - -*`threat.enrichments.indicator.url.original`*:: -+ --- -Unmodified original url as seen in the event source. -Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path. -This field is meant to represent the URL as it was observed, complete or not. - -type: wildcard - -example: https://www.elastic.co:443/search?q=elasticsearch#top or /search?q=elasticsearch - --- - -*`threat.enrichments.indicator.url.original.text`*:: -+ --- -type: match_only_text - --- - -*`threat.enrichments.indicator.url.password`*:: -+ --- -Password of the request. - -type: keyword - --- - -*`threat.enrichments.indicator.url.path`*:: -+ --- -Path of the request, such as "/search". - -type: wildcard - --- - -*`threat.enrichments.indicator.url.port`*:: -+ --- -Port of the request, such as 443. - -type: long - -example: 443 - -format: string - --- - -*`threat.enrichments.indicator.url.query`*:: -+ --- -The query field describes the query string of the request, such as "q=elasticsearch". -The `?` is excluded from the query string. If a URL contains no `?`, there is no query field. If there is a `?` but no query, the query field exists with an empty string. The `exists` query can be used to differentiate between the two cases. - -type: keyword - --- - -*`threat.enrichments.indicator.url.registered_domain`*:: -+ --- -The highest registered url domain, stripped of the subdomain. -For example, the registered domain for "foo.example.com" is "example.com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk". - -type: keyword - -example: example.com - --- - -*`threat.enrichments.indicator.url.scheme`*:: -+ --- -Scheme of the request, such as "https". -Note: The `:` is not part of the scheme. - -type: keyword - -example: https - --- - -*`threat.enrichments.indicator.url.subdomain`*:: -+ --- -The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain. -For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period. - -type: keyword - -example: east - --- - -*`threat.enrichments.indicator.url.top_level_domain`*:: -+ --- -The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk". - -type: keyword - -example: co.uk - --- - -*`threat.enrichments.indicator.url.username`*:: -+ --- -Username of the request. - -type: keyword - --- - -*`threat.enrichments.indicator.x509.alternative_names`*:: -+ --- -List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses. - -type: keyword - -example: *.elastic.co - --- - -*`threat.enrichments.indicator.x509.issuer.common_name`*:: -+ --- -List of common name (CN) of issuing certificate authority. - -type: keyword - -example: Example SHA2 High Assurance Server CA - --- - -*`threat.enrichments.indicator.x509.issuer.country`*:: -+ --- -List of country (C) codes - -type: keyword - -example: US - --- - -*`threat.enrichments.indicator.x509.issuer.distinguished_name`*:: -+ --- -Distinguished name (DN) of issuing certificate authority. - -type: keyword - -example: C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA - --- - -*`threat.enrichments.indicator.x509.issuer.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: Mountain View - --- - -*`threat.enrichments.indicator.x509.issuer.organization`*:: -+ --- -List of organizations (O) of issuing certificate authority. - -type: keyword - -example: Example Inc - --- - -*`threat.enrichments.indicator.x509.issuer.organizational_unit`*:: -+ --- -List of organizational units (OU) of issuing certificate authority. - -type: keyword - -example: www.example.com - --- - -*`threat.enrichments.indicator.x509.issuer.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`threat.enrichments.indicator.x509.not_after`*:: -+ --- -Time at which the certificate is no longer considered valid. - -type: date - -example: 2020-07-16 03:15:39+00:00 - --- - -*`threat.enrichments.indicator.x509.not_before`*:: -+ --- -Time at which the certificate is first considered valid. - -type: date - -example: 2019-08-16 01:40:25+00:00 - --- - -*`threat.enrichments.indicator.x509.public_key_algorithm`*:: -+ --- -Algorithm used to generate the public key. - -type: keyword - -example: RSA - --- - -*`threat.enrichments.indicator.x509.public_key_curve`*:: -+ --- -The curve used by the elliptic curve public key algorithm. This is algorithm specific. - -type: keyword - -example: nistp521 - --- - -*`threat.enrichments.indicator.x509.public_key_exponent`*:: -+ --- -Exponent used to derive the public key. This is algorithm specific. - -type: long - -example: 65537 - -Field is not indexed. - --- - -*`threat.enrichments.indicator.x509.public_key_size`*:: -+ --- -The size of the public key space in bits. - -type: long - -example: 2048 - --- - -*`threat.enrichments.indicator.x509.serial_number`*:: -+ --- -Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters. - -type: keyword - -example: 55FBB9C7DEBF09809D12CCAA - --- - -*`threat.enrichments.indicator.x509.signature_algorithm`*:: -+ --- -Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353. - -type: keyword - -example: SHA256-RSA - --- - -*`threat.enrichments.indicator.x509.subject.common_name`*:: -+ --- -List of common names (CN) of subject. - -type: keyword - -example: shared.global.example.net - --- - -*`threat.enrichments.indicator.x509.subject.country`*:: -+ --- -List of country (C) code - -type: keyword - -example: US - --- - -*`threat.enrichments.indicator.x509.subject.distinguished_name`*:: -+ --- -Distinguished name (DN) of the certificate subject entity. - -type: keyword - -example: C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net - --- - -*`threat.enrichments.indicator.x509.subject.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: San Francisco - --- - -*`threat.enrichments.indicator.x509.subject.organization`*:: -+ --- -List of organizations (O) of subject. - -type: keyword - -example: Example, Inc. - --- - -*`threat.enrichments.indicator.x509.subject.organizational_unit`*:: -+ --- -List of organizational units (OU) of subject. - -type: keyword - --- - -*`threat.enrichments.indicator.x509.subject.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`threat.enrichments.indicator.x509.version_number`*:: -+ --- -Version of x509 format. - -type: keyword - -example: 3 - --- - -*`threat.enrichments.matched.atomic`*:: -+ --- -Identifies the atomic indicator value that matched a local environment endpoint or network event. - -type: keyword - -example: bad-domain.com - --- - -*`threat.enrichments.matched.field`*:: -+ --- -Identifies the field of the atomic indicator that matched a local environment endpoint or network event. - -type: keyword - -example: file.hash.sha256 - --- - -*`threat.enrichments.matched.id`*:: -+ --- -Identifies the _id of the indicator document enriching the event. - -type: keyword - -example: ff93aee5-86a1-4a61-b0e6-0cdc313d01b5 - --- - -*`threat.enrichments.matched.index`*:: -+ --- -Identifies the _index of the indicator document enriching the event. - -type: keyword - -example: filebeat-8.0.0-2021.05.23-000011 - --- - -*`threat.enrichments.matched.type`*:: -+ --- -Identifies the type of match that caused the event to be enriched with the given indicator - -type: keyword - -example: indicator_match_rule - --- - -*`threat.framework`*:: -+ --- -Name of the threat framework used to further categorize and classify the tactic and technique of the reported threat. Framework classification can be provided by detecting systems, evaluated at ingest time, or retrospectively tagged to events. - -type: keyword - -example: MITRE ATT&CK - --- - -*`threat.group.alias`*:: -+ --- -The alias(es) of the group for a set of related intrusion activity that are tracked by a common name in the security community. -While not required, you can use a MITRE ATT&CK® group alias(es). - -type: keyword - -example: [ "Magecart Group 6" ] - --- - -*`threat.group.id`*:: -+ --- -The id of the group for a set of related intrusion activity that are tracked by a common name in the security community. -While not required, you can use a MITRE ATT&CK® group id. - -type: keyword - -example: G0037 - --- - -*`threat.group.name`*:: -+ --- -The name of the group for a set of related intrusion activity that are tracked by a common name in the security community. -While not required, you can use a MITRE ATT&CK® group name. - -type: keyword - -example: FIN6 - --- - -*`threat.group.reference`*:: -+ --- -The reference URL of the group for a set of related intrusion activity that are tracked by a common name in the security community. -While not required, you can use a MITRE ATT&CK® group reference URL. - -type: keyword - -example: https://attack.mitre.org/groups/G0037/ - --- - -*`threat.indicator.as.number`*:: -+ --- -Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. - -type: long - -example: 15169 - --- - -*`threat.indicator.as.organization.name`*:: -+ --- -Organization name. - -type: keyword - -example: Google LLC - --- - -*`threat.indicator.as.organization.name.text`*:: -+ --- -type: match_only_text - --- - -*`threat.indicator.confidence`*:: -+ --- -Identifies the vendor-neutral confidence rating using the None/Low/Medium/High scale defined in Appendix A of the STIX 2.1 framework. Vendor-specific confidence scales may be added as custom fields. -Expected values are: - * Not Specified - * None - * Low - * Medium - * High - -type: keyword - -example: Medium - --- - -*`threat.indicator.description`*:: -+ --- -Describes the type of action conducted by the threat. - -type: keyword - -example: IP x.x.x.x was observed delivering the Angler EK. - --- - -*`threat.indicator.email.address`*:: -+ --- -Identifies a threat indicator as an email address (irrespective of direction). - -type: keyword - -example: phish@example.com - --- - -*`threat.indicator.file.accessed`*:: -+ --- -Last time the file was accessed. -Note that not all filesystems keep track of access time. - -type: date - --- - -*`threat.indicator.file.attributes`*:: -+ --- -Array of file attributes. -Attributes names will vary by platform. Here's a non-exhaustive list of values that are expected in this field: archive, compressed, directory, encrypted, execute, hidden, read, readonly, system, write. - -type: keyword - -example: ["readonly", "system"] - --- - -*`threat.indicator.file.code_signature.digest_algorithm`*:: -+ --- -The hashing algorithm used to sign the process. -This value can distinguish signatures when a file is signed multiple times by the same signer but with a different digest algorithm. - -type: keyword - -example: sha256 - --- - -*`threat.indicator.file.code_signature.exists`*:: -+ --- -Boolean to capture if a signature is present. - -type: boolean - -example: true - --- - -*`threat.indicator.file.code_signature.signing_id`*:: -+ --- -The identifier used to sign the process. -This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only. - -type: keyword - -example: com.apple.xpc.proxy - --- - -*`threat.indicator.file.code_signature.status`*:: -+ --- -Additional information about the certificate status. -This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked. - -type: keyword - -example: ERROR_UNTRUSTED_ROOT - --- - -*`threat.indicator.file.code_signature.subject_name`*:: -+ --- -Subject name of the code signer - -type: keyword - -example: Microsoft Corporation - --- - -*`threat.indicator.file.code_signature.team_id`*:: -+ --- -The team identifier used to sign the process. -This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only. - -type: keyword - -example: EQHXZ8M8AV - --- - -*`threat.indicator.file.code_signature.timestamp`*:: -+ --- -Date and time when the code signature was generated and signed. - -type: date - -example: 2021-01-01T12:10:30Z - --- - -*`threat.indicator.file.code_signature.trusted`*:: -+ --- -Stores the trust status of the certificate chain. -Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status. - -type: boolean - -example: true - --- - -*`threat.indicator.file.code_signature.valid`*:: -+ --- -Boolean to capture if the digital signature is verified against the binary content. -Leave unpopulated if a certificate was unchecked. - -type: boolean - -example: true - --- - -*`threat.indicator.file.created`*:: -+ --- -File creation time. -Note that not all filesystems store the creation time. - -type: date - --- - -*`threat.indicator.file.ctime`*:: -+ --- -Last time the file attributes or metadata changed. -Note that changes to the file content will update `mtime`. This implies `ctime` will be adjusted at the same time, since `mtime` is an attribute of the file. - -type: date - --- - -*`threat.indicator.file.device`*:: -+ --- -Device that is the source of the file. - -type: keyword - -example: sda - --- - -*`threat.indicator.file.directory`*:: -+ --- -Directory where the file is located. It should include the drive letter, when appropriate. - -type: keyword - -example: /home/alice - --- - -*`threat.indicator.file.drive_letter`*:: -+ --- -Drive letter where the file is located. This field is only relevant on Windows. -The value should be uppercase, and not include the colon. - -type: keyword - -example: C - --- - -*`threat.indicator.file.elf.architecture`*:: -+ --- -Machine architecture of the ELF file. - -type: keyword - -example: x86-64 - --- - -*`threat.indicator.file.elf.byte_order`*:: -+ --- -Byte sequence of ELF file. - -type: keyword - -example: Little Endian - --- - -*`threat.indicator.file.elf.cpu_type`*:: -+ --- -CPU type of the ELF file. - -type: keyword - -example: Intel - --- - -*`threat.indicator.file.elf.creation_date`*:: -+ --- -Extracted when possible from the file's metadata. Indicates when it was built or compiled. It can also be faked by malware creators. - -type: date - --- - -*`threat.indicator.file.elf.exports`*:: -+ --- -List of exported element names and types. - -type: flattened - --- - -*`threat.indicator.file.elf.header.abi_version`*:: -+ --- -Version of the ELF Application Binary Interface (ABI). - -type: keyword - --- - -*`threat.indicator.file.elf.header.class`*:: -+ --- -Header class of the ELF file. - -type: keyword - --- - -*`threat.indicator.file.elf.header.data`*:: -+ --- -Data table of the ELF header. - -type: keyword - --- - -*`threat.indicator.file.elf.header.entrypoint`*:: -+ --- -Header entrypoint of the ELF file. - -type: long - -format: string - --- - -*`threat.indicator.file.elf.header.object_version`*:: -+ --- -"0x1" for original ELF files. - -type: keyword - --- - -*`threat.indicator.file.elf.header.os_abi`*:: -+ --- -Application Binary Interface (ABI) of the Linux OS. - -type: keyword - --- - -*`threat.indicator.file.elf.header.type`*:: -+ --- -Header type of the ELF file. - -type: keyword - --- - -*`threat.indicator.file.elf.header.version`*:: -+ --- -Version of the ELF header. - -type: keyword - --- - -*`threat.indicator.file.elf.imports`*:: -+ --- -List of imported element names and types. - -type: flattened - --- - -*`threat.indicator.file.elf.sections`*:: -+ --- -An array containing an object for each section of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.sections.*`. - -type: nested - --- - -*`threat.indicator.file.elf.sections.chi2`*:: -+ --- -Chi-square probability distribution of the section. - -type: long - -format: number - --- - -*`threat.indicator.file.elf.sections.entropy`*:: -+ --- -Shannon entropy calculation from the section. - -type: long - -format: number - --- - -*`threat.indicator.file.elf.sections.flags`*:: -+ --- -ELF Section List flags. - -type: keyword - --- - -*`threat.indicator.file.elf.sections.name`*:: -+ --- -ELF Section List name. - -type: keyword - --- - -*`threat.indicator.file.elf.sections.physical_offset`*:: -+ --- -ELF Section List offset. - -type: keyword - --- - -*`threat.indicator.file.elf.sections.physical_size`*:: -+ --- -ELF Section List physical size. - -type: long - -format: bytes - --- - -*`threat.indicator.file.elf.sections.type`*:: -+ --- -ELF Section List type. - -type: keyword - --- - -*`threat.indicator.file.elf.sections.virtual_address`*:: -+ --- -ELF Section List virtual address. - -type: long - -format: string - --- - -*`threat.indicator.file.elf.sections.virtual_size`*:: -+ --- -ELF Section List virtual size. - -type: long - -format: string - --- - -*`threat.indicator.file.elf.segments`*:: -+ --- -An array containing an object for each segment of the ELF file. -The keys that should be present in these objects are defined by sub-fields underneath `elf.segments.*`. - -type: nested - --- - -*`threat.indicator.file.elf.segments.sections`*:: -+ --- -ELF object segment sections. - -type: keyword - --- - -*`threat.indicator.file.elf.segments.type`*:: -+ --- -ELF object segment type. - -type: keyword - --- - -*`threat.indicator.file.elf.shared_libraries`*:: -+ --- -List of shared libraries used by this ELF object. - -type: keyword - --- - -*`threat.indicator.file.elf.telfhash`*:: -+ --- -telfhash symbol hash for ELF file. - -type: keyword - --- - -*`threat.indicator.file.extension`*:: -+ --- -File extension, excluding the leading dot. -Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz"). - -type: keyword - -example: png - --- - -*`threat.indicator.file.fork_name`*:: -+ --- -A fork is additional data associated with a filesystem object. -On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at least one fork for the data portion, and additional forks may exist. -On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. An ADS is typically of the form: `C:\path\to\filename.extension:some_fork_name`, and `some_fork_name` is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name. - -type: keyword - -example: Zone.Identifer - --- - -*`threat.indicator.file.gid`*:: -+ --- -Primary group ID (GID) of the file. - -type: keyword - -example: 1001 - --- - -*`threat.indicator.file.group`*:: -+ --- -Primary group name of the file. - -type: keyword - -example: alice - --- - -*`threat.indicator.file.hash.md5`*:: -+ --- -MD5 hash. - -type: keyword - --- - -*`threat.indicator.file.hash.sha1`*:: -+ --- -SHA1 hash. - -type: keyword - --- - -*`threat.indicator.file.hash.sha256`*:: -+ --- -SHA256 hash. - -type: keyword - --- - -*`threat.indicator.file.hash.sha512`*:: -+ --- -SHA512 hash. - -type: keyword - --- - -*`threat.indicator.file.hash.ssdeep`*:: -+ --- -SSDEEP hash. - -type: keyword - --- - -*`threat.indicator.file.inode`*:: -+ --- -Inode representing the file in the filesystem. - -type: keyword - -example: 256383 - --- - -*`threat.indicator.file.mime_type`*:: -+ --- -MIME type should identify the format of the file or stream of bytes using https://www.iana.org/assignments/media-types/media-types.xhtml[IANA official types], where possible. When more than one type is applicable, the most specific type should be used. - -type: keyword - --- - -*`threat.indicator.file.mode`*:: -+ --- -Mode of the file in octal representation. - -type: keyword - -example: 0640 - --- - -*`threat.indicator.file.mtime`*:: -+ --- -Last time the file content was modified. - -type: date - --- - -*`threat.indicator.file.name`*:: -+ --- -Name of the file including the extension, without the directory. - -type: keyword - -example: example.png - --- - -*`threat.indicator.file.owner`*:: -+ --- -File owner's username. - -type: keyword - -example: alice - --- - -*`threat.indicator.file.path`*:: -+ --- -Full path to the file, including the file name. It should include the drive letter, when appropriate. - -type: keyword - -example: /home/alice/example.png - --- - -*`threat.indicator.file.path.text`*:: -+ --- -type: match_only_text - --- - -*`threat.indicator.file.pe.architecture`*:: -+ --- -CPU architecture target for the file. - -type: keyword - -example: x64 - --- - -*`threat.indicator.file.pe.company`*:: -+ --- -Internal company name of the file, provided at compile-time. - -type: keyword - -example: Microsoft Corporation - --- - -*`threat.indicator.file.pe.description`*:: -+ --- -Internal description of the file, provided at compile-time. - -type: keyword - -example: Paint - --- - -*`threat.indicator.file.pe.file_version`*:: -+ --- -Internal version of the file, provided at compile-time. - -type: keyword - -example: 6.3.9600.17415 - --- - -*`threat.indicator.file.pe.imphash`*:: -+ --- -A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values. -Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html. - -type: keyword - -example: 0c6803c4e922103c4dca5963aad36ddf - --- - -*`threat.indicator.file.pe.original_file_name`*:: -+ --- -Internal name of the file, provided at compile-time. - -type: keyword - -example: MSPAINT.EXE - --- - -*`threat.indicator.file.pe.product`*:: -+ --- -Internal product name of the file, provided at compile-time. - -type: keyword - -example: Microsoft® Windows® Operating System - --- - -*`threat.indicator.file.size`*:: -+ --- -File size in bytes. -Only relevant when `file.type` is "file". - -type: long - -example: 16384 - --- - -*`threat.indicator.file.target_path`*:: -+ --- -Target path for symlinks. - -type: keyword - --- - -*`threat.indicator.file.target_path.text`*:: -+ --- -type: match_only_text - --- - -*`threat.indicator.file.type`*:: -+ --- -File type (file, dir, or symlink). - -type: keyword - -example: file - --- - -*`threat.indicator.file.uid`*:: -+ --- -The user ID (UID) or security identifier (SID) of the file owner. - -type: keyword - -example: 1001 - --- - -*`threat.indicator.file.x509.alternative_names`*:: -+ --- -List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses. - -type: keyword - -example: *.elastic.co - --- - -*`threat.indicator.file.x509.issuer.common_name`*:: -+ --- -List of common name (CN) of issuing certificate authority. - -type: keyword - -example: Example SHA2 High Assurance Server CA - --- - -*`threat.indicator.file.x509.issuer.country`*:: -+ --- -List of country (C) codes - -type: keyword - -example: US - --- - -*`threat.indicator.file.x509.issuer.distinguished_name`*:: -+ --- -Distinguished name (DN) of issuing certificate authority. - -type: keyword - -example: C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA - --- - -*`threat.indicator.file.x509.issuer.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: Mountain View - --- - -*`threat.indicator.file.x509.issuer.organization`*:: -+ --- -List of organizations (O) of issuing certificate authority. - -type: keyword - -example: Example Inc - --- - -*`threat.indicator.file.x509.issuer.organizational_unit`*:: -+ --- -List of organizational units (OU) of issuing certificate authority. - -type: keyword - -example: www.example.com - --- - -*`threat.indicator.file.x509.issuer.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`threat.indicator.file.x509.not_after`*:: -+ --- -Time at which the certificate is no longer considered valid. - -type: date - -example: 2020-07-16 03:15:39+00:00 - --- - -*`threat.indicator.file.x509.not_before`*:: -+ --- -Time at which the certificate is first considered valid. - -type: date - -example: 2019-08-16 01:40:25+00:00 - --- - -*`threat.indicator.file.x509.public_key_algorithm`*:: -+ --- -Algorithm used to generate the public key. - -type: keyword - -example: RSA - --- - -*`threat.indicator.file.x509.public_key_curve`*:: -+ --- -The curve used by the elliptic curve public key algorithm. This is algorithm specific. - -type: keyword - -example: nistp521 - --- - -*`threat.indicator.file.x509.public_key_exponent`*:: -+ --- -Exponent used to derive the public key. This is algorithm specific. - -type: long - -example: 65537 - -Field is not indexed. - --- - -*`threat.indicator.file.x509.public_key_size`*:: -+ --- -The size of the public key space in bits. - -type: long - -example: 2048 - --- - -*`threat.indicator.file.x509.serial_number`*:: -+ --- -Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters. - -type: keyword - -example: 55FBB9C7DEBF09809D12CCAA - --- - -*`threat.indicator.file.x509.signature_algorithm`*:: -+ --- -Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353. - -type: keyword - -example: SHA256-RSA - --- - -*`threat.indicator.file.x509.subject.common_name`*:: -+ --- -List of common names (CN) of subject. - -type: keyword - -example: shared.global.example.net - --- - -*`threat.indicator.file.x509.subject.country`*:: -+ --- -List of country (C) code - -type: keyword - -example: US - --- - -*`threat.indicator.file.x509.subject.distinguished_name`*:: -+ --- -Distinguished name (DN) of the certificate subject entity. - -type: keyword - -example: C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net - --- - -*`threat.indicator.file.x509.subject.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: San Francisco - --- - -*`threat.indicator.file.x509.subject.organization`*:: -+ --- -List of organizations (O) of subject. - -type: keyword - -example: Example, Inc. - --- - -*`threat.indicator.file.x509.subject.organizational_unit`*:: -+ --- -List of organizational units (OU) of subject. - -type: keyword - --- - -*`threat.indicator.file.x509.subject.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`threat.indicator.file.x509.version_number`*:: -+ --- -Version of x509 format. - -type: keyword - -example: 3 - --- - -*`threat.indicator.first_seen`*:: -+ --- -The date and time when intelligence source first reported sighting this indicator. - -type: date - -example: 2020-11-05T17:25:47.000Z - --- - -*`threat.indicator.geo.city_name`*:: -+ --- -City name. - -type: keyword - -example: Montreal - --- - -*`threat.indicator.geo.continent_code`*:: -+ --- -Two-letter code representing continent's name. - -type: keyword - -example: NA - --- - -*`threat.indicator.geo.continent_name`*:: -+ --- -Name of the continent. - -type: keyword - -example: North America - --- - -*`threat.indicator.geo.country_iso_code`*:: -+ --- -Country ISO code. - -type: keyword - -example: CA - --- - -*`threat.indicator.geo.country_name`*:: -+ --- -Country name. - -type: keyword - -example: Canada - --- - -*`threat.indicator.geo.location`*:: -+ --- -Longitude and latitude. - -type: geo_point - -example: { "lon": -73.614830, "lat": 45.505918 } - --- - -*`threat.indicator.geo.name`*:: -+ --- -User-defined description of a location, at the level of granularity they care about. -Could be the name of their data centers, the floor number, if this describes a local physical entity, city names. -Not typically used in automated geolocation. - -type: keyword - -example: boston-dc - --- - -*`threat.indicator.geo.postal_code`*:: -+ --- -Postal code associated with the location. -Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. - -type: keyword - -example: 94040 - --- - -*`threat.indicator.geo.region_iso_code`*:: -+ --- -Region ISO code. - -type: keyword - -example: CA-QC - --- - -*`threat.indicator.geo.region_name`*:: -+ --- -Region name. - -type: keyword - -example: Quebec - --- - -*`threat.indicator.geo.timezone`*:: -+ --- -The time zone of the location, such as IANA time zone name. - -type: keyword - -example: America/Argentina/Buenos_Aires - --- - -*`threat.indicator.ip`*:: -+ --- -Identifies a threat indicator as an IP address (irrespective of direction). - -type: ip - -example: 1.2.3.4 - --- - -*`threat.indicator.last_seen`*:: -+ --- -The date and time when intelligence source last reported sighting this indicator. - -type: date - -example: 2020-11-05T17:25:47.000Z - --- - -*`threat.indicator.marking.tlp`*:: -+ --- -Traffic Light Protocol sharing markings. -Recommended values are: - * WHITE - * GREEN - * AMBER - * RED - -type: keyword - -example: WHITE - --- - -*`threat.indicator.modified_at`*:: -+ --- -The date and time when intelligence source last modified information for this indicator. - -type: date - -example: 2020-11-05T17:25:47.000Z - --- - -*`threat.indicator.port`*:: -+ --- -Identifies a threat indicator as a port number (irrespective of direction). - -type: long - -example: 443 - --- - -*`threat.indicator.provider`*:: -+ --- -The name of the indicator's provider. - -type: keyword - -example: lrz_urlhaus - --- - -*`threat.indicator.reference`*:: -+ --- -Reference URL linking to additional information about this indicator. - -type: keyword - -example: https://system.example.com/indicator/0001234 - --- - -*`threat.indicator.registry.data.bytes`*:: -+ --- -Original bytes written with base64 encoding. -For Windows registry operations, such as SetValueEx and RegQueryValueEx, this corresponds to the data pointed by `lp_data`. This is optional but provides better recoverability and should be populated for REG_BINARY encoded values. - -type: keyword - -example: ZQBuAC0AVQBTAAAAZQBuAAAAAAA= - --- - -*`threat.indicator.registry.data.strings`*:: -+ --- -Content when writing string types. -Populated as an array when writing string data to the registry. For single string registry types (REG_SZ, REG_EXPAND_SZ), this should be an array with one string. For sequences of string with REG_MULTI_SZ, this array will be variable length. For numeric data, such as REG_DWORD and REG_QWORD, this should be populated with the decimal representation (e.g `"1"`). - -type: wildcard - -example: ["C:\rta\red_ttp\bin\myapp.exe"] - --- - -*`threat.indicator.registry.data.type`*:: -+ --- -Standard registry type for encoding contents - -type: keyword - -example: REG_SZ - --- - -*`threat.indicator.registry.hive`*:: -+ --- -Abbreviated name for the hive. - -type: keyword - -example: HKLM - --- - -*`threat.indicator.registry.key`*:: -+ --- -Hive-relative path of keys. - -type: keyword - -example: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe - --- - -*`threat.indicator.registry.path`*:: -+ --- -Full path, including hive, key and value - -type: keyword - -example: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe\Debugger - --- - -*`threat.indicator.registry.value`*:: -+ --- -Name of the value written. - -type: keyword - -example: Debugger - --- - -*`threat.indicator.scanner_stats`*:: -+ --- -Count of AV/EDR vendors that successfully detected malicious file or URL. - -type: long - -example: 4 - --- - -*`threat.indicator.sightings`*:: -+ --- -Number of times this indicator was observed conducting threat activity. - -type: long - -example: 20 - --- - -*`threat.indicator.type`*:: -+ --- -Type of indicator as represented by Cyber Observable in STIX 2.0. -Recommended values: - * autonomous-system - * artifact - * directory - * domain-name - * email-addr - * file - * ipv4-addr - * ipv6-addr - * mac-addr - * mutex - * port - * process - * software - * url - * user-account - * windows-registry-key - * x509-certificate - -type: keyword - -example: ipv4-addr - --- - -*`threat.indicator.url.domain`*:: -+ --- -Domain of the url, such as "www.elastic.co". -In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the `domain` field. -If the URL contains a literal IPv6 address enclosed by `[` and `]` (IETF RFC 2732), the `[` and `]` characters should also be captured in the `domain` field. - -type: keyword - -example: www.elastic.co - --- - -*`threat.indicator.url.extension`*:: -+ --- -The field contains the file extension from the original request url, excluding the leading dot. -The file extension is only set if it exists, as not every url has a file extension. -The leading period must not be included. For example, the value must be "png", not ".png". -Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz"). - -type: keyword - -example: png - --- - -*`threat.indicator.url.fragment`*:: -+ --- -Portion of the url after the `#`, such as "top". -The `#` is not part of the fragment. - -type: keyword - --- - -*`threat.indicator.url.full`*:: -+ --- -If full URLs are important to your use case, they should be stored in `url.full`, whether this field is reconstructed or present in the event source. - -type: wildcard - -example: https://www.elastic.co:443/search?q=elasticsearch#top - --- - -*`threat.indicator.url.full.text`*:: -+ --- -type: match_only_text - --- - -*`threat.indicator.url.original`*:: -+ --- -Unmodified original url as seen in the event source. -Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path. -This field is meant to represent the URL as it was observed, complete or not. - -type: wildcard - -example: https://www.elastic.co:443/search?q=elasticsearch#top or /search?q=elasticsearch - --- - -*`threat.indicator.url.original.text`*:: -+ --- -type: match_only_text - --- - -*`threat.indicator.url.password`*:: -+ --- -Password of the request. - -type: keyword - --- - -*`threat.indicator.url.path`*:: -+ --- -Path of the request, such as "/search". - -type: wildcard - --- - -*`threat.indicator.url.port`*:: -+ --- -Port of the request, such as 443. - -type: long - -example: 443 - -format: string - --- - -*`threat.indicator.url.query`*:: -+ --- -The query field describes the query string of the request, such as "q=elasticsearch". -The `?` is excluded from the query string. If a URL contains no `?`, there is no query field. If there is a `?` but no query, the query field exists with an empty string. The `exists` query can be used to differentiate between the two cases. - -type: keyword - --- - -*`threat.indicator.url.registered_domain`*:: -+ --- -The highest registered url domain, stripped of the subdomain. -For example, the registered domain for "foo.example.com" is "example.com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk". - -type: keyword - -example: example.com - --- - -*`threat.indicator.url.scheme`*:: -+ --- -Scheme of the request, such as "https". -Note: The `:` is not part of the scheme. - -type: keyword - -example: https - --- - -*`threat.indicator.url.subdomain`*:: -+ --- -The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain. -For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period. - -type: keyword - -example: east - --- - -*`threat.indicator.url.top_level_domain`*:: -+ --- -The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk". - -type: keyword - -example: co.uk - --- - -*`threat.indicator.url.username`*:: -+ --- -Username of the request. - -type: keyword - --- - -*`threat.indicator.x509.alternative_names`*:: -+ --- -List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses. - -type: keyword - -example: *.elastic.co - --- - -*`threat.indicator.x509.issuer.common_name`*:: -+ --- -List of common name (CN) of issuing certificate authority. - -type: keyword - -example: Example SHA2 High Assurance Server CA - --- - -*`threat.indicator.x509.issuer.country`*:: -+ --- -List of country (C) codes - -type: keyword - -example: US - --- - -*`threat.indicator.x509.issuer.distinguished_name`*:: -+ --- -Distinguished name (DN) of issuing certificate authority. - -type: keyword - -example: C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA - --- - -*`threat.indicator.x509.issuer.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: Mountain View - --- - -*`threat.indicator.x509.issuer.organization`*:: -+ --- -List of organizations (O) of issuing certificate authority. - -type: keyword - -example: Example Inc - --- - -*`threat.indicator.x509.issuer.organizational_unit`*:: -+ --- -List of organizational units (OU) of issuing certificate authority. - -type: keyword - -example: www.example.com - --- - -*`threat.indicator.x509.issuer.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`threat.indicator.x509.not_after`*:: -+ --- -Time at which the certificate is no longer considered valid. - -type: date - -example: 2020-07-16 03:15:39+00:00 - --- - -*`threat.indicator.x509.not_before`*:: -+ --- -Time at which the certificate is first considered valid. - -type: date - -example: 2019-08-16 01:40:25+00:00 - --- - -*`threat.indicator.x509.public_key_algorithm`*:: -+ --- -Algorithm used to generate the public key. - -type: keyword - -example: RSA - --- - -*`threat.indicator.x509.public_key_curve`*:: -+ --- -The curve used by the elliptic curve public key algorithm. This is algorithm specific. - -type: keyword - -example: nistp521 - --- - -*`threat.indicator.x509.public_key_exponent`*:: -+ --- -Exponent used to derive the public key. This is algorithm specific. - -type: long - -example: 65537 - -Field is not indexed. - --- - -*`threat.indicator.x509.public_key_size`*:: -+ --- -The size of the public key space in bits. - -type: long - -example: 2048 - --- - -*`threat.indicator.x509.serial_number`*:: -+ --- -Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters. - -type: keyword - -example: 55FBB9C7DEBF09809D12CCAA - --- - -*`threat.indicator.x509.signature_algorithm`*:: -+ --- -Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353. - -type: keyword - -example: SHA256-RSA - --- - -*`threat.indicator.x509.subject.common_name`*:: -+ --- -List of common names (CN) of subject. - -type: keyword - -example: shared.global.example.net - --- - -*`threat.indicator.x509.subject.country`*:: -+ --- -List of country (C) code - -type: keyword - -example: US - --- - -*`threat.indicator.x509.subject.distinguished_name`*:: -+ --- -Distinguished name (DN) of the certificate subject entity. - -type: keyword - -example: C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net - --- - -*`threat.indicator.x509.subject.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: San Francisco - --- - -*`threat.indicator.x509.subject.organization`*:: -+ --- -List of organizations (O) of subject. - -type: keyword - -example: Example, Inc. - --- - -*`threat.indicator.x509.subject.organizational_unit`*:: -+ --- -List of organizational units (OU) of subject. - -type: keyword - --- - -*`threat.indicator.x509.subject.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`threat.indicator.x509.version_number`*:: -+ --- -Version of x509 format. - -type: keyword - -example: 3 - --- - -*`threat.software.alias`*:: -+ --- -The alias(es) of the software for a set of related intrusion activity that are tracked by a common name in the security community. -While not required, you can use a MITRE ATT&CK® associated software description. - -type: keyword - -example: [ "X-Agent" ] - --- - -*`threat.software.id`*:: -+ --- -The id of the software used by this threat to conduct behavior commonly modeled using MITRE ATT&CK®. -While not required, you can use a MITRE ATT&CK® software id. - -type: keyword - -example: S0552 - --- - -*`threat.software.name`*:: -+ --- -The name of the software used by this threat to conduct behavior commonly modeled using MITRE ATT&CK®. -While not required, you can use a MITRE ATT&CK® software name. - -type: keyword - -example: AdFind - --- - -*`threat.software.platforms`*:: -+ --- -The platforms of the software used by this threat to conduct behavior commonly modeled using MITRE ATT&CK®. -Recommended Values: - * AWS - * Azure - * Azure AD - * GCP - * Linux - * macOS - * Network - * Office 365 - * SaaS - * Windows - -While not required, you can use a MITRE ATT&CK® software platforms. - -type: keyword - -example: [ "Windows" ] - --- - -*`threat.software.reference`*:: -+ --- -The reference URL of the software used by this threat to conduct behavior commonly modeled using MITRE ATT&CK®. -While not required, you can use a MITRE ATT&CK® software reference URL. - -type: keyword - -example: https://attack.mitre.org/software/S0552/ - --- - -*`threat.software.type`*:: -+ --- -The type of software used by this threat to conduct behavior commonly modeled using MITRE ATT&CK®. -Recommended values - * Malware - * Tool - - While not required, you can use a MITRE ATT&CK® software type. - -type: keyword - -example: Tool - --- - -*`threat.tactic.id`*:: -+ --- -The id of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/ ) - -type: keyword - -example: TA0002 - --- - -*`threat.tactic.name`*:: -+ --- -Name of the type of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/) - -type: keyword - -example: Execution - --- - -*`threat.tactic.reference`*:: -+ --- -The reference url of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/ ) - -type: keyword - -example: https://attack.mitre.org/tactics/TA0002/ - --- - -*`threat.technique.id`*:: -+ --- -The id of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/) - -type: keyword - -example: T1059 - --- - -*`threat.technique.name`*:: -+ --- -The name of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/) - -type: keyword - -example: Command and Scripting Interpreter - --- - -*`threat.technique.name.text`*:: -+ --- -type: match_only_text - --- - -*`threat.technique.reference`*:: -+ --- -The reference url of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/) - -type: keyword - -example: https://attack.mitre.org/techniques/T1059/ - --- - -*`threat.technique.subtechnique.id`*:: -+ --- -The full id of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/) - -type: keyword - -example: T1059.001 - --- - -*`threat.technique.subtechnique.name`*:: -+ --- -The name of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/) - -type: keyword - -example: PowerShell - --- - -*`threat.technique.subtechnique.name.text`*:: -+ --- -type: match_only_text - --- - -*`threat.technique.subtechnique.reference`*:: -+ --- -The reference url of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/) - -type: keyword - -example: https://attack.mitre.org/techniques/T1059/001/ - --- - -[float] -=== tls - -Fields related to a TLS connection. These fields focus on the TLS protocol itself and intentionally avoids in-depth analysis of the related x.509 certificate files. - - -*`tls.cipher`*:: -+ --- -String indicating the cipher used during the current connection. - -type: keyword - -example: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - --- - -*`tls.client.certificate`*:: -+ --- -PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of `client.certificate_chain` since this value also exists in that list. - -type: keyword - -example: MII... - --- - -*`tls.client.certificate_chain`*:: -+ --- -Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of `client.certificate` since that value should be the first certificate in the chain. - -type: keyword - -example: ["MII...", "MII..."] - --- - -*`tls.client.hash.md5`*:: -+ --- -Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. - -type: keyword - -example: 0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC - --- - -*`tls.client.hash.sha1`*:: -+ --- -Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. - -type: keyword - -example: 9E393D93138888D288266C2D915214D1D1CCEB2A - --- - -*`tls.client.hash.sha256`*:: -+ --- -Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. - -type: keyword - -example: 0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0 - --- - -*`tls.client.issuer`*:: -+ --- -Distinguished name of subject of the issuer of the x.509 certificate presented by the client. - -type: keyword - -example: CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com - --- - -*`tls.client.ja3`*:: -+ --- -A hash that identifies clients based on how they perform an SSL/TLS handshake. - -type: keyword - -example: d4e5b18d6b55c71272893221c96ba240 - --- - -*`tls.client.not_after`*:: -+ --- -Date/Time indicating when client certificate is no longer considered valid. - -type: date - -example: 2021-01-01T00:00:00.000Z - --- - -*`tls.client.not_before`*:: -+ --- -Date/Time indicating when client certificate is first considered valid. - -type: date - -example: 1970-01-01T00:00:00.000Z - --- - -*`tls.client.server_name`*:: -+ --- -Also called an SNI, this tells the server which hostname to which the client is attempting to connect to. When this value is available, it should get copied to `destination.domain`. - -type: keyword - -example: www.elastic.co - --- - -*`tls.client.subject`*:: -+ --- -Distinguished name of subject of the x.509 certificate presented by the client. - -type: keyword - -example: CN=myclient, OU=Documentation Team, DC=example, DC=com - --- - -*`tls.client.supported_ciphers`*:: -+ --- -Array of ciphers offered by the client during the client hello. - -type: keyword - -example: ["TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."] - --- - -*`tls.client.x509.alternative_names`*:: -+ --- -List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses. - -type: keyword - -example: *.elastic.co - --- - -*`tls.client.x509.issuer.common_name`*:: -+ --- -List of common name (CN) of issuing certificate authority. - -type: keyword - -example: Example SHA2 High Assurance Server CA - --- - -*`tls.client.x509.issuer.country`*:: -+ --- -List of country (C) codes - -type: keyword - -example: US - --- - -*`tls.client.x509.issuer.distinguished_name`*:: -+ --- -Distinguished name (DN) of issuing certificate authority. - -type: keyword - -example: C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA - --- - -*`tls.client.x509.issuer.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: Mountain View - --- - -*`tls.client.x509.issuer.organization`*:: -+ --- -List of organizations (O) of issuing certificate authority. - -type: keyword - -example: Example Inc - --- - -*`tls.client.x509.issuer.organizational_unit`*:: -+ --- -List of organizational units (OU) of issuing certificate authority. - -type: keyword - -example: www.example.com - --- - -*`tls.client.x509.issuer.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`tls.client.x509.not_after`*:: -+ --- -Time at which the certificate is no longer considered valid. - -type: date - -example: 2020-07-16 03:15:39+00:00 - --- - -*`tls.client.x509.not_before`*:: -+ --- -Time at which the certificate is first considered valid. - -type: date - -example: 2019-08-16 01:40:25+00:00 - --- - -*`tls.client.x509.public_key_algorithm`*:: -+ --- -Algorithm used to generate the public key. - -type: keyword - -example: RSA - --- - -*`tls.client.x509.public_key_curve`*:: -+ --- -The curve used by the elliptic curve public key algorithm. This is algorithm specific. - -type: keyword - -example: nistp521 - --- - -*`tls.client.x509.public_key_exponent`*:: -+ --- -Exponent used to derive the public key. This is algorithm specific. - -type: long - -example: 65537 - -Field is not indexed. - --- - -*`tls.client.x509.public_key_size`*:: -+ --- -The size of the public key space in bits. - -type: long - -example: 2048 - --- - -*`tls.client.x509.serial_number`*:: -+ --- -Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters. - -type: keyword - -example: 55FBB9C7DEBF09809D12CCAA - --- - -*`tls.client.x509.signature_algorithm`*:: -+ --- -Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353. - -type: keyword - -example: SHA256-RSA - --- - -*`tls.client.x509.subject.common_name`*:: -+ --- -List of common names (CN) of subject. - -type: keyword - -example: shared.global.example.net - --- - -*`tls.client.x509.subject.country`*:: -+ --- -List of country (C) code - -type: keyword - -example: US - --- - -*`tls.client.x509.subject.distinguished_name`*:: -+ --- -Distinguished name (DN) of the certificate subject entity. - -type: keyword - -example: C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net - --- - -*`tls.client.x509.subject.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: San Francisco - --- - -*`tls.client.x509.subject.organization`*:: -+ --- -List of organizations (O) of subject. - -type: keyword - -example: Example, Inc. - --- - -*`tls.client.x509.subject.organizational_unit`*:: -+ --- -List of organizational units (OU) of subject. - -type: keyword - --- - -*`tls.client.x509.subject.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`tls.client.x509.version_number`*:: -+ --- -Version of x509 format. - -type: keyword - -example: 3 - --- - -*`tls.curve`*:: -+ --- -String indicating the curve used for the given cipher, when applicable. - -type: keyword - -example: secp256r1 - --- - -*`tls.established`*:: -+ --- -Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel. - -type: boolean - --- - -*`tls.next_protocol`*:: -+ --- -String indicating the protocol being tunneled. Per the values in the IANA registry (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case. - -type: keyword - -example: http/1.1 - --- - -*`tls.resumed`*:: -+ --- -Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation. - -type: boolean - --- - -*`tls.server.certificate`*:: -+ --- -PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of `server.certificate_chain` since this value also exists in that list. - -type: keyword - -example: MII... - --- - -*`tls.server.certificate_chain`*:: -+ --- -Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of `server.certificate` since that value should be the first certificate in the chain. - -type: keyword - -example: ["MII...", "MII..."] - --- - -*`tls.server.hash.md5`*:: -+ --- -Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. - -type: keyword - -example: 0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC - --- - -*`tls.server.hash.sha1`*:: -+ --- -Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. - -type: keyword - -example: 9E393D93138888D288266C2D915214D1D1CCEB2A - --- - -*`tls.server.hash.sha256`*:: -+ --- -Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. - -type: keyword - -example: 0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0 - --- - -*`tls.server.issuer`*:: -+ --- -Subject of the issuer of the x.509 certificate presented by the server. - -type: keyword - -example: CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com - --- - -*`tls.server.ja3s`*:: -+ --- -A hash that identifies servers based on how they perform an SSL/TLS handshake. - -type: keyword - -example: 394441ab65754e2207b1e1b457b3641d - --- - -*`tls.server.not_after`*:: -+ --- -Timestamp indicating when server certificate is no longer considered valid. - -type: date - -example: 2021-01-01T00:00:00.000Z - --- - -*`tls.server.not_before`*:: -+ --- -Timestamp indicating when server certificate is first considered valid. - -type: date - -example: 1970-01-01T00:00:00.000Z - --- - -*`tls.server.subject`*:: -+ --- -Subject of the x.509 certificate presented by the server. - -type: keyword - -example: CN=www.example.com, OU=Infrastructure Team, DC=example, DC=com - --- - -*`tls.server.x509.alternative_names`*:: -+ --- -List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses. - -type: keyword - -example: *.elastic.co - --- - -*`tls.server.x509.issuer.common_name`*:: -+ --- -List of common name (CN) of issuing certificate authority. - -type: keyword - -example: Example SHA2 High Assurance Server CA - --- - -*`tls.server.x509.issuer.country`*:: -+ --- -List of country (C) codes - -type: keyword - -example: US - --- - -*`tls.server.x509.issuer.distinguished_name`*:: -+ --- -Distinguished name (DN) of issuing certificate authority. - -type: keyword - -example: C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA - --- - -*`tls.server.x509.issuer.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: Mountain View - --- - -*`tls.server.x509.issuer.organization`*:: -+ --- -List of organizations (O) of issuing certificate authority. - -type: keyword - -example: Example Inc - --- - -*`tls.server.x509.issuer.organizational_unit`*:: -+ --- -List of organizational units (OU) of issuing certificate authority. - -type: keyword - -example: www.example.com - --- - -*`tls.server.x509.issuer.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`tls.server.x509.not_after`*:: -+ --- -Time at which the certificate is no longer considered valid. - -type: date - -example: 2020-07-16 03:15:39+00:00 - --- - -*`tls.server.x509.not_before`*:: -+ --- -Time at which the certificate is first considered valid. - -type: date - -example: 2019-08-16 01:40:25+00:00 - --- - -*`tls.server.x509.public_key_algorithm`*:: -+ --- -Algorithm used to generate the public key. - -type: keyword - -example: RSA - --- - -*`tls.server.x509.public_key_curve`*:: -+ --- -The curve used by the elliptic curve public key algorithm. This is algorithm specific. - -type: keyword - -example: nistp521 - --- - -*`tls.server.x509.public_key_exponent`*:: -+ --- -Exponent used to derive the public key. This is algorithm specific. - -type: long - -example: 65537 - -Field is not indexed. - --- - -*`tls.server.x509.public_key_size`*:: -+ --- -The size of the public key space in bits. - -type: long - -example: 2048 - --- - -*`tls.server.x509.serial_number`*:: -+ --- -Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters. - -type: keyword - -example: 55FBB9C7DEBF09809D12CCAA - --- - -*`tls.server.x509.signature_algorithm`*:: -+ --- -Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353. - -type: keyword - -example: SHA256-RSA - --- - -*`tls.server.x509.subject.common_name`*:: -+ --- -List of common names (CN) of subject. - -type: keyword - -example: shared.global.example.net - --- - -*`tls.server.x509.subject.country`*:: -+ --- -List of country (C) code - -type: keyword - -example: US - --- - -*`tls.server.x509.subject.distinguished_name`*:: -+ --- -Distinguished name (DN) of the certificate subject entity. - -type: keyword - -example: C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net - --- - -*`tls.server.x509.subject.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: San Francisco - --- - -*`tls.server.x509.subject.organization`*:: -+ --- -List of organizations (O) of subject. - -type: keyword - -example: Example, Inc. - --- - -*`tls.server.x509.subject.organizational_unit`*:: -+ --- -List of organizational units (OU) of subject. - -type: keyword - --- - -*`tls.server.x509.subject.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`tls.server.x509.version_number`*:: -+ --- -Version of x509 format. - -type: keyword - -example: 3 - --- - -*`tls.version`*:: -+ --- -Numeric part of the version parsed from the original string. - -type: keyword - -example: 1.2 - --- - -*`tls.version_protocol`*:: -+ --- -Normalized lowercase protocol name parsed from original string. - -type: keyword - -example: tls - --- - -*`span.id`*:: -+ --- -Unique identifier of the span within the scope of its trace. -A span represents an operation within a transaction, such as a request to another service, or a database query. - -type: keyword - -example: 3ff9a8981b7ccd5a - --- - -*`trace.id`*:: -+ --- -Unique identifier of the trace. -A trace groups multiple events like transactions that belong together. For example, a user request handled by multiple inter-connected services. - -type: keyword - -example: 4bf92f3577b34da6a3ce929d0e0e4736 - --- - -*`transaction.id`*:: -+ --- -Unique identifier of the transaction within the scope of its trace. -A transaction is the highest level of work measured within a service, such as a request to a server. - -type: keyword - -example: 00f067aa0ba902b7 - --- - -[float] -=== url - -URL fields provide support for complete or partial URLs, and supports the breaking down into scheme, domain, path, and so on. - - -*`url.domain`*:: -+ --- -Domain of the url, such as "www.elastic.co". -In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the `domain` field. -If the URL contains a literal IPv6 address enclosed by `[` and `]` (IETF RFC 2732), the `[` and `]` characters should also be captured in the `domain` field. - -type: keyword - -example: www.elastic.co - --- - -*`url.extension`*:: -+ --- -The field contains the file extension from the original request url, excluding the leading dot. -The file extension is only set if it exists, as not every url has a file extension. -The leading period must not be included. For example, the value must be "png", not ".png". -Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz"). - -type: keyword - -example: png - --- - -*`url.fragment`*:: -+ --- -Portion of the url after the `#`, such as "top". -The `#` is not part of the fragment. - -type: keyword - --- - -*`url.full`*:: -+ --- -If full URLs are important to your use case, they should be stored in `url.full`, whether this field is reconstructed or present in the event source. - -type: wildcard - -example: https://www.elastic.co:443/search?q=elasticsearch#top - --- - -*`url.full.text`*:: -+ --- -type: match_only_text - --- - -*`url.original`*:: -+ --- -Unmodified original url as seen in the event source. -Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path. -This field is meant to represent the URL as it was observed, complete or not. - -type: wildcard - -example: https://www.elastic.co:443/search?q=elasticsearch#top or /search?q=elasticsearch - --- - -*`url.original.text`*:: -+ --- -type: match_only_text - --- - -*`url.password`*:: -+ --- -Password of the request. - -type: keyword - --- - -*`url.path`*:: -+ --- -Path of the request, such as "/search". - -type: wildcard - --- - -*`url.port`*:: -+ --- -Port of the request, such as 443. - -type: long - -example: 443 - -format: string - --- - -*`url.query`*:: -+ --- -The query field describes the query string of the request, such as "q=elasticsearch". -The `?` is excluded from the query string. If a URL contains no `?`, there is no query field. If there is a `?` but no query, the query field exists with an empty string. The `exists` query can be used to differentiate between the two cases. - -type: keyword - --- - -*`url.registered_domain`*:: -+ --- -The highest registered url domain, stripped of the subdomain. -For example, the registered domain for "foo.example.com" is "example.com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk". - -type: keyword - -example: example.com - --- - -*`url.scheme`*:: -+ --- -Scheme of the request, such as "https". -Note: The `:` is not part of the scheme. - -type: keyword - -example: https - --- - -*`url.subdomain`*:: -+ --- -The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain. -For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period. - -type: keyword - -example: east - --- - -*`url.top_level_domain`*:: -+ --- -The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com". -This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk". - -type: keyword - -example: co.uk - --- - -*`url.username`*:: -+ --- -Username of the request. - -type: keyword - --- - -[float] -=== user - -The user fields describe information about the user that is relevant to the event. -Fields can have one entry or multiple entries. If a user has more than one id, provide an array that includes all of them. - - -*`user.changes.domain`*:: -+ --- -Name of the directory the user is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`user.changes.email`*:: -+ --- -User email address. - -type: keyword - --- - -*`user.changes.full_name`*:: -+ --- -User's full name, if available. - -type: keyword - -example: Albert Einstein - --- - -*`user.changes.full_name.text`*:: -+ --- -type: match_only_text - --- - -*`user.changes.group.domain`*:: -+ --- -Name of the directory the group is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`user.changes.group.id`*:: -+ --- -Unique identifier for the group on the system/platform. - -type: keyword - --- - -*`user.changes.group.name`*:: -+ --- -Name of the group. - -type: keyword - --- - -*`user.changes.hash`*:: -+ --- -Unique user hash to correlate information for a user in anonymized form. -Useful if `user.id` or `user.name` contain confidential information and cannot be used. - -type: keyword - --- - -*`user.changes.id`*:: -+ --- -Unique identifier of the user. - -type: keyword - -example: S-1-5-21-202424912787-2692429404-2351956786-1000 - --- - -*`user.changes.name`*:: -+ --- -Short name or login of the user. - -type: keyword - -example: a.einstein - --- - -*`user.changes.name.text`*:: -+ --- -type: match_only_text - --- - -*`user.changes.roles`*:: -+ --- -Array of user roles at the time of the event. - -type: keyword - -example: ["kibana_admin", "reporting_user"] - --- - -*`user.domain`*:: -+ --- -Name of the directory the user is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`user.effective.domain`*:: -+ --- -Name of the directory the user is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`user.effective.email`*:: -+ --- -User email address. - -type: keyword - --- - -*`user.effective.full_name`*:: -+ --- -User's full name, if available. - -type: keyword - -example: Albert Einstein - --- - -*`user.effective.full_name.text`*:: -+ --- -type: match_only_text - --- - -*`user.effective.group.domain`*:: -+ --- -Name of the directory the group is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`user.effective.group.id`*:: -+ --- -Unique identifier for the group on the system/platform. - -type: keyword - --- - -*`user.effective.group.name`*:: -+ --- -Name of the group. - -type: keyword - --- - -*`user.effective.hash`*:: -+ --- -Unique user hash to correlate information for a user in anonymized form. -Useful if `user.id` or `user.name` contain confidential information and cannot be used. - -type: keyword - --- - -*`user.effective.id`*:: -+ --- -Unique identifier of the user. - -type: keyword - -example: S-1-5-21-202424912787-2692429404-2351956786-1000 - --- - -*`user.effective.name`*:: -+ --- -Short name or login of the user. - -type: keyword - -example: a.einstein - --- - -*`user.effective.name.text`*:: -+ --- -type: match_only_text - --- - -*`user.effective.roles`*:: -+ --- -Array of user roles at the time of the event. - -type: keyword - -example: ["kibana_admin", "reporting_user"] - --- - -*`user.email`*:: -+ --- -User email address. - -type: keyword - --- - -*`user.full_name`*:: -+ --- -User's full name, if available. - -type: keyword - -example: Albert Einstein - --- - -*`user.full_name.text`*:: -+ --- -type: match_only_text - --- - -*`user.group.domain`*:: -+ --- -Name of the directory the group is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`user.group.id`*:: -+ --- -Unique identifier for the group on the system/platform. - -type: keyword - --- - -*`user.group.name`*:: -+ --- -Name of the group. - -type: keyword - --- - -*`user.hash`*:: -+ --- -Unique user hash to correlate information for a user in anonymized form. -Useful if `user.id` or `user.name` contain confidential information and cannot be used. - -type: keyword - --- - -*`user.id`*:: -+ --- -Unique identifier of the user. - -type: keyword - -example: S-1-5-21-202424912787-2692429404-2351956786-1000 - --- - -*`user.name`*:: -+ --- -Short name or login of the user. - -type: keyword - -example: a.einstein - --- - -*`user.name.text`*:: -+ --- -type: match_only_text - --- - -*`user.roles`*:: -+ --- -Array of user roles at the time of the event. - -type: keyword - -example: ["kibana_admin", "reporting_user"] - --- - -*`user.target.domain`*:: -+ --- -Name of the directory the user is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`user.target.email`*:: -+ --- -User email address. - -type: keyword - --- - -*`user.target.full_name`*:: -+ --- -User's full name, if available. - -type: keyword - -example: Albert Einstein - --- - -*`user.target.full_name.text`*:: -+ --- -type: match_only_text - --- - -*`user.target.group.domain`*:: -+ --- -Name of the directory the group is a member of. -For example, an LDAP or Active Directory domain name. - -type: keyword - --- - -*`user.target.group.id`*:: -+ --- -Unique identifier for the group on the system/platform. - -type: keyword - --- - -*`user.target.group.name`*:: -+ --- -Name of the group. - -type: keyword - --- - -*`user.target.hash`*:: -+ --- -Unique user hash to correlate information for a user in anonymized form. -Useful if `user.id` or `user.name` contain confidential information and cannot be used. - -type: keyword - --- - -*`user.target.id`*:: -+ --- -Unique identifier of the user. - -type: keyword - -example: S-1-5-21-202424912787-2692429404-2351956786-1000 - --- - -*`user.target.name`*:: -+ --- -Short name or login of the user. - -type: keyword - -example: a.einstein - --- - -*`user.target.name.text`*:: -+ --- -type: match_only_text - --- - -*`user.target.roles`*:: -+ --- -Array of user roles at the time of the event. - -type: keyword - -example: ["kibana_admin", "reporting_user"] - --- - -[float] -=== user_agent - -The user_agent fields normally come from a browser request. -They often show up in web service logs coming from the parsed user agent string. - - -*`user_agent.device.name`*:: -+ --- -Name of the device. - -type: keyword - -example: iPhone - --- - -*`user_agent.name`*:: -+ --- -Name of the user agent. - -type: keyword - -example: Safari - --- - -*`user_agent.original`*:: -+ --- -Unparsed user_agent string. - -type: keyword - -example: Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1 - --- - -*`user_agent.original.text`*:: -+ --- -type: match_only_text - --- - -*`user_agent.os.family`*:: -+ --- -OS family (such as redhat, debian, freebsd, windows). - -type: keyword - -example: debian - --- - -*`user_agent.os.full`*:: -+ --- -Operating system name, including the version or code name. - -type: keyword - -example: Mac OS Mojave - --- - -*`user_agent.os.full.text`*:: -+ --- -type: match_only_text - --- - -*`user_agent.os.kernel`*:: -+ --- -Operating system kernel version as a raw string. - -type: keyword - -example: 4.4.0-112-generic - --- - -*`user_agent.os.name`*:: -+ --- -Operating system name, without the version. - -type: keyword - -example: Mac OS X - --- - -*`user_agent.os.name.text`*:: -+ --- -type: match_only_text - --- - -*`user_agent.os.platform`*:: -+ --- -Operating system platform (such centos, ubuntu, windows). - -type: keyword - -example: darwin - --- - -*`user_agent.os.type`*:: -+ --- -Use the `os.type` field to categorize the operating system into one of the broad commercial families. -One of these following values should be used (lowercase): linux, macos, unix, windows. -If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition. - -type: keyword - -example: macos - --- - -*`user_agent.os.version`*:: -+ --- -Operating system version as a raw string. - -type: keyword - -example: 10.14.1 - --- - -*`user_agent.version`*:: -+ --- -Version of the user agent. - -type: keyword - -example: 12.0 - --- - -[float] -=== vlan - -The VLAN fields are used to identify 802.1q tag(s) of a packet, as well as ingress and egress VLAN associations of an observer in relation to a specific packet or connection. -Network.vlan fields are used to record a single VLAN tag, or the outer tag in the case of q-in-q encapsulations, for a packet or connection as observed, typically provided by a network sensor (e.g. Zeek, Wireshark) passively reporting on traffic. -Network.inner VLAN fields are used to report inner q-in-q 802.1q tags (multiple 802.1q encapsulations) as observed, typically provided by a network sensor (e.g. Zeek, Wireshark) passively reporting on traffic. Network.inner VLAN fields should only be used in addition to network.vlan fields to indicate q-in-q tagging. -Observer.ingress and observer.egress VLAN values are used to record observer specific information when observer events contain discrete ingress and egress VLAN information, typically provided by firewalls, routers, or load balancers. - - -*`vlan.id`*:: -+ --- -VLAN ID as reported by the observer. - -type: keyword - -example: 10 - --- - -*`vlan.name`*:: -+ --- -Optional VLAN name as reported by the observer. - -type: keyword - -example: outside - --- - -[float] -=== vulnerability - -The vulnerability fields describe information about a vulnerability that is relevant to an event. - - -*`vulnerability.category`*:: -+ --- -The type of system or architecture that the vulnerability affects. These may be platform-specific (for example, Debian or SUSE) or general (for example, Database or Firewall). For example (https://qualysguard.qualys.com/qwebhelp/fo_portal/knowledgebase/vulnerability_categories.htm[Qualys vulnerability categories]) -This field must be an array. - -type: keyword - -example: ["Firewall"] - --- - -*`vulnerability.classification`*:: -+ --- -The classification of the vulnerability scoring system. For example (https://www.first.org/cvss/) - -type: keyword - -example: CVSS - --- - -*`vulnerability.description`*:: -+ --- -The description of the vulnerability that provides additional context of the vulnerability. For example (https://cve.mitre.org/about/faqs.html#cve_entry_descriptions_created[Common Vulnerabilities and Exposure CVE description]) - -type: keyword - -example: In macOS before 2.12.6, there is a vulnerability in the RPC... - --- - -*`vulnerability.description.text`*:: -+ --- -type: match_only_text - --- - -*`vulnerability.enumeration`*:: -+ --- -The type of identifier used for this vulnerability. For example (https://cve.mitre.org/about/) - -type: keyword - -example: CVE - --- - -*`vulnerability.id`*:: -+ --- -The identification (ID) is the number portion of a vulnerability entry. It includes a unique identification number for the vulnerability. For example (https://cve.mitre.org/about/faqs.html#what_is_cve_id)[Common Vulnerabilities and Exposure CVE ID] - -type: keyword - -example: CVE-2019-00001 - --- - -*`vulnerability.reference`*:: -+ --- -A resource that provides additional information, context, and mitigations for the identified vulnerability. - -type: keyword - -example: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6111 - --- - -*`vulnerability.report_id`*:: -+ --- -The report or scan identification number. - -type: keyword - -example: 20191018.0001 - --- - -*`vulnerability.scanner.vendor`*:: -+ --- -The name of the vulnerability scanner vendor. - -type: keyword - -example: Tenable - --- - -*`vulnerability.score.base`*:: -+ --- -Scores can range from 0.0 to 10.0, with 10.0 being the most severe. -Base scores cover an assessment for exploitability metrics (attack vector, complexity, privileges, and user interaction), impact metrics (confidentiality, integrity, and availability), and scope. For example (https://www.first.org/cvss/specification-document) - -type: float - -example: 5.5 - --- - -*`vulnerability.score.environmental`*:: -+ --- -Scores can range from 0.0 to 10.0, with 10.0 being the most severe. -Environmental scores cover an assessment for any modified Base metrics, confidentiality, integrity, and availability requirements. For example (https://www.first.org/cvss/specification-document) - -type: float - -example: 5.5 - --- - -*`vulnerability.score.temporal`*:: -+ --- -Scores can range from 0.0 to 10.0, with 10.0 being the most severe. -Temporal scores cover an assessment for code maturity, remediation level, and confidence. For example (https://www.first.org/cvss/specification-document) - -type: float - --- - -*`vulnerability.score.version`*:: -+ --- -The National Vulnerability Database (NVD) provides qualitative severity rankings of "Low", "Medium", and "High" for CVSS v2.0 base score ranges in addition to the severity ratings for CVSS v3.0 as they are defined in the CVSS v3.0 specification. -CVSS is owned and managed by FIRST.Org, Inc. (FIRST), a US-based non-profit organization, whose mission is to help computer security incident response teams across the world. For example (https://nvd.nist.gov/vuln-metrics/cvss) - -type: keyword - -example: 2.0 - --- - -*`vulnerability.severity`*:: -+ --- -The severity of the vulnerability can help with metrics and internal prioritization regarding remediation. For example (https://nvd.nist.gov/vuln-metrics/cvss) - -type: keyword - -example: Critical - --- - -[float] -=== x509 - -This implements the common core fields for x509 certificates. This information is likely logged with TLS sessions, digital signatures found in executable binaries, S/MIME information in email bodies, or analysis of files on disk. -When the certificate relates to a file, use the fields at `file.x509`. When hashes of the DER-encoded certificate are available, the `hash` data set should be populated as well (e.g. `file.hash.sha256`). -Events that contain certificate information about network connections, should use the x509 fields under the relevant TLS fields: `tls.server.x509` and/or `tls.client.x509`. - - -*`x509.alternative_names`*:: -+ --- -List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses. - -type: keyword - -example: *.elastic.co - --- - -*`x509.issuer.common_name`*:: -+ --- -List of common name (CN) of issuing certificate authority. - -type: keyword - -example: Example SHA2 High Assurance Server CA - --- - -*`x509.issuer.country`*:: -+ --- -List of country (C) codes - -type: keyword - -example: US - --- - -*`x509.issuer.distinguished_name`*:: -+ --- -Distinguished name (DN) of issuing certificate authority. - -type: keyword - -example: C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA - --- - -*`x509.issuer.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: Mountain View - --- - -*`x509.issuer.organization`*:: -+ --- -List of organizations (O) of issuing certificate authority. - -type: keyword - -example: Example Inc - --- - -*`x509.issuer.organizational_unit`*:: -+ --- -List of organizational units (OU) of issuing certificate authority. - -type: keyword - -example: www.example.com - --- - -*`x509.issuer.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`x509.not_after`*:: -+ --- -Time at which the certificate is no longer considered valid. - -type: date - -example: 2020-07-16 03:15:39+00:00 - --- - -*`x509.not_before`*:: -+ --- -Time at which the certificate is first considered valid. - -type: date - -example: 2019-08-16 01:40:25+00:00 - --- - -*`x509.public_key_algorithm`*:: -+ --- -Algorithm used to generate the public key. - -type: keyword - -example: RSA - --- - -*`x509.public_key_curve`*:: -+ --- -The curve used by the elliptic curve public key algorithm. This is algorithm specific. - -type: keyword - -example: nistp521 - --- - -*`x509.public_key_exponent`*:: -+ --- -Exponent used to derive the public key. This is algorithm specific. - -type: long - -example: 65537 - -Field is not indexed. - --- - -*`x509.public_key_size`*:: -+ --- -The size of the public key space in bits. - -type: long - -example: 2048 - --- - -*`x509.serial_number`*:: -+ --- -Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters. - -type: keyword - -example: 55FBB9C7DEBF09809D12CCAA - --- - -*`x509.signature_algorithm`*:: -+ --- -Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353. - -type: keyword - -example: SHA256-RSA - --- - -*`x509.subject.common_name`*:: -+ --- -List of common names (CN) of subject. - -type: keyword - -example: shared.global.example.net - --- - -*`x509.subject.country`*:: -+ --- -List of country (C) code - -type: keyword - -example: US - --- - -*`x509.subject.distinguished_name`*:: -+ --- -Distinguished name (DN) of the certificate subject entity. - -type: keyword - -example: C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net - --- - -*`x509.subject.locality`*:: -+ --- -List of locality names (L) - -type: keyword - -example: San Francisco - --- - -*`x509.subject.organization`*:: -+ --- -List of organizations (O) of subject. - -type: keyword - -example: Example, Inc. - --- - -*`x509.subject.organizational_unit`*:: -+ --- -List of organizational units (OU) of subject. - -type: keyword - --- - -*`x509.subject.state_or_province`*:: -+ --- -List of state or province names (ST, S, or P) - -type: keyword - -example: California - --- - -*`x509.version_number`*:: -+ --- -Version of x509 format. - -type: keyword - -example: 3 - --- - -[[exported-fields-host-processor]] -== Host fields - -Info collected for the host machine. - - - - -*`host.containerized`*:: -+ --- -If the host is a container. - - -type: boolean - --- - -*`host.os.build`*:: -+ --- -OS build information. - - -type: keyword - -example: 18D109 - --- - -*`host.os.codename`*:: -+ --- -OS codename, if any. - - -type: keyword - -example: stretch - --- - -[[exported-fields-jolokia-autodiscover]] -== Jolokia Discovery autodiscover provider fields - -Metadata from Jolokia Discovery added by the jolokia provider. - - - -*`jolokia.agent.version`*:: -+ --- -Version number of jolokia agent. - - -type: keyword - --- - -*`jolokia.agent.id`*:: -+ --- -Each agent has a unique id which can be either provided during startup of the agent in form of a configuration parameter or being autodetected. If autodected, the id has several parts: The IP, the process id, hashcode of the agent and its type. - - -type: keyword - --- - -*`jolokia.server.product`*:: -+ --- -The container product if detected. - - -type: keyword - --- - -*`jolokia.server.version`*:: -+ --- -The container's version (if detected). - - -type: keyword - --- - -*`jolokia.server.vendor`*:: -+ --- -The vendor of the container the agent is running in. - - -type: keyword - --- - -*`jolokia.url`*:: -+ --- -The URL how this agent can be contacted. - - -type: keyword - --- - -*`jolokia.secured`*:: -+ --- -Whether the agent was configured for authentication or not. - - -type: boolean - --- - -[[exported-fields-kubernetes-processor]] -== Kubernetes fields - -Kubernetes metadata added by the kubernetes processor - - - - -*`kubernetes.pod.name`*:: -+ --- -Kubernetes pod name - - -type: keyword - --- - -*`kubernetes.pod.uid`*:: -+ --- -Kubernetes Pod UID - - -type: keyword - --- - -*`kubernetes.pod.ip`*:: -+ --- -Kubernetes Pod IP - - -type: ip - --- - -*`kubernetes.namespace`*:: -+ --- -Kubernetes namespace - - -type: keyword - --- - -*`kubernetes.node.name`*:: -+ --- -Kubernetes node name - - -type: keyword - --- - -*`kubernetes.node.hostname`*:: -+ --- -Kubernetes hostname as reported by the node’s kernel - - -type: keyword - --- - -*`kubernetes.labels.*`*:: -+ --- -Kubernetes labels map - - -type: object - --- - -*`kubernetes.annotations.*`*:: -+ --- -Kubernetes annotations map - - -type: object - --- - -*`kubernetes.selectors.*`*:: -+ --- -Kubernetes selectors map - - -type: object - --- - -*`kubernetes.replicaset.name`*:: -+ --- -Kubernetes replicaset name - - -type: keyword - --- - -*`kubernetes.deployment.name`*:: -+ --- -Kubernetes deployment name - - -type: keyword - --- - -*`kubernetes.statefulset.name`*:: -+ --- -Kubernetes statefulset name - - -type: keyword - --- - -*`kubernetes.container.name`*:: -+ --- -Kubernetes container name (different than the name from the runtime) - - -type: keyword - --- - -[[exported-fields-process]] -== Process fields - -Process metadata fields - - - - -*`process.exe`*:: -+ --- -type: alias - -alias to: process.executable - --- - -[float] -=== owner - -Process owner information. - - -*`process.owner.id`*:: -+ --- -Unique identifier of the user. - -type: keyword - --- - -*`process.owner.name`*:: -+ --- -Short name or login of the user. - -type: keyword - -example: albert - --- - -*`process.owner.name.text`*:: -+ --- -type: text - --- - diff --git a/journalbeat/docs/filtering.asciidoc b/journalbeat/docs/filtering.asciidoc deleted file mode 100644 index 5bfcdd53254..00000000000 --- a/journalbeat/docs/filtering.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[[filtering-and-enhancing-data]] -== Filter and enhance data with processors - -++++ -Processors -++++ - -Your use case might require only a subset of the data exported by {beatname_uc}, -or you might need to enhance the exported data (for example, by adding -metadata). {beatname_uc} provides a couple of options for filtering and -enhancing exported data. - -You can configure {beatname_uc} to include events that match specific filtering -criteria. To do this, use the <> -option. The advantage of this approach is that you can reduce the number of -fields that {beatname_uc} needs to process. - -Another approach (the one described here) is to define processors to configure -global processing across all data exported by {beatname_uc}. - - -[float] -[[using-processors]] -=== Processors - -include::{libbeat-dir}/processors.asciidoc[] - -// You must set the processor-scope attribute to resolve the attribute reference -// defined in processors-using.asciidoc. The attribute is used to indicate where -// processors are valid. If processors are valid in more than two locations -// (root and :processor-scope:), you need to add a conditionally coded section -// to processors-using.asciidoc. - -:processor-scope: input -include::{libbeat-dir}/processors-using.asciidoc[] -:processor-scope!: diff --git a/journalbeat/docs/general-options.asciidoc b/journalbeat/docs/general-options.asciidoc deleted file mode 100644 index 32c39676bfe..00000000000 --- a/journalbeat/docs/general-options.asciidoc +++ /dev/null @@ -1,64 +0,0 @@ -[[configuration-general-options]] -== Configure general settings - -++++ -General settings -++++ - -You can specify settings in the +{beatname_lc}.yml+ config file to control the -general behavior of {beatname_uc}. This includes: - -* <> that control things like -publisher behavior and the location of some files. - -* <> that are supported by all Elastic -Beats. - -[float] -[[configuration-global-options]] -=== Global {beatname_uc} configuration options - -These options are in the +{beatname_lc}+ namespace. - -[float] -[id="{beatname_lc}-registry-file"] -==== `registry_file` - -The name of the registry file. If a relative path is used, it is considered relative to the -data path. See the <> section for details. The default is `${path.data}/registry`. - -["source","sh",subs="attributes"] ----- -{beatname_lc}.registry_file: registry ----- - -[float] -==== `backoff` deprecated:[5.6.1,Use the option under `paths` instead.] - -This option is valid as a global setting under the +{beatname_lc}+ namespace -or under `paths`. For a description of this option, see -<<{beatname_lc}-backoff,`backoff`>>. - -[float] -==== `max_backoff` deprecated:[5.6.1,Use the option under `paths` instead.] - -This option is valid as a global setting under the +{beatname_lc}+ namespace -or under `paths`. For a description of this option, see -<<{beatname_lc}-max-backoff,`max_backoff`>>. - -[float] -==== `seek` deprecated:[5.6.1,Use the option under `paths` instead.] - -This option is valid as a global setting under the +{beatname_lc}+ namespace -or under `paths`. For a description of this option, see -<>. - -[float] -==== `include_matches` deprecated:[5.6.1,Use the option under `paths` instead.] - -This option is valid as a global setting under the +{beatname_lc}+ namespace -or under `paths`. For a description of this option, see -<>. - -include::{libbeat-dir}/generalconfig.asciidoc[] - diff --git a/journalbeat/docs/getting-started.asciidoc b/journalbeat/docs/getting-started.asciidoc deleted file mode 100644 index 75da26ee141..00000000000 --- a/journalbeat/docs/getting-started.asciidoc +++ /dev/null @@ -1,175 +0,0 @@ -[id="{beatname_lc}-installation-configuration"] -== {beatname_uc} quick start: installation and configuration - -++++ -Quick start: installation and configuration -++++ - -This guide describes how to get started quickly with log data collection from -systemd journals. You'll learn how to: - -* install {beatname_uc} on each system you want to monitor -* specify the location of your log files -* parse log data into fields and send it to {es} -* visualize the log data in {kib} - -[float] -=== Before you begin - -You need {es} for storing and searching your data, and {kib} for visualizing and -managing it. - -include::{libbeat-dir}/tab-widgets/spinup-stack-widget.asciidoc[] - -[float] -[[install]] -=== Step 1: Install {beatname_uc} - -Install {beatname_uc} on all the servers you want to monitor. - -To download and install {beatname_uc}, use the commands that work with your -system: - -include::{libbeat-dir}/tab-widgets/install-deb-rpm-linux-widget.asciidoc[] - -[float] -[[other-installation-options]] -==== Other installation options - -* <> -* https://www.elastic.co/downloads/beats/{beatname_lc}[Download page] -* <> - -[float] -[[set-connection]] -=== Step 2: Connect to the {stack} - -include::{libbeat-dir}/shared/connecting-to-es.asciidoc[] - - -[float] -[[configuration]] -=== Step 3: Configure {beatname_uc} - -Before running {beatname_uc}, specify the location of the systemd journal files -and configure how you want the files to be read. If you accept the default -configuration, {beatname_uc} reads from the local journal. - -. In +{beatname_lc}.yml+, specify a list of paths to your systemd journal files. -Each path can be a directory path (to collect events from all journals in a -directory), or a file path. For example: -+ -["source","sh",subs="attributes"] ----- -{beatname_lc}.inputs: -- paths: - - "/dev/log" - - "/var/log/messages/my-journal-file.journal" - seek: head ----- -+ -If no paths are specified, {beatname_uc} reads from the default journal. - -. Set the <> option to control the position where -{beatname_uc} starts reading the journal. The available options are `head`, -`tail`, and `cursor`. The default is `cursor`, which means that on first read, -{beatname_uc} starts reading at the beginning of the file, but continues reading -at the last known position after a reload or restart. For more detail about -the settings, see the reference docs for the -<>. - -. (Optional) Set the <> option -to filter entries in journald before collecting any log events. This reduces the -number of events that {beatname_uc} needs to process. For example, to fetch only -Redis events from a Docker container tagged as `redis`, use: -+ -["source","sh",subs="attributes"] ----- -{beatname_lc}.inputs: -- paths: [] - include_matches: - - "CONTAINER_TAG=redis" - - "_COMM=redis" ----- - -include::{libbeat-dir}/shared/config-check.asciidoc[] - -[float] -[[setup-assets]] -=== Step 4: Set up assets - -{beatname_uc} comes with predefined assets for parsing, indexing, and -visualizing your data. To load these assets: - -. Make sure the user specified in +{beatname_lc}.yml+ is -<>. - -. From the installation directory, run: -+ --- -include::{libbeat-dir}/tab-widgets/setup-deb-rpm-linux-widget.asciidoc[] --- -+ -`-e` is optional and sends output to standard error instead of the configured log output. - -This step loads the recommended {ref}/index-templates.html[index template] for writing to {es}. - -[TIP] -===== -A connection to {es} (or {ess}) is required to set up the initial -environment. If you're using a different output, such as {ls}, see -<>. -===== - -[float] -[[start]] -=== Step 5: Start {beatname_uc} - -Before starting {beatname_uc}, modify the user credentials in -+{beatname_lc}.yml+ and specify a user who is -<>. - -To start {beatname_uc}, run: - -// tag::start-step[] -include::{libbeat-dir}/tab-widgets/start-deb-rpm-linux-widget.asciidoc[] -// end::start-step[] - -{beatname_uc} is now ready to send journal events to the {es}. - -[float] -[[view-data]] -=== Step 6: View your data in {kib} - -There is currently no dashboard available for {beatname_uc}. To start exploring -your data, go to the Discover app in {kib}. From there, you can submit search -queries, filter the search results, and view document data. - -To learn how to build visualizations and dashboards to view your data, see the -_{kibana-ref}/index.html[{kib} User Guide]_. - - -[float] -=== What's next? - -Now that you have your logs streaming into {es}, learn how to unify your logs, -metrics, uptime, and application performance data. - -include::{libbeat-dir}/shared/obs-apps.asciidoc[] - -[TIP] -==== -The {logs-app} shows logs from `filebeat-*` indices by default. To show -{beatname_uc} indices, configure the source to include `journalbeat-*`. You can -do this in the {logs-app} when you configure the source, or you can modify the {kib} -configuration. For -example: - -[source,yaml] ----- -xpack.infra: - sources: - default: - logAlias: "filebeat-*,journalbeat-*" ----- -==== diff --git a/journalbeat/docs/howto/howto.asciidoc b/journalbeat/docs/howto/howto.asciidoc deleted file mode 100644 index 14a26a59c1a..00000000000 --- a/journalbeat/docs/howto/howto.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[[howto-guides]] -= How to guides - -[partintro] --- -Learn how to perform common {beatname_uc} configuration tasks. - -* <<{beatname_lc}-template>> -* <> -* <<{beatname_lc}-geoip>> -* <> -* <> -* <> - - --- - -include::{libbeat-dir}/howto/load-index-templates.asciidoc[] - -include::{libbeat-dir}/howto/change-index-name.asciidoc[] - -include::{libbeat-dir}/shared-geoip.asciidoc[] - -:standalone: -include::{libbeat-dir}/shared-env-vars.asciidoc[] -:standalone!: - -include::{libbeat-dir}/shared-config-ingest.asciidoc[] - -:standalone: -include::{libbeat-dir}/yaml.asciidoc[] -:standalone!: - - - diff --git a/journalbeat/docs/images/coordinate-map.png b/journalbeat/docs/images/coordinate-map.png deleted file mode 100644 index 8ac69fe747c..00000000000 Binary files a/journalbeat/docs/images/coordinate-map.png and /dev/null differ diff --git a/journalbeat/docs/images/journald-log-data.png b/journalbeat/docs/images/journald-log-data.png deleted file mode 100644 index 9a746e96837..00000000000 Binary files a/journalbeat/docs/images/journald-log-data.png and /dev/null differ diff --git a/journalbeat/docs/index.asciidoc b/journalbeat/docs/index.asciidoc deleted file mode 100644 index 4ace63c41fc..00000000000 --- a/journalbeat/docs/index.asciidoc +++ /dev/null @@ -1,47 +0,0 @@ -= Journalbeat Reference - -:libbeat-dir: {docdir}/../../libbeat/docs - -include::{libbeat-dir}/version.asciidoc[] - -include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[] - -include::{asciidoc-dir}/../../shared/attributes.asciidoc[] - -:beatname_lc: journalbeat -:beatname_uc: Journalbeat -:beatname_pkg: {beatname_lc} -:github_repo_name: beats -:discuss_forum: beats/{beatname_lc} -:beat_default_index_prefix: {beatname_lc} -:beat_kib_app: {kib} Logs -:deb_os: -:rpm_os: -:linux_os: -:docker_platform: -:no_dashboards: -:no_decode_cef_processor: - -include::{libbeat-dir}/shared-beats-attributes.asciidoc[] - -include::./overview.asciidoc[] - -include::./getting-started.asciidoc[] - -include::./setting-up-running.asciidoc[] - -include::./configuring-howto.asciidoc[] - -include::{docdir}/howto/howto.asciidoc[] - -include::./fields.asciidoc[] - -include::{libbeat-dir}/monitoring/monitoring-beats.asciidoc[] - -include::{libbeat-dir}/shared-securing-beat.asciidoc[] - -include::./troubleshooting.asciidoc[] - -include::./faq.asciidoc[] - - diff --git a/journalbeat/docs/overview.asciidoc b/journalbeat/docs/overview.asciidoc deleted file mode 100644 index 645aa87ca48..00000000000 --- a/journalbeat/docs/overview.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[id="{beatname_lc}-overview"] -== {beatname_uc} overview - -{beatname_uc} is a lightweight shipper for forwarding and centralizing log data -from https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html[systemd journals]. -Installed as an agent on your servers, {beatname_uc} monitors the journal -locations that you specify, collects log events, and forwards them to either to -https://www.elastic.co/products/elasticsearch[Elasticsearch] or -https://www.elastic.co/products/logstash[Logstash]. - -include::{libbeat-dir}/shared-libbeat-description.asciidoc[] diff --git a/journalbeat/docs/page_header.html b/journalbeat/docs/page_header.html deleted file mode 100644 index 0f01f3bfad5..00000000000 --- a/journalbeat/docs/page_header.html +++ /dev/null @@ -1,4 +0,0 @@ -This functionality is experimental and may be changed or removed completely in a -future release. Elastic will take a best effort approach to fix any issues, but -experimental features are not subject to the support SLA of official GA -features. \ No newline at end of file diff --git a/journalbeat/docs/running-on-docker.asciidoc b/journalbeat/docs/running-on-docker.asciidoc deleted file mode 100644 index dbfcce5b489..00000000000 --- a/journalbeat/docs/running-on-docker.asciidoc +++ /dev/null @@ -1 +0,0 @@ -include::{libbeat-dir}/shared-docker.asciidoc[] diff --git a/journalbeat/docs/setting-up-running.asciidoc b/journalbeat/docs/setting-up-running.asciidoc deleted file mode 100644 index ef95d59b8ff..00000000000 --- a/journalbeat/docs/setting-up-running.asciidoc +++ /dev/null @@ -1,47 +0,0 @@ -///// -// NOTE: -// Each beat has its own setup overview to allow for the addition of content -// that is unique to each beat. -///// - -[[setting-up-and-running]] -== Set up and run {beatname_uc} - -++++ -Set up and run -++++ - -Before reading this section, see -<<{beatname_lc}-installation-configuration>> for basic -installation instructions to get you started. - -This section includes additional information on how to install, set up, and run -{beatname_uc}, including: - -* <> -* <> -* <> -* <> -* <> -* <> -* <<{beatname_lc}-starting>> -* <> - - -//MAINTAINERS: If you add a new file to this section, make sure you update the bulleted list ^^ too. - -include::{libbeat-dir}/shared-directory-layout.asciidoc[] - -include::{libbeat-dir}/keystore.asciidoc[] - -include::{libbeat-dir}/command-reference.asciidoc[] - -include::{libbeat-dir}/repositories.asciidoc[] - -include::./running-on-docker.asciidoc[] - -include::{libbeat-dir}/shared-systemd.asciidoc[] - -include::{libbeat-dir}/shared/start-beat.asciidoc[] - -include::{libbeat-dir}/shared/shutdown.asciidoc[] diff --git a/journalbeat/docs/troubleshooting.asciidoc b/journalbeat/docs/troubleshooting.asciidoc deleted file mode 100644 index b32d1b5fca2..00000000000 --- a/journalbeat/docs/troubleshooting.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[[troubleshooting]] -= Troubleshoot - -[partintro] --- - -If you have issues installing or running {beatname_uc}, read the -following tips: - -* <> -* <> -* <> - -//sets block macro for getting-help.asciidoc included in next section - --- - -[[getting-help]] -== Get help - -include::{libbeat-dir}/getting-help.asciidoc[] - -//sets block macro for debugging.asciidoc included in next section - -[id="enable-{beatname_lc}-debugging"] -== Debug - -include::{libbeat-dir}/debugging.asciidoc[] - - - diff --git a/journalbeat/include/fields.go b/journalbeat/include/fields.go deleted file mode 100644 index 0e063a35e4e..00000000000 --- a/journalbeat/include/fields.go +++ /dev/null @@ -1,36 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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. - -// Code generated by beats/dev-tools/cmd/asset/asset.go - DO NOT EDIT. - -package include - -import ( - "github.com/elastic/beats/v7/libbeat/asset" -) - -func init() { - if err := asset.SetFields("journalbeat", "fields.yml", asset.BeatFieldsPri, AssetFieldsYml); err != nil { - panic(err) - } -} - -// AssetFieldsYml returns asset data. -// This is the base64 encoded zlib format compressed contents of fields.yml. -func AssetFieldsYml() string { - return "eJzsvft7GzeyKPh7/gqsZr+VlUO2SL0sa+/sXkWSE33Hr7HkyZzE84lgN0hi1AQ6AFo0c/b87/uhCkCjH5IpWXTsjO/N8VBkN1BVKBSqCvX4C/n5+O2r81c//h/kVBIhDWEZN8TMuCYTnjOSccVSky97hBuyoJpMmWCKGpaR8ZKYGSNnJxekUPJfLDW97/5CxlSzjEgB398wpbkU5DAZJIN+xm6S7/5C3uSMakZuuOaGzIwp9NH29pSbWTlOUjnfZjnVhqfbLNXESKLL6ZRpQ9IZFVMGX9mhJ5zlmU6++65PrtnyiLBUf0eI4SZnR/aB7wjJmE4VLwyXAr4iz907xL199B0hfSLonB2Rzf9t+JxpQ+fF5neEEJKzG5YfkVQqBn8r9lvJFcuOiFElfmWWBTsiGTX4Z22+zVNq2LYdkyxmTACp2A0ThkjFp1xYEibfwXuEXFp6cw0PZeE99sEomlpST5ScVyP07MQ8pXm+JIoVimkmDBdTmMiNWE3XuWhaliplYf7zSfQC/kZmVBMhPbQ5CeTpIXvc0LxkAHQAppBFmdtp3LBusglX2sD7DbAUSxm/qaAqeMFyLiq43jqa43qRiVSE5jmOoBNcJ/aBzgu76Js7g+FBf7Df39m9HBweDfaPdveSw/3dXzajZc7pmOW6c4FxNeXYcjJ8gR+v8PtrtlxIlXUs9EmpjZzbB7aRJgXlSgccTqggY0ZKuy2MJDTLyJwZS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qHCZ1VE9/4wyFsrqkf0QqP7Fh4OYjwdCYpmJgfGf3BNXC69xrTvsHMpmmnps5xqJC+ueXj+asvXbACOw//KLC8ewjZGqv+NE63Sqrq2X51k5eczefoFOntswy0+Fl+zceRlOnZfmzHkw90QuEhbnpVwA2ItZfTSYWo1QJPe2g+7BXD8Pg4TuE69RSDMm7t4bD+ZSexgEwK5dBP4QJ9X+AE3gbQAWgfY69JoUZqkVOfXOrcUvoFwLoDuvnSi75vrSdNAoeng+NfLNe7Db74y6e/u9iOzt7oUHB2HU3dnBOIp2R71ov9MwNhFaUzjw/Nw9E5aGwlkY572cGZX+ToNr4lw3o6zGiimrNvfBehvCg0RMQwJ/tru9nV3z2Zyl7V4AJd0XIEDImUx5bLYk2JvGVLMH4ISSFKfhZFbFr84XWbsv5+N3B3g6gO1L1YvnPEvQWWGea2++OrT4StwBaQNHo4Mmpo2Cz5twRYkTFlh5B6Z6b46TDhyL9we3ISSwpreC0+wSvwnd2Jiyb4Fpi78A1e52zi4TdrDalV7QMytTzETC08UAL4SuFhJ/ZiLm44bgQj5c0coFOZuSkNDruoiHmkSvpc4zm4p114E25Fw+3FEWRQfh4f4uFtGo042GpEdGvb1of6S+6O3thk2Tt9QyK8j8Uww+W2LWH1aePhDz8X3Jd6eTbW4ek67UPlv+GKlV6+6gl53Vgm81aHRk6AEV+rGkftvH6nYZ4bDYqepRgLez3hP4PAr7gRhaZItoX5UY8AXQcEpWJqSrqapBZ0RIFyRYD/UcyI7SIZUpTl2Tz5BPFStDPJdRpUm5DEhKcDSA4hoSl+Lv5tU5Md3yzC+3pru7qM2523Petsq3dP17de/670tctq1us+HvClZQB45p0wGdpm0ss015/X8BAAD//2YU1sA=" -} diff --git a/journalbeat/input/config.go b/journalbeat/input/config.go deleted file mode 100644 index 6c202030b35..00000000000 --- a/journalbeat/input/config.go +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 input - -import ( - "time" - - "github.com/elastic/beats/v7/journalbeat/pkg/journalfield" - "github.com/elastic/beats/v7/journalbeat/pkg/journalread" - "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/v7/libbeat/common/fmtstr" - "github.com/elastic/beats/v7/libbeat/processors" -) - -// Config stores the options of an input. -type Config struct { - // Unique ID of the input for state persistence purposes. - ID string `config:"id"` - // Paths stores the paths to the journal files to be read. - Paths []string `config:"paths"` - // Backoff is the current interval to wait before - // attemting to read again from the journal. - Backoff time.Duration `config:"backoff" validate:"min=0,nonzero"` - // MaxBackoff is the limit of the backoff time. - MaxBackoff time.Duration `config:"max_backoff" validate:"min=0,nonzero"` - // Seek is the method to read from journals. - Seek journalread.SeekMode `config:"seek"` - // CursorSeekFallback sets where to seek if registry file is not available. - CursorSeekFallback journalread.SeekMode `config:"cursor_seek_fallback"` - // Matches store the key value pairs to match entries. - Matches []journalfield.Matcher `config:"include_matches"` - // SaveRemoteHostname defines if the original source of the entry needs to be saved. - SaveRemoteHostname bool `config:"save_remote_hostname"` - - // Fields and tags to add to events. - common.EventMetadata `config:",inline"` - // Processors to run on events. - Processors processors.PluginConfig `config:"processors"` - // ES output index pattern - Index fmtstr.EventFormatString `config:"index"` -} - -var ( - // DefaultConfig is the defaults for an inputs - DefaultConfig = Config{ - Backoff: 1 * time.Second, - MaxBackoff: 20 * time.Second, - Seek: journalread.SeekCursor, - CursorSeekFallback: journalread.SeekHead, - SaveRemoteHostname: false, - } -) diff --git a/journalbeat/input/input.go b/journalbeat/input/input.go deleted file mode 100644 index f1238d61c81..00000000000 --- a/journalbeat/input/input.go +++ /dev/null @@ -1,274 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 input - -import ( - "context" - "fmt" - "strings" - "sync" - "syscall" - "time" - - "github.com/elastic/beats/v7/libbeat/processors/add_formatted_index" - "github.com/elastic/go-concert/timed" - - "github.com/elastic/beats/v7/libbeat/common/acker" - "github.com/elastic/beats/v7/libbeat/common/atomic" - "github.com/elastic/beats/v7/libbeat/common/fmtstr" - - "github.com/elastic/beats/v7/journalbeat/checkpoint" - "github.com/elastic/beats/v7/journalbeat/reader" - "github.com/elastic/beats/v7/libbeat/beat" - "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/v7/libbeat/processors" -) - -// Input manages readers and forwards entries from journals. -type Input struct { - readers []*reader.Reader - done chan struct{} - config Config - client beat.Client - states map[string]checkpoint.JournalState - logger *logp.Logger - eventMeta common.EventMetadata - processors beat.ProcessorList -} - -// New returns a new Inout -func New( - c *common.Config, - info beat.Info, - done chan struct{}, - states map[string]checkpoint.JournalState, -) (*Input, error) { - config := DefaultConfig - if err := c.Unpack(&config); err != nil { - return nil, err - } - - logger := logp.NewLogger("input") - if config.ID != "" { - logger = logger.With("id", config.ID) - } - - var readers []*reader.Reader - if len(config.Paths) == 0 { - cfg := reader.Config{ - Path: reader.LocalSystemJournalID, // used to identify the state in the registry - Backoff: config.Backoff, - MaxBackoff: config.MaxBackoff, - Seek: config.Seek, - CursorSeekFallback: config.CursorSeekFallback, - Matches: config.Matches, - SaveRemoteHostname: config.SaveRemoteHostname, - CheckpointID: checkpointID(config.ID, reader.LocalSystemJournalID), - } - - state := states[cfg.CheckpointID] - r, err := reader.NewLocal(cfg, done, state, logger) - if err != nil { - return nil, fmt.Errorf("error creating reader for local journal: %+v", err) - } - readers = append(readers, r) - } - - for _, p := range config.Paths { - cfg := reader.Config{ - Path: p, - Backoff: config.Backoff, - MaxBackoff: config.MaxBackoff, - Seek: config.Seek, - CursorSeekFallback: config.CursorSeekFallback, - Matches: config.Matches, - SaveRemoteHostname: config.SaveRemoteHostname, - CheckpointID: checkpointID(config.ID, p), - } - - state := states[cfg.CheckpointID] - r, err := reader.New(cfg, done, state, logger) - if err != nil { - return nil, fmt.Errorf("error creating reader for journal: %+v", err) - } - readers = append(readers, r) - } - - inputProcessors, err := processorsForInput(info, config) - if err != nil { - return nil, err - } - - logger.Debugf("New input is created for paths %v", config.Paths) - - return &Input{ - readers: readers, - done: done, - config: config, - states: states, - logger: logger, - eventMeta: config.EventMetadata, - processors: inputProcessors, - }, nil -} - -// Run connects to the output, collects entries from the readers -// and then publishes the events. -func (i *Input) Run(pipeline beat.Pipeline) { - var err error - i.client, err = pipeline.ConnectWith(beat.ClientConfig{ - PublishMode: beat.GuaranteedSend, - Processing: beat.ProcessingConfig{ - EventMetadata: i.eventMeta, - Meta: nil, - Processor: i.processors, - }, - ACKHandler: acker.Counting(func(n int) { - i.logger.Debugw("journalbeat successfully published events", "event.count", n) - }), - }) - if err != nil { - i.logger.Error("Error connecting to output: %v", err) - return - } - - i.publishAll() -} - -// publishAll reads events from all readers and publishes them. -func (i *Input) publishAll() { - out := make(chan *beat.Event) - defer close(out) - - var wg sync.WaitGroup - defer wg.Wait() - for _, r := range i.readers { - wg.Add(1) - r := r - go func() { - defer wg.Done() - - suppressed := atomic.NewBool(false) - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - for { - select { - case <-i.done: - return - default: - } - - event, err := r.Next() - if event == nil { - if err != nil { - if i.isErrSuppressed(ctx, err, suppressed) { - i.logger.Debugf("Error message suppressed: EBADMSG") - continue - } - i.logger.Errorf("Error while reading event: %v", err) - } - continue - } - - select { - case <-i.done: - case out <- event: - } - } - }() - } - - for { - select { - case <-i.done: - return - case e := <-out: - i.client.Publish(*e) - } - } -} - -// isErrSuppressed checks if the error is due to a corrupt journal. If yes, only the first error message -// is displayed and then it is suppressed for 5 seconds. -func (i *Input) isErrSuppressed(ctx context.Context, err error, suppressed *atomic.Bool) bool { - if strings.Contains(err.Error(), syscall.EBADMSG.Error()) { - if suppressed.Load() { - return true - } - - suppressed.Store(true) - go func(ctx context.Context, suppressed *atomic.Bool) { - if err := timed.Wait(ctx, 5*time.Second); err == nil { - suppressed.Store(false) - } - - }(ctx, suppressed) - } - - return false -} - -// Stop stops all readers of the input. -func (i *Input) Stop() { - for _, r := range i.readers { - r.Close() - } - i.client.Close() -} - -// Wait waits until all readers are done. -func (i *Input) Wait() { - i.Stop() -} - -func processorsForInput(beatInfo beat.Info, config Config) (*processors.Processors, error) { - procs := processors.NewList(nil) - - // Processor ordering is important: - // 1. Index configuration - if !config.Index.IsEmpty() { - staticFields := fmtstr.FieldsForBeat(beatInfo.Beat, beatInfo.Version) - timestampFormat, err := - fmtstr.NewTimestampFormatString(&config.Index, staticFields) - if err != nil { - return nil, err - } - indexProcessor := add_formatted_index.New(timestampFormat) - procs.AddProcessor(indexProcessor) - } - - // 2. User processors - userProcessors, err := processors.New(config.Processors) - if err != nil { - return nil, err - } - procs.AddProcessors(*userProcessors) - - return procs, nil -} - -// checkpointID returns the identifier used to track persistent state for the -// input. -func checkpointID(id, path string) string { - if id == "" { - return path - } - return "journald::" + path + "::" + id -} diff --git a/journalbeat/input/input_test.go b/journalbeat/input/input_test.go deleted file mode 100644 index eb925f1ef0b..00000000000 --- a/journalbeat/input/input_test.go +++ /dev/null @@ -1,167 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 input - -import ( - "fmt" - "testing" - "time" - - "github.com/stretchr/testify/assert" - - "github.com/elastic/beats/v7/libbeat/beat" - "github.com/elastic/beats/v7/libbeat/beat/events" - "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/v7/libbeat/processors" - _ "github.com/elastic/beats/v7/libbeat/processors/actions" -) - -func TestProcessorsForInput(t *testing.T) { - testCases := map[string]struct { - beatInfo beat.Info - configStr string - event beat.Event - expectedFields map[string]string - }{ - "Simple static index": { - configStr: "index: 'test'", - expectedFields: map[string]string{ - "@metadata.raw_index": "test", - }, - }, - "Index with agent info + timestamp": { - beatInfo: beat.Info{Beat: "TestBeat", Version: "3.9.27"}, - configStr: "index: 'beat-%{[agent.name]}-%{[agent.version]}-%{+yyyy.MM.dd}'", - event: beat.Event{Timestamp: time.Date(1999, time.December, 31, 23, 0, 0, 0, time.UTC)}, - expectedFields: map[string]string{ - "@metadata.raw_index": "beat-TestBeat-3.9.27-1999.12.31", - }, - }, - "Set field in input config": { - configStr: `processors: [add_fields: {fields: {testField: inputConfig}}]`, - expectedFields: map[string]string{ - "fields.testField": "inputConfig", - }, - }, - } - for description, test := range testCases { - t.Run(description, func(t *testing.T) { - if test.event.Fields == nil { - test.event.Fields = common.MapStr{} - } - config, err := inputConfigFromString(test.configStr) - if err != nil { - t.Errorf("[%s] %v", description, err) - return - } - processors, err := processorsForInput(test.beatInfo, config) - if err != nil { - t.Errorf("[%s] %v", description, err) - return - } - processedEvent, err := processors.Run(&test.event) - // We don't check if err != nil, because we are testing the final outcome - // of running the processors, including when some of them fail. - if processedEvent == nil { - t.Errorf("[%s] Unexpected fatal error running processors: %v\n", - description, err) - } - for key, value := range test.expectedFields { - field, err := processedEvent.GetValue(key) - if err != nil { - t.Errorf("[%s] Couldn't get field %s from event: %v", description, key, err) - return - } - assert.Equal(t, field, value) - fieldStr, ok := field.(string) - if !ok { - // Note that requiring a string here is just to simplify the test setup, - // not a requirement of the underlying api. - t.Errorf("[%s] Field [%s] should be a string", description, key) - return - } - if fieldStr != value { - t.Errorf("[%s] Event field [%s]: expected [%s], got [%s]", description, key, value, fieldStr) - } - } - }) - } -} - -func TestProcessorsForInputIsFlat(t *testing.T) { - // This test is regrettable, and exists because of inconsistencies in - // processor handling between processors.Processors and processing.group - // (which implements beat.ProcessorList) -- see processorsForConfig for - // details. The upshot is that, for now, if the input configuration specifies - // processors, they must be returned as direct children of the resulting - // processors.Processors (rather than being collected in additional tree - // structure). - // This test should be removed once we have a more consistent mechanism for - // collecting and running processors. - configStr := `processors: -- add_fields: {fields: {testField: value}} -- add_fields: {fields: {testField2: stuff}}` - config, err := inputConfigFromString(configStr) - if err != nil { - t.Fatal(err) - } - processors, err := processorsForInput( - beat.Info{}, config) - if err != nil { - t.Fatal(err) - } - assert.Equal(t, 2, len(processors.List)) -} - -// setRawIndex is a bare-bones processor to set the raw_index field to a -// constant string in the event metadata. It is used to test order of operations -// for processorsForConfig. -type setRawIndex struct { - indexStr string -} - -func (p *setRawIndex) Run(event *beat.Event) (*beat.Event, error) { - if event.Meta == nil { - event.Meta = common.MapStr{} - } - event.Meta[events.FieldMetaRawIndex] = p.indexStr - return event, nil -} - -func (p *setRawIndex) String() string { - return fmt.Sprintf("set_raw_index=%v", p.indexStr) -} - -// Helper function to convert from YML input string to an unpacked -// Config -func inputConfigFromString(s string) (Config, error) { - config := DefaultConfig - cfg, err := common.NewConfigFrom(s) - if err != nil { - return config, err - } - err = cfg.Unpack(&config) - return config, err -} - -// makeProcessors wraps one or more bare Processor objects in Processors. -func makeProcessors(procs ...processors.Processor) *processors.Processors { - procList := processors.NewList(nil) - procList.List = procs - return procList -} diff --git a/journalbeat/journalbeat.docker.yml b/journalbeat/journalbeat.docker.yml deleted file mode 100644 index 643eea808b8..00000000000 --- a/journalbeat/journalbeat.docker.yml +++ /dev/null @@ -1,12 +0,0 @@ -journalbeat.inputs: -- paths: [] - seek: cursor - -processors: - - add_cloud_metadata: ~ - - add_docker_metadata: ~ - -output.elasticsearch: - hosts: '${ELASTICSEARCH_HOSTS:elasticsearch:9200}' - username: '${ELASTICSEARCH_USERNAME:}' - password: '${ELASTICSEARCH_PASSWORD:}' diff --git a/journalbeat/journalbeat.reference.yml b/journalbeat/journalbeat.reference.yml deleted file mode 100644 index 19692cfec94..00000000000 --- a/journalbeat/journalbeat.reference.yml +++ /dev/null @@ -1,1561 +0,0 @@ -###################### Journalbeat Configuration Example ######################### - -# This file is an example configuration file highlighting only the most common -# options. The journalbeat.reference.yml file from the same directory contains all the -# supported options with more comments. You can use it as a reference. -# -# You can find the full configuration reference here: -# https://www.elastic.co/guide/en/beats/journalbeat/index.html - -# For more available modules and options, please see the journalbeat.reference.yml sample -# configuration file. - -# ============================= Journalbeat inputs ============================= - -journalbeat.inputs: - # Paths that should be crawled and fetched. Possible values files and directories. - # When setting a directory, all journals under it are merged. - # When empty starts to read from local journal. -- paths: [] - - # An optional unique identifier for the input. By providing a unique `id` you - # can operate multiple inputs on the same journal. This allows each input's - # cursor to be persisted independently in the registry file. - #id: "" - - # The number of seconds to wait before trying to read again from journals. - #backoff: 1s - # The maximum number of seconds to wait before attempting to read again from journals. - #max_backoff: 20s - - # Position to start reading from journal. Valid values: head, tail, cursor - seek: cursor - # Fallback position if no cursor data is available. - #cursor_seek_fallback: head - - # Exact matching for field values of events. - # Matching for nginx entries: "systemd.unit=nginx" - #include_matches: [] - - # Set the option to preserve the remote hostname in entries from a remote journal. - # It is only needed when used with add_host_metadata, so the original host name - # does not get overwritten by the processor. - #save_remote_hostname: false - - # Optional fields that you can specify to add additional information to the - # output. Fields can be scalar values, arrays, dictionaries, or any nested - # combination of these. - #fields: - # env: staging - - -# ========================= Journalbeat global options ========================= -#journalbeat: - # Name of the registry file. If a relative path is used, it is considered relative to the - # data path. - #registry_file: registry - -# ======================= Elasticsearch template setting ======================= -setup.template.settings: - index.number_of_shards: 1 - #index.codec: best_compression - #_source.enabled: false - -# ================================== General =================================== - -# The name of the shipper that publishes the network data. It can be used to group -# all the transactions sent by a single shipper in the web interface. -# If this options is not defined, the hostname is used. -#name: - -# The tags of the shipper are included in their own field with each -# transaction published. Tags make it easy to group servers by different -# logical properties. -#tags: ["service-X", "web-tier"] - -# Optional fields that you can specify to add additional information to the -# output. Fields can be scalar values, arrays, dictionaries, or any nested -# combination of these. -#fields: -# env: staging - -# If this option is set to true, the custom fields are stored as top-level -# fields in the output document instead of being grouped under a fields -# sub-dictionary. Default is false. -#fields_under_root: false - -# Internal queue configuration for buffering events to be published. -#queue: - # Queue type by name (default 'mem') - # The memory queue will present all available events (up to the outputs - # bulk_max_size) to the output, the moment the output is ready to server - # another batch of events. - #mem: - # Max number of events the queue can buffer. - #events: 4096 - - # Hints the minimum number of events stored in the queue, - # before providing a batch of events to the outputs. - # The default value is set to 2048. - # A value of 0 ensures events are immediately available - # to be sent to the outputs. - #flush.min_events: 2048 - - # Maximum duration after which events are available to the outputs, - # if the number of events stored in the queue is < `flush.min_events`. - #flush.timeout: 1s - - # The disk queue stores incoming events on disk until the output is - # ready for them. This allows a higher event limit than the memory-only - # queue and lets pending events persist through a restart. - #disk: - # The directory path to store the queue's data. - #path: "${path.data}/diskqueue" - - # The maximum space the queue should occupy on disk. Depending on - # input settings, events that exceed this limit are delayed or discarded. - #max_size: 10GB - - # The maximum size of a single queue data file. Data in the queue is - # stored in smaller segments that are deleted after all their events - # have been processed. - #segment_size: 1GB - - # The number of events to read from disk to memory while waiting for - # the output to request them. - #read_ahead: 512 - - # The number of events to accept from inputs while waiting for them - # to be written to disk. If event data arrives faster than it - # can be written to disk, this setting prevents it from overflowing - # main memory. - #write_ahead: 2048 - - # The duration to wait before retrying when the queue encounters a disk - # write error. - #retry_interval: 1s - - # The maximum length of time to wait before retrying on a disk write - # error. If the queue encounters repeated errors, it will double the - # length of its retry interval each time, up to this maximum. - #max_retry_interval: 30s - -# Sets the maximum number of CPUs that can be executing simultaneously. The -# default is the number of logical CPUs available in the system. -#max_procs: - -# ================================= Processors ================================= - -# Processors are used to reduce the number of fields in the exported event or to -# enhance the event with external metadata. This section defines a list of -# processors that are applied one by one and the first one receives the initial -# event: -# -# event -> filter1 -> event1 -> filter2 ->event2 ... -# -# The supported processors are drop_fields, drop_event, include_fields, -# decode_json_fields, and add_cloud_metadata. -# -# For example, you can use the following processors to keep the fields that -# contain CPU load percentages, but remove the fields that contain CPU ticks -# values: -# -#processors: -# - include_fields: -# fields: ["cpu"] -# - drop_fields: -# fields: ["cpu.user", "cpu.system"] -# -# The following example drops the events that have the HTTP response code 200: -# -#processors: -# - drop_event: -# when: -# equals: -# http.code: 200 -# -# The following example renames the field a to b: -# -#processors: -# - rename: -# fields: -# - from: "a" -# to: "b" -# -# The following example tokenizes the string into fields: -# -#processors: -# - dissect: -# tokenizer: "%{key1} - %{key2}" -# field: "message" -# target_prefix: "dissect" -# -# The following example enriches each event with metadata from the cloud -# provider about the host machine. It works on EC2, GCE, DigitalOcean, -# Tencent Cloud, and Alibaba Cloud. -# -#processors: -# - add_cloud_metadata: ~ -# -# The following example enriches each event with the machine's local time zone -# offset from UTC. -# -#processors: -# - add_locale: -# format: offset -# -# The following example enriches each event with docker metadata, it matches -# given fields to an existing container id and adds info from that container: -# -#processors: -# - add_docker_metadata: -# host: "unix:///var/run/docker.sock" -# match_fields: ["system.process.cgroup.id"] -# match_pids: ["process.pid", "process.parent.pid"] -# match_source: true -# match_source_index: 4 -# match_short_id: false -# cleanup_timeout: 60 -# labels.dedot: false -# # To connect to Docker over TLS you must specify a client and CA certificate. -# #ssl: -# # certificate_authority: "/etc/pki/root/ca.pem" -# # certificate: "/etc/pki/client/cert.pem" -# # key: "/etc/pki/client/cert.key" -# -# The following example enriches each event with docker metadata, it matches -# container id from log path available in `source` field (by default it expects -# it to be /var/lib/docker/containers/*/*.log). -# -#processors: -# - add_docker_metadata: ~ -# -# The following example enriches each event with host metadata. -# -#processors: -# - add_host_metadata: ~ -# -# The following example enriches each event with process metadata using -# process IDs included in the event. -# -#processors: -# - add_process_metadata: -# match_pids: ["system.process.ppid"] -# target: system.process.parent -# -# The following example decodes fields containing JSON strings -# and replaces the strings with valid JSON objects. -# -#processors: -# - decode_json_fields: -# fields: ["field1", "field2", ...] -# process_array: false -# max_depth: 1 -# target: "" -# overwrite_keys: false -# -#processors: -# - decompress_gzip_field: -# from: "field1" -# to: "field2" -# ignore_missing: false -# fail_on_error: true -# -# The following example copies the value of message to message_copied -# -#processors: -# - copy_fields: -# fields: -# - from: message -# to: message_copied -# fail_on_error: true -# ignore_missing: false -# -# The following example truncates the value of message to 1024 bytes -# -#processors: -# - truncate_fields: -# fields: -# - message -# max_bytes: 1024 -# fail_on_error: false -# ignore_missing: true -# -# The following example preserves the raw message under event.original -# -#processors: -# - copy_fields: -# fields: -# - from: message -# to: event.original -# fail_on_error: false -# ignore_missing: true -# - truncate_fields: -# fields: -# - event.original -# max_bytes: 1024 -# fail_on_error: false -# ignore_missing: true -# -# The following example URL-decodes the value of field1 to field2 -# -#processors: -# - urldecode: -# fields: -# - from: "field1" -# to: "field2" -# ignore_missing: false -# fail_on_error: true - -# =============================== Elastic Cloud ================================ - -# These settings simplify using Journalbeat with the Elastic Cloud (https://cloud.elastic.co/). - -# The cloud.id setting overwrites the `output.elasticsearch.hosts` and -# `setup.kibana.host` options. -# You can find the `cloud.id` in the Elastic Cloud web UI. -#cloud.id: - -# The cloud.auth setting overwrites the `output.elasticsearch.username` and -# `output.elasticsearch.password` settings. The format is `:`. -#cloud.auth: - -# ================================== Outputs =================================== - -# Configure what output to use when sending the data collected by the beat. - -# ---------------------------- Elasticsearch Output ---------------------------- -output.elasticsearch: - # Boolean flag to enable or disable the output module. - #enabled: true - - # Array of hosts to connect to. - # Scheme and port can be left out and will be set to the default (http and 9200) - # In case you specify and additional path, the scheme is required: http://localhost:9200/path - # IPv6 addresses should always be defined as: https://[2001:db8::1]:9200 - hosts: ["localhost:9200"] - - # Set gzip compression level. - #compression_level: 0 - - # Configure escaping HTML symbols in strings. - #escape_html: false - - # Protocol - either `http` (default) or `https`. - #protocol: "https" - - # Authentication credentials - either API key or username/password. - #api_key: "id:api_key" - #username: "elastic" - #password: "changeme" - - # Dictionary of HTTP parameters to pass within the URL with index operations. - #parameters: - #param1: value1 - #param2: value2 - - # Number of workers per Elasticsearch host. - #worker: 1 - - # Optional index name. The default is "journalbeat" plus date - # and generates [journalbeat-]YYYY.MM.DD keys. - # In case you modify this pattern you must update setup.template.name and setup.template.pattern accordingly. - #index: "journalbeat-%{[agent.version]}-%{+yyyy.MM.dd}" - - # Optional ingest pipeline. By default no pipeline will be used. - #pipeline: "" - - # Optional HTTP path - #path: "/elasticsearch" - - # Custom HTTP headers to add to each request - #headers: - # X-My-Header: Contents of the header - - # Proxy server URL - #proxy_url: http://proxy:3128 - - # Whether to disable proxy settings for outgoing connections. If true, this - # takes precedence over both the proxy_url field and any environment settings - # (HTTP_PROXY, HTTPS_PROXY). The default is false. - #proxy_disable: false - - # The number of times a particular Elasticsearch index operation is attempted. If - # the indexing operation doesn't succeed after this many retries, the events are - # dropped. The default is 3. - #max_retries: 3 - - # The maximum number of events to bulk in a single Elasticsearch bulk API index request. - # The default is 50. - #bulk_max_size: 50 - - # The number of seconds to wait before trying to reconnect to Elasticsearch - # after a network error. After waiting backoff.init seconds, the Beat - # tries to reconnect. If the attempt fails, the backoff timer is increased - # exponentially up to backoff.max. After a successful connection, the backoff - # timer is reset. The default is 1s. - #backoff.init: 1s - - # The maximum number of seconds to wait before attempting to connect to - # Elasticsearch after a network error. The default is 60s. - #backoff.max: 60s - - # Configure HTTP request timeout before failing a request to Elasticsearch. - #timeout: 90 - - # Use SSL settings for HTTPS. - #ssl.enabled: true - - # Controls the verification of certificates. Valid values are: - # * full, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. - # * strict, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. If the Subject Alternative - # Name is empty, it returns an error. - # * certificate, which verifies that the provided certificate is signed by a - # trusted authority (CA), but does not perform any hostname verification. - # * none, which performs no verification of the server's certificate. This - # mode disables many of the security benefits of SSL/TLS and should only be used - # after very careful consideration. It is primarily intended as a temporary - # diagnostic mechanism when attempting to resolve TLS errors; its use in - # production environments is strongly discouraged. - # The default value is full. - #ssl.verification_mode: full - - # List of supported/valid TLS versions. By default all TLS versions from 1.1 - # up to 1.3 are enabled. - #ssl.supported_protocols: [TLSv1.1, TLSv1.2, TLSv1.3] - - # List of root certificates for HTTPS server verifications - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client certificate key - #ssl.key: "/etc/pki/client/cert.key" - - # Optional passphrase for decrypting the certificate key. - #ssl.key_passphrase: '' - - # Configure cipher suites to be used for SSL connections - #ssl.cipher_suites: [] - - # Configure curve types for ECDHE-based cipher suites - #ssl.curve_types: [] - - # Configure what types of renegotiation are supported. Valid options are - # never, once, and freely. Default is never. - #ssl.renegotiation: never - - # Configure a pin that can be used to do extra validation of the verified certificate chain, - # this allow you to ensure that a specific certificate is used to validate the chain of trust. - # - # The pin is a base64 encoded string of the SHA-256 fingerprint. - #ssl.ca_sha256: "" - - # Enable Kerberos support. Kerberos is automatically enabled if any Kerberos setting is set. - #kerberos.enabled: true - - # Authentication type to use with Kerberos. Available options: keytab, password. - #kerberos.auth_type: password - - # Path to the keytab file. It is used when auth_type is set to keytab. - #kerberos.keytab: /etc/elastic.keytab - - # Path to the Kerberos configuration. - #kerberos.config_path: /etc/krb5.conf - - # Name of the Kerberos user. - #kerberos.username: elastic - - # Password of the Kerberos user. It is used when auth_type is set to password. - #kerberos.password: changeme - - # Kerberos realm. - #kerberos.realm: ELASTIC - - -# ------------------------------ Logstash Output ------------------------------- -#output.logstash: - # Boolean flag to enable or disable the output module. - #enabled: true - - # The Logstash hosts - #hosts: ["localhost:5044"] - - # Number of workers per Logstash host. - #worker: 1 - - # Set gzip compression level. - #compression_level: 3 - - # Configure escaping HTML symbols in strings. - #escape_html: false - - # Optional maximum time to live for a connection to Logstash, after which the - # connection will be re-established. A value of `0s` (the default) will - # disable this feature. - # - # Not yet supported for async connections (i.e. with the "pipelining" option set) - #ttl: 30s - - # Optionally load-balance events between Logstash hosts. Default is false. - #loadbalance: false - - # Number of batches to be sent asynchronously to Logstash while processing - # new batches. - #pipelining: 2 - - # If enabled only a subset of events in a batch of events is transferred per - # transaction. The number of events to be sent increases up to `bulk_max_size` - # if no error is encountered. - #slow_start: false - - # The number of seconds to wait before trying to reconnect to Logstash - # after a network error. After waiting backoff.init seconds, the Beat - # tries to reconnect. If the attempt fails, the backoff timer is increased - # exponentially up to backoff.max. After a successful connection, the backoff - # timer is reset. The default is 1s. - #backoff.init: 1s - - # The maximum number of seconds to wait before attempting to connect to - # Logstash after a network error. The default is 60s. - #backoff.max: 60s - - # Optional index name. The default index name is set to journalbeat - # in all lowercase. - #index: 'journalbeat' - - # SOCKS5 proxy server URL - #proxy_url: socks5://user:password@socks5-server:2233 - - # Resolve names locally when using a proxy server. Defaults to false. - #proxy_use_local_resolver: false - - # Use SSL settings for HTTPS. - #ssl.enabled: true - - # Controls the verification of certificates. Valid values are: - # * full, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. - # * strict, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. If the Subject Alternative - # Name is empty, it returns an error. - # * certificate, which verifies that the provided certificate is signed by a - # trusted authority (CA), but does not perform any hostname verification. - # * none, which performs no verification of the server's certificate. This - # mode disables many of the security benefits of SSL/TLS and should only be used - # after very careful consideration. It is primarily intended as a temporary - # diagnostic mechanism when attempting to resolve TLS errors; its use in - # production environments is strongly discouraged. - # The default value is full. - #ssl.verification_mode: full - - # List of supported/valid TLS versions. By default all TLS versions from 1.1 - # up to 1.3 are enabled. - #ssl.supported_protocols: [TLSv1.1, TLSv1.2, TLSv1.3] - - # List of root certificates for HTTPS server verifications - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client certificate key - #ssl.key: "/etc/pki/client/cert.key" - - # Optional passphrase for decrypting the certificate key. - #ssl.key_passphrase: '' - - # Configure cipher suites to be used for SSL connections - #ssl.cipher_suites: [] - - # Configure curve types for ECDHE-based cipher suites - #ssl.curve_types: [] - - # Configure what types of renegotiation are supported. Valid options are - # never, once, and freely. Default is never. - #ssl.renegotiation: never - - # Configure a pin that can be used to do extra validation of the verified certificate chain, - # this allow you to ensure that a specific certificate is used to validate the chain of trust. - # - # The pin is a base64 encoded string of the SHA-256 fingerprint. - #ssl.ca_sha256: "" - - # The number of times to retry publishing an event after a publishing failure. - # After the specified number of retries, the events are typically dropped. - # Some Beats, such as Filebeat and Winlogbeat, ignore the max_retries setting - # and retry until all events are published. Set max_retries to a value less - # than 0 to retry until all events are published. The default is 3. - #max_retries: 3 - - # The maximum number of events to bulk in a single Logstash request. The - # default is 2048. - #bulk_max_size: 2048 - - # The number of seconds to wait for responses from the Logstash server before - # timing out. The default is 30s. - #timeout: 30s - -# -------------------------------- Kafka Output -------------------------------- -#output.kafka: - # Boolean flag to enable or disable the output module. - #enabled: true - - # The list of Kafka broker addresses from which to fetch the cluster metadata. - # The cluster metadata contain the actual Kafka brokers events are published - # to. - #hosts: ["localhost:9092"] - - # The Kafka topic used for produced events. The setting can be a format string - # using any event field. To set the topic from document type use `%{[type]}`. - #topic: beats - - # The Kafka event key setting. Use format string to create a unique event key. - # By default no event key will be generated. - #key: '' - - # The Kafka event partitioning strategy. Default hashing strategy is `hash` - # using the `output.kafka.key` setting or randomly distributes events if - # `output.kafka.key` is not configured. - #partition.hash: - # If enabled, events will only be published to partitions with reachable - # leaders. Default is false. - #reachable_only: false - - # Configure alternative event field names used to compute the hash value. - # If empty `output.kafka.key` setting will be used. - # Default value is empty list. - #hash: [] - - # Authentication details. Password is required if username is set. - #username: '' - #password: '' - - # SASL authentication mechanism used. Can be one of PLAIN, SCRAM-SHA-256 or SCRAM-SHA-512. - # Defaults to PLAIN when `username` and `password` are configured. - #sasl.mechanism: '' - - # Kafka version Journalbeat is assumed to run against. Defaults to the "1.0.0". - #version: '1.0.0' - - # Configure JSON encoding - #codec.json: - # Pretty-print JSON event - #pretty: false - - # Configure escaping HTML symbols in strings. - #escape_html: false - - # Metadata update configuration. Metadata contains leader information - # used to decide which broker to use when publishing. - #metadata: - # Max metadata request retry attempts when cluster is in middle of leader - # election. Defaults to 3 retries. - #retry.max: 3 - - # Wait time between retries during leader elections. Default is 250ms. - #retry.backoff: 250ms - - # Refresh metadata interval. Defaults to every 10 minutes. - #refresh_frequency: 10m - - # Strategy for fetching the topics metadata from the broker. Default is false. - #full: false - - # The number of concurrent load-balanced Kafka output workers. - #worker: 1 - - # The number of times to retry publishing an event after a publishing failure. - # After the specified number of retries, events are typically dropped. - # Some Beats, such as Filebeat, ignore the max_retries setting and retry until - # all events are published. Set max_retries to a value less than 0 to retry - # until all events are published. The default is 3. - #max_retries: 3 - - # The number of seconds to wait before trying to republish to Kafka - # after a network error. After waiting backoff.init seconds, the Beat - # tries to republish. If the attempt fails, the backoff timer is increased - # exponentially up to backoff.max. After a successful publish, the backoff - # timer is reset. The default is 1s. - #backoff.init: 1s - - # The maximum number of seconds to wait before attempting to republish to - # Kafka after a network error. The default is 60s. - #backoff.max: 60s - - # The maximum number of events to bulk in a single Kafka request. The default - # is 2048. - #bulk_max_size: 2048 - - # Duration to wait before sending bulk Kafka request. 0 is no delay. The default - # is 0. - #bulk_flush_frequency: 0s - - # The number of seconds to wait for responses from the Kafka brokers before - # timing out. The default is 30s. - #timeout: 30s - - # The maximum duration a broker will wait for number of required ACKs. The - # default is 10s. - #broker_timeout: 10s - - # The number of messages buffered for each Kafka broker. The default is 256. - #channel_buffer_size: 256 - - # The keep-alive period for an active network connection. If 0s, keep-alives - # are disabled. The default is 0 seconds. - #keep_alive: 0 - - # Sets the output compression codec. Must be one of none, snappy and gzip. The - # default is gzip. - #compression: gzip - - # Set the compression level. Currently only gzip provides a compression level - # between 0 and 9. The default value is chosen by the compression algorithm. - #compression_level: 4 - - # The maximum permitted size of JSON-encoded messages. Bigger messages will be - # dropped. The default value is 1000000 (bytes). This value should be equal to - # or less than the broker's message.max.bytes. - #max_message_bytes: 1000000 - - # The ACK reliability level required from broker. 0=no response, 1=wait for - # local commit, -1=wait for all replicas to commit. The default is 1. Note: - # If set to 0, no ACKs are returned by Kafka. Messages might be lost silently - # on error. - #required_acks: 1 - - # The configurable ClientID used for logging, debugging, and auditing - # purposes. The default is "beats". - #client_id: beats - - # Use SSL settings for HTTPS. - #ssl.enabled: true - - # Controls the verification of certificates. Valid values are: - # * full, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. - # * strict, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. If the Subject Alternative - # Name is empty, it returns an error. - # * certificate, which verifies that the provided certificate is signed by a - # trusted authority (CA), but does not perform any hostname verification. - # * none, which performs no verification of the server's certificate. This - # mode disables many of the security benefits of SSL/TLS and should only be used - # after very careful consideration. It is primarily intended as a temporary - # diagnostic mechanism when attempting to resolve TLS errors; its use in - # production environments is strongly discouraged. - # The default value is full. - #ssl.verification_mode: full - - # List of supported/valid TLS versions. By default all TLS versions from 1.1 - # up to 1.3 are enabled. - #ssl.supported_protocols: [TLSv1.1, TLSv1.2, TLSv1.3] - - # List of root certificates for HTTPS server verifications - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client certificate key - #ssl.key: "/etc/pki/client/cert.key" - - # Optional passphrase for decrypting the certificate key. - #ssl.key_passphrase: '' - - # Configure cipher suites to be used for SSL connections - #ssl.cipher_suites: [] - - # Configure curve types for ECDHE-based cipher suites - #ssl.curve_types: [] - - # Configure what types of renegotiation are supported. Valid options are - # never, once, and freely. Default is never. - #ssl.renegotiation: never - - # Configure a pin that can be used to do extra validation of the verified certificate chain, - # this allow you to ensure that a specific certificate is used to validate the chain of trust. - # - # The pin is a base64 encoded string of the SHA-256 fingerprint. - #ssl.ca_sha256: "" - - # Enable Kerberos support. Kerberos is automatically enabled if any Kerberos setting is set. - #kerberos.enabled: true - - # Authentication type to use with Kerberos. Available options: keytab, password. - #kerberos.auth_type: password - - # Path to the keytab file. It is used when auth_type is set to keytab. - #kerberos.keytab: /etc/security/keytabs/kafka.keytab - - # Path to the Kerberos configuration. - #kerberos.config_path: /etc/krb5.conf - - # The service name. Service principal name is contructed from - # service_name/hostname@realm. - #kerberos.service_name: kafka - - # Name of the Kerberos user. - #kerberos.username: elastic - - # Password of the Kerberos user. It is used when auth_type is set to password. - #kerberos.password: changeme - - # Kerberos realm. - #kerberos.realm: ELASTIC - - # Enables Kerberos FAST authentication. This may - # conflict with certain Active Directory configurations. - #kerberos.enable_krb5_fast: false - -# -------------------------------- Redis Output -------------------------------- -#output.redis: - # Boolean flag to enable or disable the output module. - #enabled: true - - # Configure JSON encoding - #codec.json: - # Pretty print json event - #pretty: false - - # Configure escaping HTML symbols in strings. - #escape_html: false - - # The list of Redis servers to connect to. If load-balancing is enabled, the - # events are distributed to the servers in the list. If one server becomes - # unreachable, the events are distributed to the reachable servers only. - # The hosts setting supports redis and rediss urls with custom password like - # redis://:password@localhost:6379. - #hosts: ["localhost:6379"] - - # The name of the Redis list or channel the events are published to. The - # default is journalbeat. - #key: journalbeat - - # The password to authenticate to Redis with. The default is no authentication. - #password: - - # The Redis database number where the events are published. The default is 0. - #db: 0 - - # The Redis data type to use for publishing events. If the data type is list, - # the Redis RPUSH command is used. If the data type is channel, the Redis - # PUBLISH command is used. The default value is list. - #datatype: list - - # The number of workers to use for each host configured to publish events to - # Redis. Use this setting along with the loadbalance option. For example, if - # you have 2 hosts and 3 workers, in total 6 workers are started (3 for each - # host). - #worker: 1 - - # If set to true and multiple hosts or workers are configured, the output - # plugin load balances published events onto all Redis hosts. If set to false, - # the output plugin sends all events to only one host (determined at random) - # and will switch to another host if the currently selected one becomes - # unreachable. The default value is true. - #loadbalance: true - - # The Redis connection timeout in seconds. The default is 5 seconds. - #timeout: 5s - - # The number of times to retry publishing an event after a publishing failure. - # After the specified number of retries, the events are typically dropped. - # Some Beats, such as Filebeat, ignore the max_retries setting and retry until - # all events are published. Set max_retries to a value less than 0 to retry - # until all events are published. The default is 3. - #max_retries: 3 - - # The number of seconds to wait before trying to reconnect to Redis - # after a network error. After waiting backoff.init seconds, the Beat - # tries to reconnect. If the attempt fails, the backoff timer is increased - # exponentially up to backoff.max. After a successful connection, the backoff - # timer is reset. The default is 1s. - #backoff.init: 1s - - # The maximum number of seconds to wait before attempting to connect to - # Redis after a network error. The default is 60s. - #backoff.max: 60s - - # The maximum number of events to bulk in a single Redis request or pipeline. - # The default is 2048. - #bulk_max_size: 2048 - - # The URL of the SOCKS5 proxy to use when connecting to the Redis servers. The - # value must be a URL with a scheme of socks5://. - #proxy_url: - - # This option determines whether Redis hostnames are resolved locally when - # using a proxy. The default value is false, which means that name resolution - # occurs on the proxy server. - #proxy_use_local_resolver: false - - # Use SSL settings for HTTPS. - #ssl.enabled: true - - # Controls the verification of certificates. Valid values are: - # * full, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. - # * strict, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. If the Subject Alternative - # Name is empty, it returns an error. - # * certificate, which verifies that the provided certificate is signed by a - # trusted authority (CA), but does not perform any hostname verification. - # * none, which performs no verification of the server's certificate. This - # mode disables many of the security benefits of SSL/TLS and should only be used - # after very careful consideration. It is primarily intended as a temporary - # diagnostic mechanism when attempting to resolve TLS errors; its use in - # production environments is strongly discouraged. - # The default value is full. - #ssl.verification_mode: full - - # List of supported/valid TLS versions. By default all TLS versions from 1.1 - # up to 1.3 are enabled. - #ssl.supported_protocols: [TLSv1.1, TLSv1.2, TLSv1.3] - - # List of root certificates for HTTPS server verifications - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client certificate key - #ssl.key: "/etc/pki/client/cert.key" - - # Optional passphrase for decrypting the certificate key. - #ssl.key_passphrase: '' - - # Configure cipher suites to be used for SSL connections - #ssl.cipher_suites: [] - - # Configure curve types for ECDHE-based cipher suites - #ssl.curve_types: [] - - # Configure what types of renegotiation are supported. Valid options are - # never, once, and freely. Default is never. - #ssl.renegotiation: never - - # Configure a pin that can be used to do extra validation of the verified certificate chain, - # this allow you to ensure that a specific certificate is used to validate the chain of trust. - # - # The pin is a base64 encoded string of the SHA-256 fingerprint. - #ssl.ca_sha256: "" - - -# -------------------------------- File Output --------------------------------- -#output.file: - # Boolean flag to enable or disable the output module. - #enabled: true - - # Configure JSON encoding - #codec.json: - # Pretty-print JSON event - #pretty: false - - # Configure escaping HTML symbols in strings. - #escape_html: false - - # Path to the directory where to save the generated files. The option is - # mandatory. - #path: "/tmp/journalbeat" - - # Name of the generated files. The default is `journalbeat` and it generates - # files: `journalbeat`, `journalbeat.1`, `journalbeat.2`, etc. - #filename: journalbeat - - # Maximum size in kilobytes of each file. When this size is reached, and on - # every Journalbeat restart, the files are rotated. The default value is 10240 - # kB. - #rotate_every_kb: 10000 - - # Maximum number of files under path. When this number of files is reached, - # the oldest file is deleted and the rest are shifted from last to first. The - # default is 7 files. - #number_of_files: 7 - - # Permissions to use for file creation. The default is 0600. - #permissions: 0600 - - # Configure automatic file rotation on every startup. The default is true. - #rotate_on_startup: true -# ------------------------------- Console Output ------------------------------- -#output.console: - # Boolean flag to enable or disable the output module. - #enabled: true - - # Configure JSON encoding - #codec.json: - # Pretty-print JSON event - #pretty: false - - # Configure escaping HTML symbols in strings. - #escape_html: false - -# =================================== Paths ==================================== - -# The home path for the Journalbeat installation. This is the default base path -# for all other path settings and for miscellaneous files that come with the -# distribution (for example, the sample dashboards). -# If not set by a CLI flag or in the configuration file, the default for the -# home path is the location of the binary. -#path.home: - -# The configuration path for the Journalbeat installation. This is the default -# base path for configuration files, including the main YAML configuration file -# and the Elasticsearch template file. If not set by a CLI flag or in the -# configuration file, the default for the configuration path is the home path. -#path.config: ${path.home} - -# The data path for the Journalbeat installation. This is the default base path -# for all the files in which Journalbeat needs to store its data. If not set by a -# CLI flag or in the configuration file, the default for the data path is a data -# subdirectory inside the home path. -#path.data: ${path.home}/data - -# The logs path for a Journalbeat installation. This is the default location for -# the Beat's log files. If not set by a CLI flag or in the configuration file, -# the default for the logs path is a logs subdirectory inside the home path. -#path.logs: ${path.home}/logs - -# ================================== Keystore ================================== - -# Location of the Keystore containing the keys and their sensitive values. -#keystore.path: "${path.config}/beats.keystore" - -# ================================= Dashboards ================================= - -# These settings control loading the sample dashboards to the Kibana index. Loading -# the dashboards are disabled by default and can be enabled either by setting the -# options here, or by using the `-setup` CLI flag or the `setup` command. -#setup.dashboards.enabled: false - -# The directory from where to read the dashboards. The default is the `kibana` -# folder in the home path. -#setup.dashboards.directory: ${path.home}/kibana - -# The URL from where to download the dashboards archive. It is used instead of -# the directory if it has a value. -#setup.dashboards.url: - -# The file archive (zip file) from where to read the dashboards. It is used instead -# of the directory when it has a value. -#setup.dashboards.file: - -# In case the archive contains the dashboards from multiple Beats, this lets you -# select which one to load. You can load all the dashboards in the archive by -# setting this to the empty string. -#setup.dashboards.beat: journalbeat - -# The name of the Kibana index to use for setting the configuration. Default is ".kibana" -#setup.dashboards.kibana_index: .kibana - -# The Elasticsearch index name. This overwrites the index name defined in the -# dashboards and index pattern. Example: testbeat-* -#setup.dashboards.index: - -# Always use the Kibana API for loading the dashboards instead of autodetecting -# how to install the dashboards by first querying Elasticsearch. -#setup.dashboards.always_kibana: false - -# If true and Kibana is not reachable at the time when dashboards are loaded, -# it will retry to reconnect to Kibana instead of exiting with an error. -#setup.dashboards.retry.enabled: false - -# Duration interval between Kibana connection retries. -#setup.dashboards.retry.interval: 1s - -# Maximum number of retries before exiting with an error, 0 for unlimited retrying. -#setup.dashboards.retry.maximum: 0 - -# ================================== Template ================================== - -# A template is used to set the mapping in Elasticsearch -# By default template loading is enabled and the template is loaded. -# These settings can be adjusted to load your own template or overwrite existing ones. - -# Set to false to disable template loading. -#setup.template.enabled: true - -# Select the kind of index template. From Elasticsearch 7.8, it is possible to -# use component templates. Available options: legacy, component, index. -# By default journalbeat uses the legacy index templates. -#setup.template.type: legacy - -# Template name. By default the template name is "journalbeat-%{[agent.version]}" -# The template name and pattern has to be set in case the Elasticsearch index pattern is modified. -#setup.template.name: "journalbeat-%{[agent.version]}" - -# Template pattern. By default the template pattern is "-%{[agent.version]}-*" to apply to the default index settings. -# The first part is the version of the beat and then -* is used to match all daily indices. -# The template name and pattern has to be set in case the Elasticsearch index pattern is modified. -#setup.template.pattern: "journalbeat-%{[agent.version]}-*" - -# Path to fields.yml file to generate the template -#setup.template.fields: "${path.config}/fields.yml" - -# A list of fields to be added to the template and Kibana index pattern. Also -# specify setup.template.overwrite: true to overwrite the existing template. -#setup.template.append_fields: -#- name: field_name -# type: field_type - -# Enable JSON template loading. If this is enabled, the fields.yml is ignored. -#setup.template.json.enabled: false - -# Path to the JSON template file -#setup.template.json.path: "${path.config}/template.json" - -# Name under which the template is stored in Elasticsearch -#setup.template.json.name: "" - -# Overwrite existing template -# Do not enable this option for more than one instance of journalbeat as it might -# overload your Elasticsearch with too many update requests. -#setup.template.overwrite: false - -# Elasticsearch template settings -setup.template.settings: - - # A dictionary of settings to place into the settings.index dictionary - # of the Elasticsearch template. For more details, please check - # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html - #index: - #number_of_shards: 1 - #codec: best_compression - - # A dictionary of settings for the _source field. For more details, please check - # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html - #_source: - #enabled: false - -# ====================== Index Lifecycle Management (ILM) ====================== - -# Configure index lifecycle management (ILM). These settings create a write -# alias and add additional settings to the index template. When ILM is enabled, -# output.elasticsearch.index is ignored, and the write alias is used to set the -# index name. - -# Enable ILM support. Valid values are true, false, and auto. When set to auto -# (the default), the Beat uses index lifecycle management when it connects to a -# cluster that supports ILM; otherwise, it creates daily indices. -#setup.ilm.enabled: auto - -# Set the prefix used in the index lifecycle write alias name. The default alias -# name is 'journalbeat-%{[agent.version]}'. -#setup.ilm.rollover_alias: 'journalbeat' - -# Set the rollover index pattern. The default is "%{now/d}-000001". -#setup.ilm.pattern: "{now/d}-000001" - -# Set the lifecycle policy name. The default policy name is -# 'beatname'. -#setup.ilm.policy_name: "mypolicy" - -# The path to a JSON file that contains a lifecycle policy configuration. Used -# to load your own lifecycle policy. -#setup.ilm.policy_file: - -# Disable the check for an existing lifecycle policy. The default is true. If -# you disable this check, set setup.ilm.overwrite: true so the lifecycle policy -# can be installed. -#setup.ilm.check_exists: true - -# Overwrite the lifecycle policy at startup. The default is false. -#setup.ilm.overwrite: false - -# =================================== Kibana =================================== - -# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API. -# This requires a Kibana endpoint configuration. -setup.kibana: - - # Kibana Host - # Scheme and port can be left out and will be set to the default (http and 5601) - # In case you specify and additional path, the scheme is required: http://localhost:5601/path - # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601 - #host: "localhost:5601" - - # Optional protocol and basic auth credentials. - #protocol: "https" - #username: "elastic" - #password: "changeme" - - # Optional HTTP path - #path: "" - - # Optional Kibana space ID. - #space.id: "" - - # Custom HTTP headers to add to each request - #headers: - # X-My-Header: Contents of the header - - # Use SSL settings for HTTPS. - #ssl.enabled: true - - # Controls the verification of certificates. Valid values are: - # * full, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. - # * strict, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. If the Subject Alternative - # Name is empty, it returns an error. - # * certificate, which verifies that the provided certificate is signed by a - # trusted authority (CA), but does not perform any hostname verification. - # * none, which performs no verification of the server's certificate. This - # mode disables many of the security benefits of SSL/TLS and should only be used - # after very careful consideration. It is primarily intended as a temporary - # diagnostic mechanism when attempting to resolve TLS errors; its use in - # production environments is strongly discouraged. - # The default value is full. - #ssl.verification_mode: full - - # List of supported/valid TLS versions. By default all TLS versions from 1.1 - # up to 1.3 are enabled. - #ssl.supported_protocols: [TLSv1.1, TLSv1.2, TLSv1.3] - - # List of root certificates for HTTPS server verifications - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client certificate key - #ssl.key: "/etc/pki/client/cert.key" - - # Optional passphrase for decrypting the certificate key. - #ssl.key_passphrase: '' - - # Configure cipher suites to be used for SSL connections - #ssl.cipher_suites: [] - - # Configure curve types for ECDHE-based cipher suites - #ssl.curve_types: [] - - # Configure what types of renegotiation are supported. Valid options are - # never, once, and freely. Default is never. - #ssl.renegotiation: never - - # Configure a pin that can be used to do extra validation of the verified certificate chain, - # this allow you to ensure that a specific certificate is used to validate the chain of trust. - # - # The pin is a base64 encoded string of the SHA-256 fingerprint. - #ssl.ca_sha256: "" - - -# ================================== Logging =================================== - -# There are four options for the log output: file, stderr, syslog, eventlog -# The file output is the default. - -# Sets log level. The default log level is info. -# Available log levels are: error, warning, info, debug -#logging.level: info - -# Enable debug output for selected components. To enable all selectors use ["*"] -# Other available selectors are "beat", "publisher", "service" -# Multiple selectors can be chained. -#logging.selectors: [ ] - -# Send all logging output to stderr. The default is false. -#logging.to_stderr: false - -# Send all logging output to syslog. The default is false. -#logging.to_syslog: false - -# Send all logging output to Windows Event Logs. The default is false. -#logging.to_eventlog: false - -# If enabled, Journalbeat periodically logs its internal metrics that have changed -# in the last period. For each metric that changed, the delta from the value at -# the beginning of the period is logged. Also, the total values for -# all non-zero internal metrics are logged on shutdown. The default is true. -#logging.metrics.enabled: true - -# The period after which to log the internal metrics. The default is 30s. -#logging.metrics.period: 30s - -# A list of metrics namespaces to report in the logs. Defaults to [stats]. -# `stats` contains general Beat metrics. `dataset` may be present in some -# Beats and contains module or input metrics. -#logging.metrics.namespaces: [stats] - -# Logging to rotating files. Set logging.to_files to false to disable logging to -# files. -logging.to_files: true -logging.files: - # Configure the path where the logs are written. The default is the logs directory - # under the home path (the binary location). - #path: /var/log/journalbeat - - # The name of the files where the logs are written to. - #name: journalbeat - - # Configure log file size limit. If limit is reached, log file will be - # automatically rotated - #rotateeverybytes: 10485760 # = 10MB - - # Number of rotated log files to keep. Oldest files will be deleted first. - #keepfiles: 7 - - # The permissions mask to apply when rotating log files. The default value is 0600. - # Must be a valid Unix-style file permissions mask expressed in octal notation. - #permissions: 0600 - - # Enable log file rotation on time intervals in addition to size-based rotation. - # Intervals must be at least 1s. Values of 1m, 1h, 24h, 7*24h, 30*24h, and 365*24h - # are boundary-aligned with minutes, hours, days, weeks, months, and years as - # reported by the local system clock. All other intervals are calculated from the - # Unix epoch. Defaults to disabled. - #interval: 0 - - # Rotate existing logs on startup rather than appending to the existing - # file. Defaults to true. - # rotateonstartup: true - -# ============================= X-Pack Monitoring ============================== -# Journalbeat can export internal metrics to a central Elasticsearch monitoring -# cluster. This requires xpack monitoring to be enabled in Elasticsearch. The -# reporting is disabled by default. - -# Set to true to enable the monitoring reporter. -#monitoring.enabled: false - -# Sets the UUID of the Elasticsearch cluster under which monitoring data for this -# Journalbeat instance will appear in the Stack Monitoring UI. If output.elasticsearch -# is enabled, the UUID is derived from the Elasticsearch cluster referenced by output.elasticsearch. -#monitoring.cluster_uuid: - -# Uncomment to send the metrics to Elasticsearch. Most settings from the -# Elasticsearch output are accepted here as well. -# Note that the settings should point to your Elasticsearch *monitoring* cluster. -# Any setting that is not set is automatically inherited from the Elasticsearch -# output configuration, so if you have the Elasticsearch output configured such -# that it is pointing to your Elasticsearch monitoring cluster, you can simply -# uncomment the following line. -#monitoring.elasticsearch: - - # Array of hosts to connect to. - # Scheme and port can be left out and will be set to the default (http and 9200) - # In case you specify and additional path, the scheme is required: http://localhost:9200/path - # IPv6 addresses should always be defined as: https://[2001:db8::1]:9200 - #hosts: ["localhost:9200"] - - # Set gzip compression level. - #compression_level: 0 - - # Protocol - either `http` (default) or `https`. - #protocol: "https" - - # Authentication credentials - either API key or username/password. - #api_key: "id:api_key" - #username: "beats_system" - #password: "changeme" - - # Dictionary of HTTP parameters to pass within the URL with index operations. - #parameters: - #param1: value1 - #param2: value2 - - # Custom HTTP headers to add to each request - #headers: - # X-My-Header: Contents of the header - - # Proxy server url - #proxy_url: http://proxy:3128 - - # The number of times a particular Elasticsearch index operation is attempted. If - # the indexing operation doesn't succeed after this many retries, the events are - # dropped. The default is 3. - #max_retries: 3 - - # The maximum number of events to bulk in a single Elasticsearch bulk API index request. - # The default is 50. - #bulk_max_size: 50 - - # The number of seconds to wait before trying to reconnect to Elasticsearch - # after a network error. After waiting backoff.init seconds, the Beat - # tries to reconnect. If the attempt fails, the backoff timer is increased - # exponentially up to backoff.max. After a successful connection, the backoff - # timer is reset. The default is 1s. - #backoff.init: 1s - - # The maximum number of seconds to wait before attempting to connect to - # Elasticsearch after a network error. The default is 60s. - #backoff.max: 60s - - # Configure HTTP request timeout before failing an request to Elasticsearch. - #timeout: 90 - - # Use SSL settings for HTTPS. - #ssl.enabled: true - - # Controls the verification of certificates. Valid values are: - # * full, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. - # * strict, which verifies that the provided certificate is signed by a trusted - # authority (CA) and also verifies that the server's hostname (or IP address) - # matches the names identified within the certificate. If the Subject Alternative - # Name is empty, it returns an error. - # * certificate, which verifies that the provided certificate is signed by a - # trusted authority (CA), but does not perform any hostname verification. - # * none, which performs no verification of the server's certificate. This - # mode disables many of the security benefits of SSL/TLS and should only be used - # after very careful consideration. It is primarily intended as a temporary - # diagnostic mechanism when attempting to resolve TLS errors; its use in - # production environments is strongly discouraged. - # The default value is full. - #ssl.verification_mode: full - - # List of supported/valid TLS versions. By default all TLS versions from 1.1 - # up to 1.3 are enabled. - #ssl.supported_protocols: [TLSv1.1, TLSv1.2, TLSv1.3] - - # List of root certificates for HTTPS server verifications - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client certificate key - #ssl.key: "/etc/pki/client/cert.key" - - # Optional passphrase for decrypting the certificate key. - #ssl.key_passphrase: '' - - # Configure cipher suites to be used for SSL connections - #ssl.cipher_suites: [] - - # Configure curve types for ECDHE-based cipher suites - #ssl.curve_types: [] - - # Configure what types of renegotiation are supported. Valid options are - # never, once, and freely. Default is never. - #ssl.renegotiation: never - - # Configure a pin that can be used to do extra validation of the verified certificate chain, - # this allow you to ensure that a specific certificate is used to validate the chain of trust. - # - # The pin is a base64 encoded string of the SHA-256 fingerprint. - #ssl.ca_sha256: "" - - # Enable Kerberos support. Kerberos is automatically enabled if any Kerberos setting is set. - #kerberos.enabled: true - - # Authentication type to use with Kerberos. Available options: keytab, password. - #kerberos.auth_type: password - - # Path to the keytab file. It is used when auth_type is set to keytab. - #kerberos.keytab: /etc/elastic.keytab - - # Path to the Kerberos configuration. - #kerberos.config_path: /etc/krb5.conf - - # Name of the Kerberos user. - #kerberos.username: elastic - - # Password of the Kerberos user. It is used when auth_type is set to password. - #kerberos.password: changeme - - # Kerberos realm. - #kerberos.realm: ELASTIC - - #metrics.period: 10s - #state.period: 1m - -# The `monitoring.cloud.id` setting overwrites the `monitoring.elasticsearch.hosts` -# setting. You can find the value for this setting in the Elastic Cloud web UI. -#monitoring.cloud.id: - -# The `monitoring.cloud.auth` setting overwrites the `monitoring.elasticsearch.username` -# and `monitoring.elasticsearch.password` settings. The format is `:`. -#monitoring.cloud.auth: - -# =============================== HTTP Endpoint ================================ - -# Each beat can expose internal metrics through a HTTP endpoint. For security -# reasons the endpoint is disabled by default. This feature is currently experimental. -# Stats can be access through http://localhost:5066/stats . For pretty JSON output -# append ?pretty to the URL. - -# Defines if the HTTP endpoint is enabled. -#http.enabled: false - -# The HTTP endpoint will bind to this hostname, IP address, unix socket or named pipe. -# When using IP addresses, it is recommended to only use localhost. -#http.host: localhost - -# Port on which the HTTP endpoint will bind. Default is 5066. -#http.port: 5066 - -# Define which user should be owning the named pipe. -#http.named_pipe.user: - -# Define which the permissions that should be applied to the named pipe, use the Security -# Descriptor Definition Language (SDDL) to define the permission. This option cannot be used with -# `http.user`. -#http.named_pipe.security_descriptor: - -# Defines if the HTTP pprof endpoints are enabled. -# It is recommended that this is only enabled on localhost as these endpoints may leak data. -#http.pprof.enabled: false - -# ============================== Process Security ============================== - -# Enable or disable seccomp system call filtering on Linux. Default is enabled. -#seccomp.enabled: true - -# ============================== Instrumentation =============================== - -# Instrumentation support for the journalbeat. -#instrumentation: - # Set to true to enable instrumentation of journalbeat. - #enabled: false - - # Environment in which journalbeat is running on (eg: staging, production, etc.) - #environment: "" - - # APM Server hosts to report instrumentation results to. - #hosts: - # - http://localhost:8200 - - # API Key for the APM Server(s). - # If api_key is set then secret_token will be ignored. - #api_key: - - # Secret token for the APM Server(s). - #secret_token: - - # Enable profiling of the server, recording profile samples as events. - # - # This feature is experimental. - #profiling: - #cpu: - # Set to true to enable CPU profiling. - #enabled: false - #interval: 60s - #duration: 10s - #heap: - # Set to true to enable heap profiling. - #enabled: false - #interval: 60s - -# ================================= Migration ================================== - -# This allows to enable 6.7 migration aliases -#migration.6_to_7.enabled: false - diff --git a/journalbeat/journalbeat.yml b/journalbeat/journalbeat.yml deleted file mode 100644 index e049dbc908e..00000000000 --- a/journalbeat/journalbeat.yml +++ /dev/null @@ -1,217 +0,0 @@ -###################### Journalbeat Configuration Example ######################### - -# This file is an example configuration file highlighting only the most common -# options. The journalbeat.reference.yml file from the same directory contains all the -# supported options with more comments. You can use it as a reference. -# -# You can find the full configuration reference here: -# https://www.elastic.co/guide/en/beats/journalbeat/index.html - -# For more available modules and options, please see the journalbeat.reference.yml sample -# configuration file. - -# ============================= Journalbeat inputs ============================= - -journalbeat.inputs: - # Paths that should be crawled and fetched. Possible values files and directories. - # When setting a directory, all journals under it are merged. - # When empty starts to read from local journal. -- paths: [] - - # An optional unique identifier for the input. By providing a unique `id` you - # can operate multiple inputs on the same journal. This allows each input's - # cursor to be persisted independently in the registry file. - #id: "" - - # The number of seconds to wait before trying to read again from journals. - #backoff: 1s - # The maximum number of seconds to wait before attempting to read again from journals. - #max_backoff: 20s - - # Position to start reading from journal. Valid values: head, tail, cursor - seek: cursor - # Fallback position if no cursor data is available. - #cursor_seek_fallback: head - - # Exact matching for field values of events. - # Matching for nginx entries: "systemd.unit=nginx" - #include_matches: [] - - # Optional fields that you can specify to add additional information to the - # output. Fields can be scalar values, arrays, dictionaries, or any nested - # combination of these. - #fields: - # env: staging - - -# ========================= Journalbeat global options ========================= -#journalbeat: - # Name of the registry file. If a relative path is used, it is considered relative to the - # data path. - #registry_file: registry - -# ======================= Elasticsearch template setting ======================= -setup.template.settings: - index.number_of_shards: 1 - #index.codec: best_compression - #_source.enabled: false - -# ================================== General =================================== - -# The name of the shipper that publishes the network data. It can be used to group -# all the transactions sent by a single shipper in the web interface. -#name: - -# The tags of the shipper are included in their own field with each -# transaction published. -#tags: ["service-X", "web-tier"] - -# Optional fields that you can specify to add additional information to the -# output. -#fields: -# env: staging - -# ================================= Dashboards ================================= -# These settings control loading the sample dashboards to the Kibana index. Loading -# the dashboards is disabled by default and can be enabled either by setting the -# options here or by using the `setup` command. -#setup.dashboards.enabled: false - -# The URL from where to download the dashboards archive. By default this URL -# has a value which is computed based on the Beat name and version. For released -# versions, this URL points to the dashboard archive on the artifacts.elastic.co -# website. -#setup.dashboards.url: - -# =================================== Kibana =================================== - -# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API. -# This requires a Kibana endpoint configuration. -setup.kibana: - - # Kibana Host - # Scheme and port can be left out and will be set to the default (http and 5601) - # In case you specify and additional path, the scheme is required: http://localhost:5601/path - # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601 - #host: "localhost:5601" - - # Kibana Space ID - # ID of the Kibana Space into which the dashboards should be loaded. By default, - # the Default Space will be used. - #space.id: - -# =============================== Elastic Cloud ================================ - -# These settings simplify using Journalbeat with the Elastic Cloud (https://cloud.elastic.co/). - -# The cloud.id setting overwrites the `output.elasticsearch.hosts` and -# `setup.kibana.host` options. -# You can find the `cloud.id` in the Elastic Cloud web UI. -#cloud.id: - -# The cloud.auth setting overwrites the `output.elasticsearch.username` and -# `output.elasticsearch.password` settings. The format is `:`. -#cloud.auth: - -# ================================== Outputs =================================== - -# Configure what output to use when sending the data collected by the beat. - -# ---------------------------- Elasticsearch Output ---------------------------- -output.elasticsearch: - # Array of hosts to connect to. - hosts: ["localhost:9200"] - - # Protocol - either `http` (default) or `https`. - #protocol: "https" - - # Authentication credentials - either API key or username/password. - #api_key: "id:api_key" - #username: "elastic" - #password: "changeme" - -# ------------------------------ Logstash Output ------------------------------- -#output.logstash: - # The Logstash hosts - #hosts: ["localhost:5044"] - - # Optional SSL. By default is off. - # List of root certificates for HTTPS server verifications - #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] - - # Certificate for SSL client authentication - #ssl.certificate: "/etc/pki/client/cert.pem" - - # Client Certificate Key - #ssl.key: "/etc/pki/client/cert.key" - -# ================================= Processors ================================= - -# Configure processors to enhance or manipulate events generated by the beat. - -processors: - - add_host_metadata: ~ - - add_cloud_metadata: ~ - - add_docker_metadata: ~ - - -# ================================== Logging =================================== - -# Sets log level. The default log level is info. -# Available log levels are: error, warning, info, debug -#logging.level: debug - -# At debug level, you can selectively enable logging only for some components. -# To enable all selectors use ["*"]. Examples of other selectors are "beat", -# "publisher", "service". -#logging.selectors: ["*"] - -# ============================= X-Pack Monitoring ============================== -# Journalbeat can export internal metrics to a central Elasticsearch monitoring -# cluster. This requires xpack monitoring to be enabled in Elasticsearch. The -# reporting is disabled by default. - -# Set to true to enable the monitoring reporter. -#monitoring.enabled: false - -# Sets the UUID of the Elasticsearch cluster under which monitoring data for this -# Journalbeat instance will appear in the Stack Monitoring UI. If output.elasticsearch -# is enabled, the UUID is derived from the Elasticsearch cluster referenced by output.elasticsearch. -#monitoring.cluster_uuid: - -# Uncomment to send the metrics to Elasticsearch. Most settings from the -# Elasticsearch output are accepted here as well. -# Note that the settings should point to your Elasticsearch *monitoring* cluster. -# Any setting that is not set is automatically inherited from the Elasticsearch -# output configuration, so if you have the Elasticsearch output configured such -# that it is pointing to your Elasticsearch monitoring cluster, you can simply -# uncomment the following line. -#monitoring.elasticsearch: - -# ============================== Instrumentation =============================== - -# Instrumentation support for the journalbeat. -#instrumentation: - # Set to true to enable instrumentation of journalbeat. - #enabled: false - - # Environment in which journalbeat is running on (eg: staging, production, etc.) - #environment: "" - - # APM Server hosts to report instrumentation results to. - #hosts: - # - http://localhost:8200 - - # API Key for the APM Server(s). - # If api_key is set then secret_token will be ignored. - #api_key: - - # Secret token for the APM Server(s). - #secret_token: - - -# ================================= Migration ================================== - -# This allows to enable 6.7 migration aliases -#migration.6_to_7.enabled: true - diff --git a/journalbeat/magefile.go b/journalbeat/magefile.go deleted file mode 100644 index 0ba6de46d4b..00000000000 --- a/journalbeat/magefile.go +++ /dev/null @@ -1,171 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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. - -//go:build mage -// +build mage - -package main - -import ( - "fmt" - "runtime" - "strings" - "time" - - "github.com/magefile/mage/mg" - "github.com/magefile/mage/sh" - - devtools "github.com/elastic/beats/v7/dev-tools/mage" - - // mage:import - "github.com/elastic/beats/v7/dev-tools/mage/target/common" - // mage:import - _ "github.com/elastic/beats/v7/dev-tools/mage/target/integtest/notests" - // mage:import - _ "github.com/elastic/beats/v7/dev-tools/mage/target/unittest" - // mage:import - _ "github.com/elastic/beats/v7/dev-tools/mage/target/test" -) - -func init() { - common.RegisterCheckDeps(Update) - - devtools.BeatDescription = "Journalbeat ships systemd journal entries to Elasticsearch or Logstash." - - devtools.Platforms = devtools.Platforms.Filter("linux !linux/ppc64 !linux/mips64") -} - -const ( - libsystemdDevPkgName = "libsystemd-dev" - libsystemdPkgName = "libsystemd0" - libgcryptPkgName = "libgcrypt20" -) - -// Build builds the Beat binary. -func Build() error { - return devtools.Build(devtools.DefaultBuildArgs()) -} - -// GolangCrossBuild build the Beat binary inside of the golang-builder. -// Do not use directly, use crossBuild instead. -func GolangCrossBuild() error { - mg.Deps(deps.Installer(devtools.Platform.Name)) - return devtools.GolangCrossBuild(devtools.DefaultGolangCrossBuildArgs()) -} - -// BuildGoDaemon builds the go-daemon binary (use crossBuildGoDaemon). -func BuildGoDaemon() error { - return devtools.BuildGoDaemon() -} - -// CrossBuild cross-builds the beat for all target platforms. -func CrossBuild() error { - return devtools.CrossBuild(devtools.ImageSelector(selectImage)) -} - -// CrossBuildXPack cross-builds the beat with XPack for all target platforms. -func CrossBuildXPack() error { - return devtools.CrossBuildXPack(devtools.ImageSelector(selectImage)) -} - -// CrossBuildGoDaemon cross-builds the go-daemon binary using Docker. -func CrossBuildGoDaemon() error { - return devtools.CrossBuildGoDaemon(devtools.ImageSelector(selectImage)) -} - -// Package packages the Beat for distribution. -// Use SNAPSHOT=true to build snapshots. -// Use PLATFORMS to control the target platforms. -func Package() { - start := time.Now() - defer func() { fmt.Println("package ran for", time.Since(start)) }() - - devtools.UseElasticBeatPackaging() - - mg.Deps(Update) - mg.Deps(CrossBuild, CrossBuildXPack, CrossBuildGoDaemon) - mg.SerialDeps(devtools.Package, TestPackages) -} - -// TestPackages tests the generated packages (i.e. file modes, owners, groups). -func TestPackages() error { - return devtools.TestPackages() -} - -// Update updates the generated files (aka make update). -func Update() error { - return sh.Run("make", "update") -} - -// Fields generates a fields.yml for the Beat. -func Fields() error { - return devtools.GenerateFieldsYAML() -} - -// ----------------------------------------------------------------------------- -// Customizations specific to Journalbeat. -// - Install required headers on builders for different architectures. - -var ( - journaldPlatforms = []devtools.PlatformDescription{ - devtools.Linux386, devtools.LinuxAMD64, - devtools.LinuxARM64, devtools.LinuxARM5, devtools.LinuxARM6, devtools.LinuxARM7, - devtools.LinuxMIPS, devtools.LinuxMIPSLE, devtools.LinuxMIPS64LE, - devtools.LinuxPPC64LE, - devtools.LinuxS390x, - } - - deps = devtools.NewPackageInstaller(). - AddEach(journaldPlatforms, libsystemdDevPkgName). - Add(devtools.Linux386, libsystemdPkgName, libgcryptPkgName) -) - -func selectImage(platform string) (string, error) { - tagSuffix := "main" - - switch { - case strings.HasPrefix(platform, "linux/armv7"): - tagSuffix = "armhf" - case strings.HasPrefix(platform, "linux/arm"): - tagSuffix = "arm" - if runtime.GOARCH == "arm64" { - tagSuffix = "base-arm-debian9" - } - case strings.HasPrefix(platform, "linux/mips"): - tagSuffix = "mips" - case strings.HasPrefix(platform, "linux/ppc"): - tagSuffix = "ppc" - case platform == "linux/s390x": - tagSuffix = "s390x" - case strings.HasPrefix(platform, "linux"): - tagSuffix = "main-debian8" - } - - goVersion, err := devtools.GoVersion() - if err != nil { - return "", err - } - - return devtools.BeatsCrossBuildImage + ":" + goVersion + "-" + tagSuffix, nil -} - -// Config generates both the short/reference/docker configs. -func Config() error { - p := devtools.DefaultConfigFileParams() - p.Templates = append(p.Templates, devtools.OSSBeatDir("_meta/config/*.tmpl")) - return devtools.Config(devtools.AllConfigTypes, p, ".") -} diff --git a/journalbeat/main.go b/journalbeat/main.go deleted file mode 100644 index 56c0e645406..00000000000 --- a/journalbeat/main.go +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 main - -import ( - "os" - - "github.com/elastic/beats/v7/journalbeat/cmd" -) - -func main() { - if err := cmd.RootCmd.Execute(); err != nil { - os.Exit(1) - } -} diff --git a/journalbeat/main_test.go b/journalbeat/main_test.go deleted file mode 100644 index 7881c30d52c..00000000000 --- a/journalbeat/main_test.go +++ /dev/null @@ -1,49 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 main - -// This file is mandatory as otherwise the journalbeat.test binary is not generated correctly. - -import ( - "flag" - "testing" - - "github.com/elastic/beats/v7/journalbeat/cmd" - "github.com/elastic/beats/v7/libbeat/tests/system/template" -) - -var systemTest *bool - -func init() { - testing.Init() - systemTest = flag.Bool("systemTest", false, "Set to true when running system tests") - - cmd.RootCmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("systemTest")) - cmd.RootCmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("test.coverprofile")) -} - -// Test started when the test binary is started. Only calls main. -func TestSystem(t *testing.T) { - if *systemTest { - main() - } -} - -func TestTemplate(t *testing.T) { - template.TestTemplate(t, cmd.Name, false) -} diff --git a/journalbeat/reader/config.go b/journalbeat/reader/config.go deleted file mode 100644 index e559681aea7..00000000000 --- a/journalbeat/reader/config.go +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 reader - -import ( - "time" - - "github.com/elastic/beats/v7/journalbeat/pkg/journalfield" - "github.com/elastic/beats/v7/journalbeat/pkg/journalread" -) - -// Config stores the options of a reder. -type Config struct { - // Path is the path to the journal file. - Path string - // Seek specifies the seeking stategy. - // Possible values: head, tail, cursor. - Seek journalread.SeekMode - // CursorSeekFallback sets where to seek if registry file is not available. - CursorSeekFallback journalread.SeekMode - // MaxBackoff is the limit of the backoff time. - MaxBackoff time.Duration - // Backoff is the current interval to wait before - // attemting to read again from the journal. - Backoff time.Duration - // Matches store the key value pairs to match entries. - Matches []journalfield.Matcher - // SaveRemoteHostname defines if the original source of the entry needs to be saved. - SaveRemoteHostname bool - // CheckpointID is the identifier to use when persisting state. - CheckpointID string -} - -const ( - // LocalSystemJournalID is the ID of the local system journal. - LocalSystemJournalID = "LOCAL_SYSTEM_JOURNAL" -) diff --git a/journalbeat/reader/fields.go b/journalbeat/reader/fields.go deleted file mode 100644 index 7076a92a19d..00000000000 --- a/journalbeat/reader/fields.go +++ /dev/null @@ -1,21 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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. - -//go:build linux && cgo -// +build linux,cgo - -package reader diff --git a/journalbeat/reader/journal.go b/journalbeat/reader/journal.go deleted file mode 100644 index 93fc3963348..00000000000 --- a/journalbeat/reader/journal.go +++ /dev/null @@ -1,151 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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. - -//go:build linux && cgo -// +build linux,cgo - -package reader - -import ( - "time" - - "github.com/coreos/go-systemd/v22/sdjournal" - - "github.com/elastic/beats/v7/journalbeat/checkpoint" - "github.com/elastic/beats/v7/journalbeat/cmd/instance" - "github.com/elastic/beats/v7/journalbeat/pkg/journalfield" - "github.com/elastic/beats/v7/journalbeat/pkg/journalread" - "github.com/elastic/beats/v7/libbeat/beat" - "github.com/elastic/beats/v7/libbeat/common/backoff" - "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/go-concert/ctxtool" -) - -// Reader reads entries from journal(s). -type Reader struct { - r *journalread.Reader - journal *sdjournal.Journal - config Config - ctx ctxtool.CancelContext - logger *logp.Logger - backoff backoff.Backoff -} - -// New creates a new journal reader and moves the FP to the configured position. -func New(c Config, done <-chan struct{}, state checkpoint.JournalState, logger *logp.Logger) (*Reader, error) { - return newReader(c.Path, c, done, state, logger) -} - -// NewLocal creates a reader to read form the local journal and moves the FP -// to the configured position. -func NewLocal(c Config, done <-chan struct{}, state checkpoint.JournalState, logger *logp.Logger) (*Reader, error) { - return newReader(LocalSystemJournalID, c, done, state, logger) -} - -func newReader(path string, c Config, done <-chan struct{}, state checkpoint.JournalState, logger *logp.Logger) (*Reader, error) { - logger = logger.With("path", path) - backoff := backoff.NewExpBackoff(done, c.Backoff, c.MaxBackoff) - - var journal *sdjournal.Journal - r, err := journalread.Open(logger, c.Path, backoff, func(j *sdjournal.Journal) error { - journal = j - return journalfield.ApplyMatchersOr(j, c.Matches) - }) - if err != nil { - return nil, err - } - - if err := r.Seek(seekBy(logger, c, state)); err != nil { - logger.Error("Continue from current position. Seek failed with: %v", err) - } - - logger.Debug("New journal is opened for reading") - instance.AddJournalToMonitor(c.Path, journal) - - return &Reader{ - r: r, - journal: journal, - config: c, - ctx: ctxtool.WithCancelContext(ctxtool.FromChannel(done)), - logger: logger, - backoff: backoff, - }, nil -} - -func seekBy(log *logp.Logger, c Config, state checkpoint.JournalState) (journalread.SeekMode, string) { - mode := c.Seek - if mode == journalread.SeekCursor && state.Cursor == "" { - mode = c.CursorSeekFallback - if mode != journalread.SeekHead && mode != journalread.SeekTail { - log.Error("Invalid option for cursor_seek_fallback") - mode = journalread.SeekHead - } - } - return mode, state.Cursor -} - -// Close closes the underlying journal reader. -func (r *Reader) Close() { - instance.StopMonitoringJournal(r.config.Path) - r.ctx.Cancel() - r.r.Close() -} - -// Next waits until a new event shows up and returns it. -// It blocks until an event is returned or an error occurs. -func (r *Reader) Next() (*beat.Event, error) { - entry, err := r.r.Next(r.ctx) - if err != nil { - return nil, err - } - - event := toEvent(r.logger, r.config.CheckpointID, entry, r.config.SaveRemoteHostname) - return event, nil -} - -// toEvent creates a beat.Event from journal entries. -func toEvent(logger *logp.Logger, id string, entry *sdjournal.JournalEntry, saveRemoteHostname bool) *beat.Event { - created := time.Now() - fields := journalfield.NewConverter(logger, nil).Convert(entry.Fields) - fields.Put("event.kind", "event") - - // if entry is coming from a remote journal, add_host_metadata overwrites the source hostname, so it - // has to be copied to a different field - if saveRemoteHostname { - remoteHostname, err := fields.GetValue("host.hostname") - if err == nil { - fields.Put("log.source.address", remoteHostname) - } - } - - state := checkpoint.JournalState{ - Path: id, - Cursor: entry.Cursor, - RealtimeTimestamp: entry.RealtimeTimestamp, - MonotonicTimestamp: entry.MonotonicTimestamp, - } - - fields.Put("event.created", created) - receivedByJournal := time.Unix(0, int64(entry.RealtimeTimestamp)*1000) - - event := beat.Event{ - Timestamp: receivedByJournal, - Fields: fields, - Private: state, - } - return &event -} diff --git a/journalbeat/reader/journal_other.go b/journalbeat/reader/journal_other.go deleted file mode 100644 index a44d1a07db0..00000000000 --- a/journalbeat/reader/journal_other.go +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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. - -//go:build !linux || !cgo -// +build !linux !cgo - -package reader - -import ( - "errors" - - "github.com/elastic/beats/v7/journalbeat/checkpoint" - "github.com/elastic/beats/v7/libbeat/beat" - "github.com/elastic/beats/v7/libbeat/logp" -) - -// Reader stub for non linux builds. -type Reader struct{} - -// New creates a new journal reader and moves the FP to the configured position. -// -// Note: New fails if journalbeat is not compiled for linux -func New(c Config, done chan struct{}, state checkpoint.JournalState, logger *logp.Logger) (*Reader, error) { - return nil, errors.New("journald reader only supported on linux") -} - -// NewLocal creates a reader to read form the local journal and moves the FP -// to the configured position. -// -// Note: NewLocal fails if journalbeat is not compiled for linux -func NewLocal(c Config, done chan struct{}, state checkpoint.JournalState, logger *logp.Logger) (*Reader, error) { - return nil, errors.New("journald reader only supported on linux") -} - -// Next waits until a new event shows up and returns it. -// It blocks until an event is returned or an error occurs. -func (r *Reader) Next() (*beat.Event, error) { - return nil, nil -} - -// Close closes the underlying journal reader. -func (r *Reader) Close() {} diff --git a/journalbeat/tests/system/config/journalbeat.yml.j2 b/journalbeat/tests/system/config/journalbeat.yml.j2 deleted file mode 100644 index 858181ca409..00000000000 --- a/journalbeat/tests/system/config/journalbeat.yml.j2 +++ /dev/null @@ -1,13 +0,0 @@ -journalbeat.inputs: -{% for input in inputs %} -- {{ input | tojson }} -{% endfor %} - -{% if registry_file is defined %} -journalbeat.registry_file: {{ registry_file }} -{% endif %} - -output: - file: - path: {{ output_file_path|default(beat.working_dir + "/output") }} - filename: {{ output_file_filename|default("journalbeat") }} diff --git a/journalbeat/tests/system/input/test.registry b/journalbeat/tests/system/input/test.registry deleted file mode 100644 index 9b9dee108b3..00000000000 --- a/journalbeat/tests/system/input/test.registry +++ /dev/null @@ -1,6 +0,0 @@ -update_time: 2018-09-11T10:06:50.895829905Z -journal_entries: -- path: /home/n/go/src/github.com/elastic/beats/journalbeat/tests/system/input/test.journal - cursor: s=018329e08e3a45a0ae03694421c4f553;i=2015d;b=fa3c2e3080dc4cd5be5cb5a43e140d51;m=29102136a4;t=5ab0792b1dc62;x=84a1467480b8f1af - realtime_timestamp: 1595423897803874 - monotonic_timestamp: 176364271268 diff --git a/journalbeat/tests/system/journalbeat.py b/journalbeat/tests/system/journalbeat.py deleted file mode 100644 index 2ad3bd3c37f..00000000000 --- a/journalbeat/tests/system/journalbeat.py +++ /dev/null @@ -1,12 +0,0 @@ -import os -import sys -from beat.beat import TestCase - - -class BaseTest(TestCase): - - @classmethod - def setUpClass(self): - self.beat_name = "journalbeat" - self.beat_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../")) - super(BaseTest, self).setUpClass() diff --git a/journalbeat/tests/system/test_base.py b/journalbeat/tests/system/test_base.py deleted file mode 100644 index 2d7269dd5f4..00000000000 --- a/journalbeat/tests/system/test_base.py +++ /dev/null @@ -1,210 +0,0 @@ -from journalbeat import BaseTest - -import os -import sys -import unittest -import time -import yaml -from shutil import copyfile -from beat import common_tests - - -class Test(BaseTest, common_tests.TestExportsMixin): - - @unittest.skipUnless(sys.platform.startswith("linux"), "Journald only on Linux") - def test_start_with_local_journal(self): - """ - Journalbeat is able to start with the local journal. - """ - - self.render_config_template( - inputs=[{ - "paths": [], - }], - ) - journalbeat_proc = self.start_beat() - - self.wait_until(lambda: self.log_contains("journalbeat is running")) - - exit_code = journalbeat_proc.kill_and_wait() - assert exit_code == 0 - - @unittest.skipUnless(sys.platform.startswith("linux"), "Journald only on Linux") - def test_start_with_journal_directory(self): - """ - Journalbeat is able to open a directory of journal files and starts tailing them. - """ - - self.render_config_template( - inputs=[{ - "paths": [ - self.beat_path + "/tests/system/input/", - ], - "seek": "tail", - }], - ) - journalbeat_proc = self.start_beat() - - self.wait_until(lambda: self.log_contains("journalbeat is running")) - - exit_code = journalbeat_proc.kill_and_wait() - assert exit_code == 0 - - # journalbeat is tailing an inactive journal - assert self.output_is_empty() - - @unittest.skipUnless(sys.platform.startswith("linux"), "Journald only on Linux") - def test_start_with_selected_journal_file(self): - """ - Journalbeat is able to open a journal file and start to read it from the begining. - """ - - self.render_config_template( - inputs=[{ - "paths": [ - self.beat_path + "/tests/system/input/test.journal", - ], - "seek": "head", - }], - ) - journalbeat_proc = self.start_beat() - - self.wait_until(lambda: self.output_has(lines=23)) - - exit_code = journalbeat_proc.kill_and_wait() - assert exit_code == 0 - - @unittest.skipUnless(sys.platform.startswith("linux"), "Journald only on Linux") - def test_start_with_selected_journal_file_with_cursor_fallback(self): - """ - Journalbeat is able to open a journal file and start to read it from the position configured by seek and cursor_seek_fallback. - """ - - self.render_config_template( - inputs=[{ - "paths": [ - self.beat_path + "/tests/system/input/test.journal", - ], - "seek": "cursor", - "cursor_seek_fallback": "tail", - }], - ) - journalbeat_proc = self.start_beat() - - self.wait_until(lambda: self.log_contains("journalbeat is running")) - - exit_code = journalbeat_proc.kill_and_wait() - assert exit_code == 0 - - # journalbeat is tailing an inactive journal with no cursor data - assert self.output_is_empty() - - @unittest.skipUnless(sys.platform.startswith("linux"), "Journald only on Linux") - def test_read_events_with_existing_registry(self): - """ - Journalbeat is able to follow reading a from a journal with an existing registry file. - """ - - registry_path = os.path.join(os.path.abspath(self.working_dir), "data", "registry") - os.mkdir(os.path.dirname(registry_path)) - copyfile(self.beat_path + "/tests/system/input/test.registry", - os.path.join(os.path.abspath(self.working_dir), "data/registry")) - input_path = self.beat_path + "/tests/system/input/test.journal" - self._prepare_registry_file(registry_path, input_path) - - self.render_config_template( - inputs=[{ - "paths": [input_path], - "seek": "cursor", - "cursor_seek_fallback": "tail", - }], - ) - journalbeat_proc = self.start_beat() - - self.wait_until(lambda: self.output_has(lines=9)) - - exit_code = journalbeat_proc.kill_and_wait() - assert exit_code == 0 - - @unittest.skipUnless(sys.platform.startswith("linux"), "Journald only on Linux") - def test_read_events_with_include_matches(self): - """ - Journalbeat is able to pass matchers to the journal reader and read filtered messages. - """ - - self.render_config_template( - inputs=[{ - "paths": [ - self.beat_path + "/tests/system/input/test.journal", - ], - "seek": "head", - "include_matches": [ - "syslog.priority=6", - ] - }], - ) - journalbeat_proc = self.start_beat() - - self.wait_until(lambda: self.output_has(lines=6)) - - exit_code = journalbeat_proc.kill_and_wait() - assert exit_code == 0 - - @unittest.skipUnless(sys.platform.startswith("linux"), "Journald only on Linux") - def test_input_id(self): - """ - Journalbeat persists states with IDs. - """ - - self.render_config_template( - inputs=[ - { - "id": "serviceA.unit", - "paths": [ - self.beat_path + "/tests/system/input/test.journal", - ], - }, - { - "id": "serviceB unit", - "paths": [ - self.beat_path + "/tests/system/input/test.journal", - ], - } - ], - ) - - # Run the beat until it publishes events from both inputs. - journalbeat_proc = self.start_beat() - expected_msg = 'successfully published events' - self.wait_until(lambda: self.log_contains(expected_msg)) - self.wait_until(lambda: self.log_contains(expected_msg)) - journalbeat_proc.check_kill_and_wait() - - # Verify that registry paths are prefixed with an ID. - registry_data = self.read_registry() - self.assertIn("journal_entries", registry_data) - journal_entries = registry_data['journal_entries'] - self.assertGreater(len(journal_entries), 0) - for item in journal_entries: - self.assertTrue(item['path'].startswith('journald::'), "starts with journald::") - self.assertTrue(item['path'].find('::service'), "ends with ::") - - def _prepare_registry_file(self, registry_path, journal_path): - lines = [] - with open(registry_path, "r") as registry_file: - lines = registry_file.readlines() - lines[2] = "- path: " + journal_path + "\n" - - with open(registry_path, "w") as registry_file: - for line in lines: - registry_file.write(line) - - def read_registry(self): - registry_path = os.path.join(os.path.abspath(self.working_dir), "data", "registry") - - with open(registry_path, "r") as stream: - return yaml.safe_load(stream) - - -if __name__ == '__main__': - unittest.main() diff --git a/libbeat/common/config.go b/libbeat/common/config.go index e4155c4f3af..3efff0b702c 100644 --- a/libbeat/common/config.go +++ b/libbeat/common/config.go @@ -259,6 +259,11 @@ func (c *Config) IsArray() bool { return c.access().IsArray() } +// FlattenedKeys return a sorted flattened views of the set keys in the configuration. +func (c *Config) FlattenedKeys() []string { + return c.access().FlattenedKeys(configOpts...) +} + func (c *Config) PrintDebugf(msg string, params ...interface{}) { selector := selectorConfigWithPassword filtered := false diff --git a/libbeat/docs/getting-started.asciidoc b/libbeat/docs/getting-started.asciidoc index 619ed2e03cb..7bb7043ae70 100644 --- a/libbeat/docs/getting-started.asciidoc +++ b/libbeat/docs/getting-started.asciidoc @@ -13,4 +13,4 @@ Each Beat is a separately installable product. To learn how to get started, see: If you're planning to use the {metrics-app} or the {logs-app} in {kib}, see {observability-guide}/analyze-metrics.html[Analyze metrics] -and {observability-guide}/monitor-logs.html[Monitor logs]. \ No newline at end of file +and {observability-guide}/monitor-logs.html[Monitor logs]. diff --git a/libbeat/docs/overview.asciidoc b/libbeat/docs/overview.asciidoc index 6306874112f..c76aa8558e5 100644 --- a/libbeat/docs/overview.asciidoc +++ b/libbeat/docs/overview.asciidoc @@ -8,7 +8,7 @@ for capturing: [horizontal] Audit data:: https://www.elastic.co/products/beats/auditbeat[Auditbeat] -Log files:: https://www.elastic.co/products/beats/filebeat[Filebeat] +Log files and journals:: https://www.elastic.co/products/beats/filebeat[Filebeat] Cloud data:: https://www.elastic.co/products/beats/functionbeat[Functionbeat] Availability:: https://www.elastic.co/products/beats/heartbeat[Heartbeat] Metrics:: https://www.elastic.co/products/beats/metricbeat[Metricbeat] diff --git a/libbeat/docs/shared-docker.asciidoc b/libbeat/docs/shared-docker.asciidoc index 2e7e04e6c7a..389bedb7b54 100644 --- a/libbeat/docs/shared-docker.asciidoc +++ b/libbeat/docs/shared-docker.asciidoc @@ -80,16 +80,6 @@ setup -E setup.kibana.host=kibana:5601 \ -------------------------------------------- endif::[] -ifeval::["{beatname_lc}"=="journalbeat"] -["source", "sh", subs="attributes"] --------------------------------------------- -docker run \ -{dockerimage} \ -setup -E setup.kibana.host=kibana:5601 \ --E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2> --------------------------------------------- -endif::[] - ifeval::["{beatname_lc}"=="packetbeat"] ["source", "sh", subs="attributes"] -------------------------------------------- @@ -161,24 +151,6 @@ docker run -d \ -------------------------------------------- endif::[] -ifeval::["{beatname_lc}"=="journalbeat"] -Make sure you include the path to the host's journal. The path might be -`/var/log/journal` or `/run/log/journal`. - -["source", "sh", subs="attributes"] --------------------------------------------- -sudo docker run -d \ - --name={beatname_lc} \ - --user=root \ - --volume="/var/log/journal:/var/log/journal" \ - --volume="/etc/machine-id:/etc/machine-id" \ - --volume="/run/systemd:/run/systemd" \ - --volume="/etc/hostname:/etc/hostname:ro" \ - {dockerimage} {beatname_lc} -e -strict.perms=false \ - -E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2> --------------------------------------------- -endif::[] - ifeval::["{beatname_lc}"=="metricbeat"] ["source", "sh", subs="attributes"] -------------------------------------------- diff --git a/libbeat/processors/actions/add_labels.go b/libbeat/processors/actions/add_labels.go index 76696659265..93096898960 100644 --- a/libbeat/processors/actions/add_labels.go +++ b/libbeat/processors/actions/add_labels.go @@ -41,10 +41,15 @@ func createAddLabels(c *common.Config) (processors.Processor, error) { }{} err := c.Unpack(&config) if err != nil { - return nil, fmt.Errorf("fail to unpack the add_fields configuration: %s", err) + return nil, fmt.Errorf("fail to unpack the add_fields configuration: %w", err) } - return makeFieldsProcessor(LabelsKey, config.Labels.Flatten(), true), nil + flatLabels, err := flattenLabels(config.Labels) + if err != nil { + return nil, fmt.Errorf("failed to flatten labels: %w", err) + } + + return makeFieldsProcessor(LabelsKey, flatLabels, true), nil } // NewAddLabels creates a new processor adding the given object to events. Set @@ -53,8 +58,32 @@ func createAddLabels(c *common.Config) (processors.Processor, error) { // If labels contains nested objects, NewAddLabels will flatten keys into labels by // by joining names with a dot ('.') . // The labels will be inserted into the 'labels' field. -func NewAddLabels(labels common.MapStr, shared bool) processors.Processor { +func NewAddLabels(labels common.MapStr, shared bool) (processors.Processor, error) { + flatLabels, err := flattenLabels(labels) + if err != nil { + return nil, fmt.Errorf("failed to flatten labels: %w", err) + } + return NewAddFields(common.MapStr{ - LabelsKey: labels.Flatten(), - }, shared, true) + LabelsKey: flatLabels, + }, shared, true), nil +} + +func flattenLabels(labels common.MapStr) (common.MapStr, error) { + labelConfig, err := common.NewConfigFrom(labels) + if err != nil { + return nil, err + } + + flatKeys := labelConfig.FlattenedKeys() + flatMap := make(common.MapStr, len(flatKeys)) + for _, k := range flatKeys { + v, err := labelConfig.String(k, -1) + if err != nil { + return nil, err + } + flatMap[k] = v + } + + return flatMap, nil } diff --git a/libbeat/processors/actions/add_labels_test.go b/libbeat/processors/actions/add_labels_test.go index 24ddcbab58f..ca9dd22a528 100644 --- a/libbeat/processors/actions/add_labels_test.go +++ b/libbeat/processors/actions/add_labels_test.go @@ -59,5 +59,16 @@ func TestAddLabels(t *testing.T) { `{add_labels.labels: {l2: b, lc: b}}`, ), }, + "add array": { + event: common.MapStr{}, + want: common.MapStr{ + "labels": common.MapStr{ + "array.0": "foo", + "array.1": "bar", + "array.2.hello": "world", + }, + }, + cfg: single(`{add_labels: {labels: {array: ["foo", "bar", {"hello": "world"}]}}}`), + }, }) } diff --git a/libbeat/processors/actions/decode_json_fields.go b/libbeat/processors/actions/decode_json_fields.go index 611b5b8d8e3..be852a47133 100644 --- a/libbeat/processors/actions/decode_json_fields.go +++ b/libbeat/processors/actions/decode_json_fields.go @@ -122,6 +122,11 @@ func (f *decodeJSONFields) Run(event *beat.Event) (*beat.Event, error) { if err != nil { f.logger.Debugf("Error trying to unmarshal %s", text) errs = append(errs, err.Error()) + event.SetErrorWithOption(common.MapStr{ + "message": "parsing input as JSON: " + err.Error(), + "data": text, + "field": field, + }, f.addErrorKey) continue } diff --git a/libbeat/processors/actions/decode_json_fields_test.go b/libbeat/processors/actions/decode_json_fields_test.go index 73d4f3a5fcc..f58efd29b46 100644 --- a/libbeat/processors/actions/decode_json_fields_test.go +++ b/libbeat/processors/actions/decode_json_fields_test.go @@ -491,6 +491,27 @@ func TestOverwriteMetadata(t *testing.T) { assert.Equal(t, expected, actual) } +func TestAddErrorToEventOnUnmarshalError(t *testing.T) { + testConfig := common.MustNewConfigFrom(map[string]interface{}{ + "fields": "message", + "add_error_key": true, + }) + + input := common.MapStr{ + "message": "Broken JSON [[", + } + + actual := getActualValue(t, testConfig, input) + + errObj, ok := actual["error"].(common.MapStr) + require.True(t, ok, "'error' field not present or of invalid type") + require.NotNil(t, actual["error"]) + + assert.Equal(t, "message", errObj["field"]) + assert.NotNil(t, errObj["data"]) + assert.NotNil(t, errObj["message"]) +} + func getActualValue(t *testing.T, config *common.Config, input common.MapStr) common.MapStr { log := logp.NewLogger("decode_json_fields_test") diff --git a/libbeat/processors/decode_csv_fields/docs/decode_csv_fields.asciidoc b/libbeat/processors/decode_csv_fields/docs/decode_csv_fields.asciidoc index 53cc3787543..11746040970 100644 --- a/libbeat/processors/decode_csv_fields/docs/decode_csv_fields.asciidoc +++ b/libbeat/processors/decode_csv_fields/docs/decode_csv_fields.asciidoc @@ -9,7 +9,7 @@ experimental[] The `decode_csv_fields` processor decodes fields containing records in comma-separated format (CSV). It will output the values as an array of strings. -This processor is available for Filebeat and Journalbeat. +This processor is available for Filebeat. [source,yaml] ----------------------------------------------------- diff --git a/libbeat/reader/message.go b/libbeat/reader/message.go index 79116bfcfad..0eae606f80b 100644 --- a/libbeat/reader/message.go +++ b/libbeat/reader/message.go @@ -31,7 +31,8 @@ type Message struct { Content []byte // actual content read Bytes int // total number of bytes read to generate the message Fields common.MapStr // optional fields that can be added by reader - Meta common.MapStr + Meta common.MapStr // deprecated + Private interface{} } // IsEmpty returns true in case the message is empty diff --git a/libbeat/scripts/Makefile b/libbeat/scripts/Makefile index 00d3231c371..7b16cf7cea8 100755 --- a/libbeat/scripts/Makefile +++ b/libbeat/scripts/Makefile @@ -141,11 +141,9 @@ ${BEAT_NAME}.test: $(GOFILES_ALL) .PHONY: crosscompile crosscompile: ## @build Cross-compile beat for the OS'es specified in GOX_OS variable. The binaries are placed in the build/bin directory. crosscompile: $(GOFILES) -ifneq ($(shell [[ $(BEAT_NAME) == journalbeat ]] && echo true ),true) go ${INSTALL_CMD} github.com/mitchellh/gox mkdir -p ${BUILD_DIR}/bin gox -output="${BUILD_DIR}/bin/{{.Dir}}-{{.OS}}-{{.Arch}}" -os="$(strip $(GOX_OS))" -osarch="$(strip $(GOX_OSARCH))" ${GOX_FLAGS} -endif .PHONY: check check: check-headers mage ## @build Checks project and source code if everything is according to standard diff --git a/packetbeat/cmd/root.go b/packetbeat/cmd/root.go index 808de836fb3..6032089c9fc 100644 --- a/packetbeat/cmd/root.go +++ b/packetbeat/cmd/root.go @@ -50,7 +50,7 @@ var RootCmd *cmd.BeatsRootCmd // PacketbeatSettings contains the default settings for packetbeat func PacketbeatSettings() instance.Settings { - var runFlags = pflag.NewFlagSet(Name, pflag.ExitOnError) + runFlags := pflag.NewFlagSet(Name, pflag.ExitOnError) runFlags.AddGoFlag(flag.CommandLine.Lookup("I")) runFlags.AddGoFlag(flag.CommandLine.Lookup("t")) runFlags.AddGoFlag(flag.CommandLine.Lookup("O")) diff --git a/packetbeat/config/agent.go b/packetbeat/config/agent.go index 36e3c977b44..34df1721597 100644 --- a/packetbeat/config/agent.go +++ b/packetbeat/config/agent.go @@ -66,7 +66,7 @@ func (i agentInput) addProcessorsAndIndex(cfg *common.Config) (*common.Config, e mergeConfig, err := common.NewConfigFrom(common.MapStr{ "index": datastreamConfig.Datastream.Type + "-" + datastreamConfig.Datastream.Dataset + "-" + namespace, "processors": append([]common.MapStr{ - common.MapStr{ + { "add_fields": common.MapStr{ "target": "data_stream", "fields": common.MapStr{ @@ -76,7 +76,7 @@ func (i agentInput) addProcessorsAndIndex(cfg *common.Config) (*common.Config, e }, }, }, - common.MapStr{ + { "add_fields": common.MapStr{ "target": "event", "fields": common.MapStr{ diff --git a/packetbeat/decoder/decoder.go b/packetbeat/decoder/decoder.go index 50e8f595481..ae8eeb9d84b 100644 --- a/packetbeat/decoder/decoder.go +++ b/packetbeat/decoder/decoder.go @@ -87,7 +87,8 @@ func New( d := Decoder{ flows: f, decoders: make(map[gopacket.LayerType]gopacket.DecodingLayer), - icmp4Proc: icmp4, icmp6Proc: icmp6, tcpProc: tcp, udpProc: udp} + icmp4Proc: icmp4, icmp6Proc: icmp6, tcpProc: tcp, udpProc: udp, + } d.stD1Q.init(&d.d1q[0], &d.d1q[1]) d.stIP4.init(&d.ip4[0], &d.ip4[1]) d.stIP6.init(&d.ip6[0], &d.ip6[1]) diff --git a/packetbeat/flows/flows_test.go b/packetbeat/flows/flows_test.go index 601613e61d1..9cee1c59e2d 100644 --- a/packetbeat/flows/flows_test.go +++ b/packetbeat/flows/flows_test.go @@ -56,12 +56,16 @@ func TestFlowsCounting(t *testing.T) { assert.NoError(t, err) uint1, err := module.NewUint("uint1") + assert.NoError(t, err) uint2, err := module.NewUint("uint2") + assert.NoError(t, err) int1, err := module.NewInt("int1") + assert.NoError(t, err) int2, err := module.NewInt("int2") + assert.NoError(t, err) float1, err := module.NewFloat("float1") + assert.NoError(t, err) float2, err := module.NewFloat("float2") - assert.NoError(t, err) pub := &flowsChan{make(chan []beat.Event, 1)} diff --git a/packetbeat/flows/worker.go b/packetbeat/flows/worker.go index f0080cf68d2..b339a75fa4d 100644 --- a/packetbeat/flows/worker.go +++ b/packetbeat/flows/worker.go @@ -107,7 +107,7 @@ func makeWorker( if align > 0 { // round time to nearest 10 seconds for alignment aligned := time.Unix(((time.Now().Unix()+(align-1))/align)*align, 0) - waitStart := aligned.Sub(time.Now()) + waitStart := time.Until(aligned) debugf("worker wait start(%v): %v", aligned, waitStart) if cont := w.sleep(waitStart); !cont { return diff --git a/packetbeat/flows/worker_test.go b/packetbeat/flows/worker_test.go index 3bec75f2fe3..520d107f9ab 100644 --- a/packetbeat/flows/worker_test.go +++ b/packetbeat/flows/worker_test.go @@ -33,10 +33,8 @@ import ( "github.com/elastic/beats/v7/packetbeat/procs" ) -var ( - // Use `go test -data` to update sample event files. - dataFlag = flag.Bool("data", false, "Write updated data.json files") -) +// Use `go test -data` to update sample event files. +var dataFlag = flag.Bool("data", false, "Write updated data.json files") func TestCreateEvent(t *testing.T) { logp.TestingSetup() @@ -124,7 +122,7 @@ func TestCreateEvent(t *testing.T) { t.Fatal(err) } - if err := ioutil.WriteFile("../_meta/sample_outputs/flow.json", output, 0644); err != nil { + if err := ioutil.WriteFile("../_meta/sample_outputs/flow.json", output, 0o644); err != nil { t.Fatal(err) } } diff --git a/packetbeat/pb/event.go b/packetbeat/pb/event.go index 683e22253be..4ba7e4acf15 100644 --- a/packetbeat/pb/event.go +++ b/packetbeat/pb/event.go @@ -237,14 +237,14 @@ func (f *Fields) ComputeValues(localIPs []net.IP, internalNetworks []string) err } // network.community_id - switch { - case f.Network.Transport == "udp": + switch f.Network.Transport { + case "udp": flow.Protocol = 17 - case f.Network.Transport == "tcp": + case "tcp": flow.Protocol = 6 - case f.Network.Transport == "icmp": + case "icmp": flow.Protocol = 1 - case f.Network.Transport == "ipv6-icmp": + case "ipv6-icmp": flow.Protocol = 58 } flow.ICMP.Type = f.ICMPType diff --git a/packetbeat/processor/add_kubernetes_metadata/indexers.go b/packetbeat/processor/add_kubernetes_metadata/indexers.go index 474f111e97f..3e547e3a8c1 100644 --- a/packetbeat/processor/add_kubernetes_metadata/indexers.go +++ b/packetbeat/processor/add_kubernetes_metadata/indexers.go @@ -26,14 +26,14 @@ func init() { // Register default indexers cfg := common.NewConfig() - //Add IP Port Indexer as a default indexer + // Add IP Port Indexer as a default indexer kubernetes.Indexing.AddDefaultIndexerConfig(kubernetes.IPPortIndexerName, *cfg) formatCfg, err := common.NewConfigFrom(map[string]interface{}{ "format": "%{[ip]}:%{[port]}", }) if err == nil { - //Add field matcher with field to lookup as metricset.host + // Add field matcher with field to lookup as metricset.host kubernetes.Indexing.AddDefaultMatcherConfig(kubernetes.FieldFormatMatcherName, *formatCfg) } } diff --git a/packetbeat/procs/procs.go b/packetbeat/procs/procs.go index bf3daab9ff2..a3d031ec72f 100644 --- a/packetbeat/procs/procs.go +++ b/packetbeat/procs/procs.go @@ -213,7 +213,7 @@ func (proc *ProcessesWatcher) updateMap(transport applayer.Transport) { if logp.HasSelector("procsdetailed") { start := time.Now() defer func() { - logp.Debug("procsdetailed", "updateMap() took %v", time.Now().Sub(start)) + logp.Debug("procsdetailed", "updateMap() took %v", time.Since(start)) }() } diff --git a/packetbeat/procs/procs_linux_test.go b/packetbeat/procs/procs_linux_test.go index 39c8a937741..e36bd50a208 100644 --- a/packetbeat/procs/procs_linux_test.go +++ b/packetbeat/procs/procs_linux_test.go @@ -39,14 +39,14 @@ func createFakeDirectoryStructure(prefix string, files []testProcFile) error { var err error for _, file := range files { dir := filepath.Dir(file.path) - err = os.MkdirAll(filepath.Join(prefix, dir), 0755) + err = os.MkdirAll(filepath.Join(prefix, dir), 0o755) if err != nil { return err } if !file.isLink { err = ioutil.WriteFile(filepath.Join(prefix, file.path), - []byte(file.contents), 0644) + []byte(file.contents), 0o644) if err != nil { return err } diff --git a/packetbeat/procs/procs_windows.go b/packetbeat/procs/procs_windows.go index 50807691efa..ee3eee1a28d 100644 --- a/packetbeat/procs/procs_windows.go +++ b/packetbeat/procs/procs_windows.go @@ -42,13 +42,17 @@ type extractor interface { Size() int } -type callbackFn func(net.IP, uint16, int) -type extractorFactory func(fn callbackFn) extractor +type ( + callbackFn func(net.IP, uint16, int) + extractorFactory func(fn callbackFn) extractor +) -type tcpRowOwnerPIDExtractor callbackFn -type tcp6RowOwnerPIDExtractor callbackFn -type udpRowOwnerPIDExtractor callbackFn -type udp6RowOwnerPIDExtractor callbackFn +type ( + tcpRowOwnerPIDExtractor callbackFn + tcp6RowOwnerPIDExtractor callbackFn + udpRowOwnerPIDExtractor callbackFn + udp6RowOwnerPIDExtractor callbackFn +) var tablesByTransport = map[applayer.Transport][]struct { family uint32 diff --git a/packetbeat/procs/procs_windows_test.go b/packetbeat/procs/procs_windows_test.go index 51cc8391d68..4abfe359b71 100644 --- a/packetbeat/procs/procs_windows_test.go +++ b/packetbeat/procs/procs_windows_test.go @@ -42,21 +42,33 @@ func TestParseTableRaw(t *testing.T) { expected []portProcMapping mustErr bool }{ - {"Empty table IPv4", IPv4, - "00000000", nil, false}, - {"Empty table IPv6", IPv6, - "00000000", nil, false}, - {"Short table (no length)", IPv4, - "000000", nil, true}, - {"Short table (partial entry)", IPv6, - "01000000AAAAAAAAAAAAAAAAAAAA", nil, true}, - {"One entry (IPv4)", IPv4, + { + "Empty table IPv4", IPv4, + "00000000", nil, false, + }, + { + "Empty table IPv6", IPv6, + "00000000", nil, false, + }, + { + "Short table (no length)", IPv4, + "000000", nil, true, + }, + { + "Short table (partial entry)", IPv6, + "01000000AAAAAAAAAAAAAAAAAAAA", nil, true, + }, + { + "One entry (IPv4)", IPv4, "01000000" + "77777777AAAAAAAA12340000BBBBBBBBFFFF0000CCCCCCCC", []portProcMapping{ {endpoint: endpoint{address: "170.170.170.170", port: 0x1234}, pid: int(pid)}, - }, false}, - {"Two entries (IPv6)", IPv6, + }, + false, + }, + { + "Two entries (IPv6)", IPv6, "02000000" + // First entry "11112222333344445555666677778888F0F0F0F0" + @@ -76,7 +88,9 @@ func TestParseTableRaw(t *testing.T) { []portProcMapping{ {endpoint: endpoint{address: "1111:2222:3333:4444:5555:6666:7777:8888", port: 0xABCD}, pid: 1}, {endpoint: endpoint{address: "aaaa:aaaa:aaaa:aaaa:aaaa:aaaa:aaaa:aaaa", port: 0}, pid: 0xffff}, - }, false}, + }, + false, + }, } { msg := fmt.Sprintf("Test case #%d: %s", idx+1, testCase.name) table, err := hex.DecodeString(testCase.raw) diff --git a/packetbeat/procs/zsyscall_windows.go b/packetbeat/procs/zsyscall_windows.go index b313698211e..f938c08f792 100644 --- a/packetbeat/procs/zsyscall_windows.go +++ b/packetbeat/procs/zsyscall_windows.go @@ -34,9 +34,7 @@ const ( errnoERROR_IO_PENDING = 997 ) -var ( - errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) -) +var errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) // errnoErr returns common boxed Errno values, to prevent // allocations at runtime. diff --git a/packetbeat/protos/amqp/amqp.go b/packetbeat/protos/amqp/amqp.go index f0c1e26dd28..2402b9150e3 100644 --- a/packetbeat/protos/amqp/amqp.go +++ b/packetbeat/protos/amqp/amqp.go @@ -50,7 +50,7 @@ type amqpPlugin struct { results protos.Reporter watcher procs.ProcessesWatcher - //map containing functions associated with different method numbers + // map containing functions associated with different method numbers methodMap map[codeClass]map[codeMethod]amqpMethod } @@ -87,7 +87,7 @@ func (amqp *amqpPlugin) init(results protos.Reporter, watcher procs.ProcessesWat amqp.initMethodMap() amqp.setFromConfig(config) - if amqp.hideConnectionInformation == false { + if !amqp.hideConnectionInformation { amqp.addConnectionMethods() } amqp.transactions = common.NewCache( @@ -194,8 +194,8 @@ func (amqp *amqpPlugin) ConnectionTimeout() time.Duration { } func (amqp *amqpPlugin) Parse(pkt *protos.Packet, tcptuple *common.TCPTuple, - dir uint8, private protos.ProtocolData) protos.ProtocolData { - + dir uint8, private protos.ProtocolData, +) protos.ProtocolData { defer logp.Recover("ParseAmqp exception") detailedf("Parse method triggered") @@ -284,7 +284,7 @@ func (amqp *amqpPlugin) handleAmqpRequest(msg *amqpMessage) { } else { trans.request = msg.method } - //length = message + 4 bytes header + frame end octet + // length = message + 4 bytes header + frame end octet trans.bytesIn = msg.bodySize + 12 if msg.fields != nil { trans.amqp = msg.fields @@ -292,9 +292,9 @@ func (amqp *amqpPlugin) handleAmqpRequest(msg *amqpMessage) { trans.amqp = common.MapStr{} } - //if error or exception, publish it now. sometimes client or server never send - //an ack message and the error is lost. Also, if nowait flag set, don't expect - //any response and publish + // if error or exception, publish it now. sometimes client or server never send + // an ack message and the error is lost. Also, if nowait flag set, don't expect + // any response and publish if isAsynchronous(trans) { amqp.publishTransaction(trans) debugf("Amqp transaction completed") @@ -317,9 +317,9 @@ func (amqp *amqpPlugin) handleAmqpResponse(msg *amqpMessage) { return } - //length = message + 4 bytes class/method + frame end octet + header + // length = message + 4 bytes class/method + frame end octet + header trans.bytesOut = msg.bodySize + 12 - //merge the both fields from request and response + // merge the both fields from request and response trans.amqp.Update(msg.fields) trans.response = common.OK_STATUS @@ -344,8 +344,8 @@ func (amqp *amqpPlugin) handleAmqpResponse(msg *amqpMessage) { func (amqp *amqpPlugin) expireTransaction(trans *amqpTransaction) { debugf("Transaction expired") - //possibility of a connection.close or channel.close method that didn't get an - //ok answer. Let's publish it. + // possibility of a connection.close or channel.close method that didn't get an + // ok answer. Let's publish it. if isCloseError(trans) { trans.notes = append(trans.notes, "Close-ok method not received by sender") amqp.publishTransaction(trans) @@ -354,8 +354,8 @@ func (amqp *amqpPlugin) expireTransaction(trans *amqpTransaction) { amqp.transactions.Delete(trans.tuple.Hashable()) } -//This method handles published messages from clients. Being an async -//process, the method, header and body frames are regrouped in one transaction +// This method handles published messages from clients. Being an async +// process, the method, header and body frames are regrouped in one transaction func (amqp *amqpPlugin) handlePublishing(client *amqpMessage) { tuple := client.tcpTuple trans := amqp.getTransaction(tuple.Hashable()) @@ -369,8 +369,8 @@ func (amqp *amqpPlugin) handlePublishing(client *amqpMessage) { trans.src, trans.dst = common.MakeEndpointPair(client.tcpTuple.BaseTuple, client.cmdlineTuple) trans.method = client.method - //for publishing and delivering, bytes in and out represent the length of the - //message itself + // for publishing and delivering, bytes in and out represent the length of the + // message itself trans.bytesIn = client.bodySize if client.bodySize > uint64(amqp.maxBodyLength) { @@ -384,13 +384,13 @@ func (amqp *amqpPlugin) handlePublishing(client *amqpMessage) { trans.amqp = client.fields amqp.publishTransaction(trans) debugf("Amqp transaction completed") - //delete trans from map + // delete trans from map amqp.transactions.Delete(trans.tuple.Hashable()) } -//This method handles delivered messages via basic.deliver and basic.get-ok AND -//returned messages to clients. Being an async process, the method, header and -//body frames are regrouped in one transaction +// This method handles delivered messages via basic.deliver and basic.get-ok AND +// returned messages to clients. Being an async process, the method, header and +// body frames are regrouped in one transaction func (amqp *amqpPlugin) handleDelivering(server *amqpMessage) { tuple := server.tcpTuple trans := amqp.getTransaction(tuple.Hashable()) @@ -403,8 +403,8 @@ func (amqp *amqpPlugin) handleDelivering(server *amqpMessage) { trans.ts = server.ts trans.src, trans.dst = common.MakeEndpointPair(server.tcpTuple.BaseTuple, server.cmdlineTuple) - //for publishing and delivering, bytes in and out represent the length of the - //message itself + // for publishing and delivering, bytes in and out represent the length of the + // message itself trans.bytesOut = server.bodySize if server.bodySize > uint64(amqp.maxBodyLength) { @@ -422,7 +422,7 @@ func (amqp *amqpPlugin) handleDelivering(server *amqpMessage) { amqp.publishTransaction(trans) debugf("Amqp transaction completed") - //delete trans from map + // delete trans from map amqp.transactions.Delete(trans.tuple.Hashable()) } @@ -459,7 +459,7 @@ func (amqp *amqpPlugin) publishTransaction(t *amqpTransaction) { fields["user.id"] = userID } - //let's try to convert request/response to a readable format + // let's try to convert request/response to a readable format if amqp.sendRequest { if t.method == "basic.publish" { if t.toString { @@ -503,7 +503,7 @@ func (amqp *amqpPlugin) publishTransaction(t *amqpTransaction) { amqp.results(evt) } -//function to check if method is async or not +// function to check if method is async or not func isAsynchronous(trans *amqpTransaction) bool { if val, ok := trans.amqp["no-wait"]; ok && val == true { return true @@ -514,7 +514,7 @@ func isAsynchronous(trans *amqpTransaction) bool { trans.method == "basic.nack" } -//function to convert a body slice into a readable format +// function to convert a body slice into a readable format func bodyToString(data []byte) string { ret := make([]string, len(data)) for i, c := range data { @@ -523,7 +523,7 @@ func bodyToString(data []byte) string { return strings.Join(ret, " ") } -//function used to check if a body message can be converted to readable string +// function used to check if a body message can be converted to readable string func isStringable(m *amqpMessage) bool { stringable := false diff --git a/packetbeat/protos/amqp/amqp_fields.go b/packetbeat/protos/amqp/amqp_fields.go index ff4f7c382b5..d7536572978 100644 --- a/packetbeat/protos/amqp/amqp_fields.go +++ b/packetbeat/protos/amqp/amqp_fields.go @@ -28,9 +28,9 @@ import ( "github.com/elastic/beats/v7/libbeat/logp" ) +// getTable updates fields with the table data at the given offset. +// fields must be non_nil on entry. func getTable(fields common.MapStr, data []byte, offset uint32) (next uint32, err bool, exists bool) { - ret := common.MapStr{} - length := binary.BigEndian.Uint32(data[offset : offset+4]) // size declared too big @@ -39,23 +39,20 @@ func getTable(fields common.MapStr, data []byte, offset uint32) (next uint32, er } if length > 0 { exists = true - err := fieldUnmarshal(ret, data[offset+4:offset+4+length], 0, length, -1) + table := common.MapStr{} + err := fieldUnmarshal(table, data[offset+4:offset+4+length], 0, length, -1) if err { logp.Warn("Error while parsing a field table") return 0, true, false } - if fields == nil { - fields = ret - } else { - fields.Update(ret) - } + fields.Update(table) } return length + 4 + offset, false, exists } +// getTable updates fields with the array data at the given offset. +// fields must be non_nil on entry. func getArray(fields common.MapStr, data []byte, offset uint32) (next uint32, err bool, exists bool) { - ret := common.MapStr{} - length := binary.BigEndian.Uint32(data[offset : offset+4]) // size declared too big @@ -64,30 +61,27 @@ func getArray(fields common.MapStr, data []byte, offset uint32) (next uint32, er } if length > 0 { exists = true - err := fieldUnmarshal(ret, data[offset+4:offset+4+length], 0, length, 0) + array := common.MapStr{} + err := fieldUnmarshal(array, data[offset+4:offset+4+length], 0, length, 0) if err { logp.Warn("Error while parsing a field array") return 0, true, false } - if fields == nil { - fields = ret - } else { - fields.Update(ret) - } + fields.Update(array) } return length + 4 + offset, false, exists } -//The index parameter, when set at -1, indicates that the entry is a field table. -//If it's set at 0, it is an array. +// The index parameter, when set at -1, indicates that the entry is a field table. +// If it's set at 0, it is an array. func fieldUnmarshal(table common.MapStr, data []byte, offset uint32, length uint32, index int) (err bool) { var name string if offset >= length { return false } - //get name of the field. If it's an array, it will be the index parameter as a - //string. If it's a table, it will be the name of the field. + // get name of the field. If it's an array, it will be the index parameter as a + // string. If it's a table, it will be the name of the field. if index < 0 { fieldName, offsetTemp, err := getShortString(data, offset+1, uint32(data[offset])) if err { @@ -199,10 +193,10 @@ func fieldUnmarshal(table common.MapStr, data []byte, offset uint32, length uint table[name] = bodyToByteArray(data[offset+1+size : offset+5+size]) offset += 5 + size default: - //unknown field + // unknown field return true } - //advance to next field recursively + // advance to next field recursively return fieldUnmarshal(table, data, offset, length, index) } diff --git a/packetbeat/protos/amqp/amqp_methods.go b/packetbeat/protos/amqp/amqp_methods.go index 93cec5f2747..d74148026c5 100644 --- a/packetbeat/protos/amqp/amqp_methods.go +++ b/packetbeat/protos/amqp/amqp_methods.go @@ -32,7 +32,7 @@ func connectionStartMethod(m *amqpMessage, args []byte) (bool, bool) { properties := make(common.MapStr) next, err, exists := getTable(properties, args, 2) if err { - //failed to get de peer-properties, size may be wrong, let's quit + // failed to get de peer-properties, size may be wrong, let's quit logp.Warn("Failed to parse server properties in connection.start method") return false, false } @@ -54,7 +54,7 @@ func connectionStartMethod(m *amqpMessage, args []byte) (bool, bool) { "mechanisms": mechanisms, "locales": locales, } - //if there is a server properties table, add it + // if there is a server properties table, add it if exists { m.fields["server-properties"] = properties } @@ -65,7 +65,7 @@ func connectionStartOkMethod(m *amqpMessage, args []byte) (bool, bool) { properties := make(common.MapStr) next, err, exists := getTable(properties, args, 0) if err { - //failed to get de peer-properties, size may be wrong, let's quit + // failed to get de peer-properties, size may be wrong, let's quit logp.Warn("Failed to parse server properties in connection.start method") return false, false } @@ -89,7 +89,7 @@ func connectionStartOkMethod(m *amqpMessage, args []byte) (bool, bool) { "mechanism": mechanism, "locale": locale, } - //if there is a client properties table, add it + // if there is a client properties table, add it if exists { m.fields["client-properties"] = properties } @@ -99,8 +99,8 @@ func connectionStartOkMethod(m *amqpMessage, args []byte) (bool, bool) { func connectionTuneMethod(m *amqpMessage, args []byte) (bool, bool) { m.isRequest = true m.method = "connection.tune" - //parameters are not parsed here, they are further negotiated by the server - //in the connection.tune-ok method + // parameters are not parsed here, they are further negotiated by the server + // in the connection.tune-ok method return true, true } @@ -163,7 +163,7 @@ func channelCloseMethod(m *amqpMessage, args []byte) (bool, bool) { return true, true } -//function to fetch fields from channel close and connection close +// function to fetch fields from channel close and connection close func getCloseInfo(args []byte, m *amqpMessage) bool { code := binary.BigEndian.Uint16(args[0:2]) m.isRequest = true @@ -411,7 +411,7 @@ func exchangeDeleteMethod(m *amqpMessage, args []byte) (bool, bool) { return true, true } -//this is a method exclusive to RabbitMQ +// this is a method exclusive to RabbitMQ func exchangeBindMethod(m *amqpMessage, args []byte) (bool, bool) { m.method = "exchange.bind" err := exchangeBindUnbindInfo(m, args) @@ -421,7 +421,7 @@ func exchangeBindMethod(m *amqpMessage, args []byte) (bool, bool) { return true, true } -//this is a method exclusive to RabbitMQ +// this is a method exclusive to RabbitMQ func exchangeUnbindMethod(m *amqpMessage, args []byte) (bool, bool) { m.method = "exchange.unbind" err := exchangeBindUnbindInfo(m, args) @@ -588,7 +588,7 @@ func basicPublishMethod(m *amqpMessage, args []byte) (bool, bool) { func basicReturnMethod(m *amqpMessage, args []byte) (bool, bool) { code := binary.BigEndian.Uint16(args[0:2]) if code < 300 { - //not an error or exception ? not interesting + // not an error or exception ? not interesting return true, false } replyText, nextOffset, err := getShortString(args, 3, uint32(args[2])) @@ -707,7 +707,7 @@ func basicAckMethod(m *amqpMessage, args []byte) (bool, bool) { return true, true } -//this is a rabbitMQ specific method +// this is a rabbitMQ specific method func basicNackMethod(m *amqpMessage, args []byte) (bool, bool) { params := getBitParams(args[8]) m.method = "basic.nack" @@ -761,14 +761,14 @@ func txRollbackMethod(m *amqpMessage, args []byte) (bool, bool) { return true, true } -//simple function used when server/client responds to a sync method with no new info +// simple function used when server/client responds to a sync method with no new info func okMethod(m *amqpMessage, args []byte) (bool, bool) { return true, true } // function to get a short string. It sends back an error if slice is too short -//for declared length. if length == 0, the function sends back an empty string and -//advances the offset. Otherwise, it returns the string and the new offset +// for declared length. if length == 0, the function sends back an empty string and +// advances the offset. Otherwise, it returns the string and the new offset func getShortString(data []byte, start uint32, length uint32) (short string, nextOffset uint32, err bool) { if length == 0 { return "", start, false @@ -779,7 +779,7 @@ func getShortString(data []byte, start uint32, length uint32) (short string, nex return string(data[start : start+length]), start + length, false } -//function to extract bit information in various AMQP methods +// function to extract bit information in various AMQP methods func getBitParams(bits byte) (ret [5]bool) { if bits&16 == 16 { ret[4] = true diff --git a/packetbeat/protos/amqp/amqp_parser.go b/packetbeat/protos/amqp/amqp_parser.go index 6ab15ec8159..a623219ca0b 100644 --- a/packetbeat/protos/amqp/amqp_parser.go +++ b/packetbeat/protos/amqp/amqp_parser.go @@ -42,10 +42,10 @@ func (amqp *amqpPlugin) amqpMessageParser(s *amqpStream) (ok bool, complete bool f, err := readFrameHeader(s.data[s.parseOffset:]) if err { - //incorrect header + // incorrect header return false, false } else if f == nil { - //header not complete + // header not complete return true, false } @@ -67,17 +67,14 @@ func (amqp *amqpPlugin) amqpMessageParser(s *amqpStream) (ok bool, complete bool s.parseOffset += 8 + int(f.size) if !ok { return false, false - } else if complete { + } + if complete { return true, true } } return ok, complete } -func (s *amqpStream) prepareForNewMessage() { - s.message = nil -} - func isProtocolHeader(data []byte) (isHeader bool, version string) { if (string(data[:4]) == "AMQP") && data[4] == 0 { return true, string(data[5:8]) @@ -85,7 +82,7 @@ func isProtocolHeader(data []byte) (isHeader bool, version string) { return false, "" } -//func to read a frame header and check if it is valid and complete +// func to read a frame header and check if it is valid and complete func readFrameHeader(data []byte) (ret *amqpFrame, err bool) { var frame amqpFrame if len(data) < 8 { @@ -103,7 +100,7 @@ func readFrameHeader(data []byte) (ret *amqpFrame, err bool) { } frame.Type = frameType(data[0]) if frame.size == 0 { - //frame content is nil with heartbeat frames + // frame content is nil with heartbeat frames frame.content = nil } else { frame.content = data[7 : frame.size+7] @@ -159,7 +156,7 @@ func (amqp *amqpPlugin) decodeHeaderFrame(s *amqpStream, buf []byte) bool { s.message.bodySize = binary.BigEndian.Uint64(buf[4:12]) debugf("Received Header frame. A message of %d bytes is expected", s.message.bodySize) - if amqp.parseHeaders == true { + if amqp.parseHeaders { err := getMessageProperties(s, buf[12:]) if err { return false @@ -180,7 +177,7 @@ func (s *amqpStream) decodeBodyFrame(buf []byte) (ok bool, complete bool) { debugf("A body frame of %d bytes long has been transmitted", len(buf)) - //is the message complete ? If yes, let's publish it + // is the message complete ? If yes, let's publish it complete = uint64(len(s.message.body)) >= s.message.bodySize return true, complete @@ -190,16 +187,16 @@ func hasProperty(prop, flag byte) bool { return (prop & flag) == flag } -//function to get message content-type and content-encoding +// function to get message content-type and content-encoding func getMessageProperties(s *amqpStream, data []byte) bool { m := s.message - //properties are coded in the two first bytes + // properties are coded in the two first bytes prop1 := data[0] prop2 := data[1] var offset uint32 = 2 - //while last bit set, we have another property flag field + // while last bit set, we have another property flag field for lastbit := 1; data[lastbit]&1 == 1; { lastbit += 2 offset += 2 @@ -238,9 +235,10 @@ func getMessageProperties(s *amqpStream, data []byte) bool { } if hasProperty(prop1, deliveryModeProp) { - if data[offset] == 1 { + switch data[offset] { + case 1: m.fields["delivery-mode"] = "non-persistent" - } else if data[offset] == 2 { + case 2: m.fields["delivery-mode"] = "persistent" } offset++ @@ -337,20 +335,20 @@ func (amqp *amqpPlugin) handleAmqp(m *amqpMessage, tcptuple *common.TCPTuple, di m.direction = dir m.cmdlineTuple = amqp.watcher.FindProcessesTupleTCP(tcptuple.IPPort()) - if m.method == "basic.publish" { + switch { + case m.method == "basic.publish": amqp.handlePublishing(m) - } else if m.method == "basic.deliver" || m.method == "basic.return" || - m.method == "basic.get-ok" { + case m.method == "basic.deliver" || m.method == "basic.return" || m.method == "basic.get-ok": amqp.handleDelivering(m) - } else if m.isRequest == true { + case m.isRequest: amqp.handleAmqpRequest(m) - } else if m.isRequest == false { + default: // !m.isRequest amqp.handleAmqpResponse(m) } } func (amqp *amqpPlugin) mustHideCloseMethod(m *amqpMessage) bool { - return amqp.hideConnectionInformation == true && + return amqp.hideConnectionInformation && (m.method == "connection.close" || m.method == "channel.close") && - getReplyCode(m.fields) < uint16(300) + getReplyCode(m.fields) < 300 } diff --git a/packetbeat/protos/amqp/amqp_structs.go b/packetbeat/protos/amqp/amqp_structs.go index 387e8df6fcb..ada8441c45a 100644 --- a/packetbeat/protos/amqp/amqp_structs.go +++ b/packetbeat/protos/amqp/amqp_structs.go @@ -30,12 +30,12 @@ const ( transactionTimeout = 10 * 1e9 ) -//layout used when a timestamp must be parsed +// layout used when a timestamp must be parsed const ( amqpTimeLayout = "January _2 15:04:05 2006" ) -//Frame types and codes +// Frame types and codes type frameType byte @@ -50,7 +50,7 @@ const ( frameEndOctet byte = 206 ) -//Codes for MethodMap +// Codes for MethodMap type codeClass uint16 const ( @@ -137,7 +137,7 @@ const ( txRollbackOk codeMethod = 31 ) -//Message properties codes for byte prop1 in getMessageProperties +// Message properties codes for byte prop1 in getMessageProperties const ( expirationProp byte = 1 replyToProp byte = 2 @@ -149,7 +149,7 @@ const ( contentTypeProp byte = 128 ) -//Message properties codes for byte prop2 in getMessageProperties +// Message properties codes for byte prop2 in getMessageProperties const ( appIDProp byte = 8 @@ -159,7 +159,7 @@ const ( messageIDProp byte = 128 ) -//table types +// table types const ( boolean = 't' shortShortInt = 'b' @@ -179,7 +179,7 @@ const ( timestamp = 'T' fieldTable = 'F' noField = 'V' - byteArray = 'x' //rabbitMQ specific field + byteArray = 'x' // rabbitMQ specific field ) type amqpPrivateData struct { @@ -203,7 +203,7 @@ type amqpMessage struct { direction uint8 parseArguments bool - //mapstr containing all the options for the methods and header fields + // mapstr containing all the options for the methods and header fields fields common.MapStr body []byte diff --git a/packetbeat/protos/amqp/amqp_test.go b/packetbeat/protos/amqp/amqp_test.go index 725de0f3d11..9b7f7dca35c 100644 --- a/packetbeat/protos/amqp/amqp_test.go +++ b/packetbeat/protos/amqp/amqp_test.go @@ -96,7 +96,7 @@ func TestAmqp_FrameSize(t *testing.T) { _, amqp := amqpModForTests() - //incomplete frame + // incomplete frame data, err := hex.DecodeString("0100000000000c000a001fffff000200") assert.NoError(t, err) @@ -118,7 +118,7 @@ func TestAmqp_PartialFrameSize(t *testing.T) { _, amqp := amqpModForTests() - //incomplete frame + // incomplete frame data, err := hex.DecodeString("414d515000060606010000000000") assert.NoError(t, err) @@ -275,7 +275,7 @@ func TestAmqp_ExchangeDeletion(t *testing.T) { assert.Equal(t, false, m.fields["no-wait"]) } -//this method is exclusive to RabbitMQ +// this method is exclusive to RabbitMQ func TestAmqp_ExchangeBind(t *testing.T) { logp.TestingSetup(logp.WithSelectors("amqp", "amqpdetailed")) @@ -308,7 +308,7 @@ func TestAmqp_ExchangeBind(t *testing.T) { } } -//this method is exclusive to RabbitMQ +// this method is exclusive to RabbitMQ func TestAmqp_ExchangeUnbindTransaction(t *testing.T) { logp.TestingSetup(logp.WithSelectors("amqp", "amqpdetailed")) @@ -365,13 +365,13 @@ func TestAmqp_PublishMessage(t *testing.T) { req := protos.Packet{Payload: data} private := protos.ProtocolData(new(amqpPrivateData)) - //method frame + // method frame private = amqp.Parse(&req, tcptuple, 0, private) req = protos.Packet{Payload: data2} - //header frame + // header frame private = amqp.Parse(&req, tcptuple, 0, private) req = protos.Packet{Payload: data3} - //body frame + // body frame amqp.Parse(&req, tcptuple, 0, private) trans := expectTransaction(t, results) @@ -414,13 +414,13 @@ func TestAmqp_DeliverMessage(t *testing.T) { req := protos.Packet{Payload: data} private := protos.ProtocolData(new(amqpPrivateData)) - //method frame + // method frame private = amqp.Parse(&req, tcptuple, 0, private) req = protos.Packet{Payload: data2} - //header frame + // header frame private = amqp.Parse(&req, tcptuple, 0, private) req = protos.Packet{Payload: data3} - //body frame + // body frame amqp.Parse(&req, tcptuple, 0, private) trans := expectTransaction(t, results) @@ -467,7 +467,7 @@ func TestAmqp_MessagePropertiesFields(t *testing.T) { assert.Equal(t, "el mensaje", m.fields["message-id"]) assert.Equal(t, "love message", m.fields["type"]) assert.Equal(t, "text/plain", m.fields["content-type"]) - //assert.Equal(t, "September 15 15:31:44 2015", m.Fields["timestamp"]) + // assert.Equal(t, "September 15 15:31:44 2015", m.Fields["timestamp"]) priority, ok := m.fields["priority"].(uint8) if !ok { t.Errorf("Field should be present") @@ -576,7 +576,7 @@ func TestAmqp_RejectMessage(t *testing.T) { req := protos.Packet{Payload: data} private := protos.ProtocolData(new(amqpPrivateData)) - //method frame + // method frame amqp.Parse(&req, tcptuple, 0, private) trans := expectTransaction(t, results) @@ -668,8 +668,8 @@ func TestAmqp_MaxBodyLength(t *testing.T) { req := protos.Packet{Payload: data} private := protos.ProtocolData(new(amqpPrivateData)) - //method frame - private = amqp.Parse(&req, tcptuple, 0, private) + // method frame + amqp.Parse(&req, tcptuple, 0, private) trans := expectTransaction(t, results) @@ -699,7 +699,7 @@ func TestAmqp_MaxBodyLength(t *testing.T) { req = protos.Packet{Payload: data} private = protos.ProtocolData(new(amqpPrivateData)) - //method frame + // method frame amqp.Parse(&req, tcptuple, 0, private) trans = expectTransaction(t, results) @@ -728,7 +728,7 @@ func TestAmqp_HideArguments(t *testing.T) { amqp.parseHeaders = false amqp.parseArguments = false - //parse args + // parse args data, err := hex.DecodeString("0100010000004d0032000a00000a5465737448656164" + "6572180000003704626f6f6c74010362697462050568656c6c6f530000001f4869206461" + "726c696e6720c3aac3aac3aac3aac3aac3aac3aae697a5e69cacce") @@ -736,7 +736,7 @@ func TestAmqp_HideArguments(t *testing.T) { tcptuple := testTCPTuple() req := protos.Packet{Payload: data} private := protos.ProtocolData(new(amqpPrivateData)) - private = amqp.Parse(&req, tcptuple, 0, private) + amqp.Parse(&req, tcptuple, 0, private) trans := expectTransaction(t, results) assert.Equal(t, "queue.declare", trans["method"]) @@ -753,7 +753,7 @@ func TestAmqp_HideArguments(t *testing.T) { t.Errorf("Arguments field should not be present") } - //parse headers + // parse headers data, err = hex.DecodeString("01000100000013003c00280000000a546573744865616" + "4657200ce02000100000026003c0000000000000000001a98800a746578742f706c61696" + "e02060a656c206d656e73616a65ce0300010000001a54657374206865616465722066696" + @@ -808,7 +808,7 @@ func TestAmqp_RecoverMethod(t *testing.T) { assert.Equal(t, common.MapStr{"requeue": true}, trans["amqp"]) } -//this is a specific rabbitMQ method +// this is a specific rabbitMQ method func TestAmqp_BasicNack(t *testing.T) { logp.TestingSetup(logp.WithSelectors("amqp", "amqpdetailed")) @@ -887,7 +887,7 @@ func TestAmqp_GetTable(t *testing.T) { assert.Equal(t, true, m.fields["no-wait"]) assert.Equal(t, true, m.fields["auto-delete"]) assert.Equal(t, false, m.fields["exclusive"]) - //assert.Equal(t, "September 15 11:25:29 2015", args["timestamp"]) + // assert.Equal(t, "September 15 11:25:29 2015", args["timestamp"]) assert.Equal(t, "TestHeader", m.request) } @@ -948,7 +948,7 @@ func TestAmqp_ArrayFields(t *testing.T) { _, amqp := amqpModForTests() - //byte array, rabbitMQ specific field + // byte array, rabbitMQ specific field data, err := hex.DecodeString("010001000000260028000a0000057465737431057" + "46f706963020000000f05617272617978000000040a007dd2ce") assert.NoError(t, err) @@ -1025,7 +1025,7 @@ func TestAmqp_WrongTable(t *testing.T) { _, amqp := amqpModForTests() - //declared table size too big + // declared table size too big data, err := hex.DecodeString("010001000000890032000a00000a54657374486561646" + "57218000000da0974696d657374616d70540000000055f7e409036269746205076465636" + "96d616c440500ec49050568656c6c6f530000001f4869206461726c696e6720c3aac3aac" + @@ -1048,7 +1048,7 @@ func TestAmqp_WrongTable(t *testing.T) { } assert.Equal(t, []string{"Failed to parse additional arguments"}, m.notes) - //table size ok, but total non-sense inside + // table size ok, but total non-sense inside data, err = hex.DecodeString("010001000000890032000a00000a54657374486561646" + "57218000000730974696d657374616d7054004400005521e409036269743705076400036" + "96d616c447600ec49180568036c6c0b536400001f480a2064076e6c696e0520c3aac3aac" + diff --git a/packetbeat/protos/amqp/config.go b/packetbeat/protos/amqp/config.go index 2939530046e..4cbd5a5200a 100644 --- a/packetbeat/protos/amqp/config.go +++ b/packetbeat/protos/amqp/config.go @@ -30,14 +30,12 @@ type amqpConfig struct { HideConnectionInformation bool `config:"hide_connection_information"` } -var ( - defaultConfig = amqpConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - }, - ParseHeaders: true, - ParseArguments: true, - MaxBodyLength: 1000, - HideConnectionInformation: true, - } -) +var defaultConfig = amqpConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + }, + ParseHeaders: true, + ParseArguments: true, + MaxBodyLength: 1000, + HideConnectionInformation: true, +} diff --git a/packetbeat/protos/cassandra/cassandra.go b/packetbeat/protos/cassandra/cassandra.go index 7d3001a5159..5c7cbd003d1 100644 --- a/packetbeat/protos/cassandra/cassandra.go +++ b/packetbeat/protos/cassandra/cassandra.go @@ -50,9 +50,7 @@ type stream struct { parser parser } -var ( - debugf = logp.MakeDebug("cassandra") -) +var debugf = logp.MakeDebug("cassandra") func init() { protos.Register("cassandra", New) @@ -202,11 +200,6 @@ func (cassandra *cassandra) ensureConnection(private protos.ProtocolData) *conne return conn } -func (conn *connection) dropStreams() { - conn.streams[0] = nil - conn.streams[1] = nil -} - func getConnection(private protos.ProtocolData) *connection { if private == nil { return nil diff --git a/packetbeat/protos/cassandra/config.go b/packetbeat/protos/cassandra/config.go index 0eafddcd1ee..8e93239bc6b 100644 --- a/packetbeat/protos/cassandra/config.go +++ b/packetbeat/protos/cassandra/config.go @@ -34,20 +34,18 @@ type cassandraConfig struct { OPsIgnored []gocql.FrameOp `config:"ignored_ops"` } -var ( - defaultConfig = cassandraConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - SendRequest: true, - SendResponse: true, - }, - SendRequestHeader: true, - SendResponseHeader: true, - } -) +var defaultConfig = cassandraConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + SendRequest: true, + SendResponse: true, + }, + SendRequestHeader: true, + SendResponseHeader: true, +} func (c *cassandraConfig) Validate() error { - if !(c.Compressor == "" || c.Compressor == "snappy") { + if c.Compressor != "" && c.Compressor != "snappy" { return fmt.Errorf("invalid compressor config: %s, only snappy supported", c.Compressor) } return nil diff --git a/packetbeat/protos/cassandra/internal/gocql/array_decoder.go b/packetbeat/protos/cassandra/internal/gocql/array_decoder.go index a224dc7d1b5..b64ecf8e146 100644 --- a/packetbeat/protos/cassandra/internal/gocql/array_decoder.go +++ b/packetbeat/protos/cassandra/internal/gocql/array_decoder.go @@ -26,10 +26,6 @@ type ByteArrayDecoder struct { Data *[]byte } -func readInt(p []byte) int32 { - return int32(p[0])<<24 | int32(p[1])<<16 | int32(p[2])<<8 | int32(p[3]) -} - func (f ByteArrayDecoder) ReadByte() (byte, error) { data := *f.Data if len(data) < 1 { @@ -167,7 +163,7 @@ func (f ByteArrayDecoder) ReadInet() (net.IP, int) { size := data[0] *f.Data = data[1:] - if !(size == 4 || size == 16) { + if size != 4 && size != 16 { panic(fmt.Errorf("invalid IP size: %d", size)) } diff --git a/packetbeat/protos/cassandra/internal/gocql/compressor.go b/packetbeat/protos/cassandra/internal/gocql/compressor.go index cfbff208ade..fe6583c3a77 100644 --- a/packetbeat/protos/cassandra/internal/gocql/compressor.go +++ b/packetbeat/protos/cassandra/internal/gocql/compressor.go @@ -49,11 +49,11 @@ func (s SnappyCompressor) Decode(data []byte) ([]byte, error) { const LZ4 string = "lz4" type LZ4Compressor struct { - //TODO + // TODO } const Deflate string = "deflate" type DeflateCompressor struct { - //TODO + // TODO } diff --git a/packetbeat/protos/cassandra/internal/gocql/decoder.go b/packetbeat/protos/cassandra/internal/gocql/decoder.go index 734a940d8bd..f628aa65120 100644 --- a/packetbeat/protos/cassandra/internal/gocql/decoder.go +++ b/packetbeat/protos/cassandra/internal/gocql/decoder.go @@ -23,34 +23,19 @@ import ( type Decoder interface { ReadByte() (byte, error) - ReadInt() (n int) - ReadShort() (n uint16) - ReadLong() (n int64) - ReadString() (s string) - ReadLongString() (s string) - ReadUUID() *UUID - ReadStringList() []string - ReadBytesInternal() []byte - ReadBytes() []byte - ReadShortBytes() []byte - ReadInet() (net.IP, int) - ReadConsistency() Consistency - ReadStringMap() map[string]string - ReadBytesMap() map[string][]byte - ReadStringMultiMap() map[string][]string } diff --git a/packetbeat/protos/cassandra/internal/gocql/frame.go b/packetbeat/protos/cassandra/internal/gocql/frame.go index 25e7df5bac8..b8ae7eeac4e 100644 --- a/packetbeat/protos/cassandra/internal/gocql/frame.go +++ b/packetbeat/protos/cassandra/internal/gocql/frame.go @@ -182,18 +182,17 @@ func (f *Framer) ReadFrame() (data map[string]interface{}, err error) { data = make(map[string]interface{}) - //Only QUERY, PREPARE and EXECUTE queries support tracing - //If a response frame has the tracing flag set, its body contains - //a tracing ID. The tracing ID is a [uuid] and is the first thing in - //the frame body. The rest of the body will then be the usual body - //corresponding to the response opcode. + // Only QUERY, PREPARE and EXECUTE queries support tracing + // If a response frame has the tracing flag set, its body contains + // a tracing ID. The tracing ID is a [uuid] and is the first thing in + // the frame body. The rest of the body will then be the usual body + // corresponding to the response opcode. if f.Header.Flags&flagTracing == flagTracing && (f.Header.Op&opQuery == opQuery || f.Header.Op&opExecute == opExecute || f.Header.Op&opPrepare == opPrepare) { - debugf("tracing enabled") - //seems no UUID to read, protocol incorrect? - //uid := decoder.ReadUUID() - //data["trace_id"] = uid.String() + // seems no UUID to read, protocol incorrect? + // uid := decoder.ReadUUID() + // data["trace_id"] = uid.String() } if f.Header.Flags&flagWarning == flagWarning { @@ -211,7 +210,7 @@ func (f *Framer) ReadFrame() (data map[string]interface{}, err error) { } if f.Header.Flags&flagCompress == flagCompress { - //decompress data and switch to use bytearray decoder + // decompress data and switch to use bytearray decoder if f.compres == nil { logp.Err("hit compress flag, but compressor was not set") panic(errors.New("hit compress flag, but compressor was not set")) @@ -234,13 +233,13 @@ func (f *Framer) ReadFrame() (data map[string]interface{}, err error) { // assumes that the frame body has been read into rbuf switch f.Header.Op { - //below ops are requests + // below ops are requests case opStartup, opAuthResponse, opOptions, opPrepare, opExecute, opBatch, opRegister: - //ignored + // ignored case opQuery: data = f.parseQueryFrame() - //below ops are responses + // below ops are responses case opError: data["error"] = f.parseErrorFrame() case opResult: @@ -259,7 +258,7 @@ func (f *Framer) ReadFrame() (data map[string]interface{}, err error) { // the body should be empty default: - //ignore + // ignore debugf("unknow ops, not processed, %v", f.Header) } @@ -348,7 +347,7 @@ func (f *Framer) parseErrorFrame() (data map[string]interface{}) { case errInvalid, errBootstrapping, errConfig, errCredentials, errOverloaded, errProtocol, errServer, errSyntax, errTruncate, errUnauthorized: - //ignored + // ignored default: logp.Err("unknown error code: 0x%x", code) } @@ -375,8 +374,7 @@ func (f *Framer) parseResultMetadata(getPKinfo bool) map[string]interface{} { meta["col_count"] = colCount if getPKinfo { - - //only for prepared result + // only for prepared result if f.proto >= protoVersion4 { pkeyCount := decoder.ReadInt() pkeys := make([]int, pkeyCount) @@ -450,7 +448,6 @@ func (f *Framer) parseResultPrepared() map[string]interface{} { result := make(map[string]interface{}) uuid, err := UUIDFromBytes((f.decoder).ReadShortBytes()) - if err != nil { logp.Err("Error in parsing UUID") } diff --git a/packetbeat/protos/cassandra/internal/gocql/marshal.go b/packetbeat/protos/cassandra/internal/gocql/marshal.go index 2061bb2f11e..3c55781cc81 100644 --- a/packetbeat/protos/cassandra/internal/gocql/marshal.go +++ b/packetbeat/protos/cassandra/internal/gocql/marshal.go @@ -349,8 +349,8 @@ const ( errUnprepared ErrType = 0x2500 ) -func (this ErrType) String() string { - switch this { +func (e ErrType) String() string { + switch e { case errUnavailable: return "errUnavailable" case errWriteTimeout: @@ -680,7 +680,7 @@ func (u UUID) Bytes() []byte { // String returns the UUID in it's canonical form, a 32 digit hexadecimal // number in the form of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. func (u UUID) String() string { - var offsets = [...]int{0, 2, 4, 6, 9, 11, 14, 16, 19, 21, 24, 26, 28, 30, 32, 34} + offsets := [...]int{0, 2, 4, 6, 9, 11, 14, 16, 19, 21, 24, 26, 28, 30, 32, 34} const hexString = "0123456789abcdef" r := make([]byte, 36) for i, b := range u { diff --git a/packetbeat/protos/cassandra/internal/gocql/stream_decoder.go b/packetbeat/protos/cassandra/internal/gocql/stream_decoder.go index ae107a95e9e..f39cde2d11e 100644 --- a/packetbeat/protos/cassandra/internal/gocql/stream_decoder.go +++ b/packetbeat/protos/cassandra/internal/gocql/stream_decoder.go @@ -149,7 +149,7 @@ func (f StreamDecoder) ReadInet() (net.IP, int) { panic(err) } - if !(size == 4 || size == 16) { + if size != 4 && size != 16 { panic(fmt.Errorf("invalid IP size: %d", size)) } diff --git a/packetbeat/protos/cassandra/parser.go b/packetbeat/protos/cassandra/parser.go index f699187b03f..65ff347a1ea 100644 --- a/packetbeat/protos/cassandra/parser.go +++ b/packetbeat/protos/cassandra/parser.go @@ -44,14 +44,7 @@ type parserConfig struct { // check whether this ops is enabled or not func (p *parser) CheckFrameOpsIgnored() bool { - if p.config.ignoredOps != nil && len(p.config.ignoredOps) > 0 { - //default map value is false - v := p.config.ignoredOps[p.framer.Header.Op] - if v { - return true - } - } - return false + return p.config.ignoredOps[p.framer.Header.Op] } type message struct { @@ -69,8 +62,6 @@ type message struct { // list element use by 'transactions' for correlation next *message - transactionTimeout time.Duration - results transactions } @@ -91,7 +82,6 @@ func (p *parser) init( } isDebug = logp.IsDebug("cassandra") - } func (p *parser) append(data []byte) error { @@ -153,7 +143,7 @@ func (p *parser) parserBody() (bool, error) { return true, nil } - //let's wait for enough buf + // let's wait for enough buf debugf("bodyLength: %d", bdyLen) if !p.buf.Avail(bdyLen) { if isDebug { @@ -162,7 +152,7 @@ func (p *parser) parserBody() (bool, error) { return false, nil } - //check if the ops already ignored + // check if the ops already ignored if p.message.ignored { if isDebug { debugf("message marked to be ignored, let's do this") @@ -232,7 +222,7 @@ func (p *parser) parse() (*message, error) { } } - //check if the ops need to be ignored + // check if the ops need to be ignored if p.CheckFrameOpsIgnored() { // as we already ignore the content, we now mark the result is ignored p.message.ignored = true @@ -248,7 +238,7 @@ func (p *parser) parse() (*message, error) { return nil, err } - //ignore and wait for more data + // ignore and wait for more data if !finished { return nil, nil } diff --git a/packetbeat/protos/cassandra/pub.go b/packetbeat/protos/cassandra/pub.go index 3b90c53feae..82effab92d3 100644 --- a/packetbeat/protos/cassandra/pub.go +++ b/packetbeat/protos/cassandra/pub.go @@ -33,7 +33,6 @@ type transPub struct { sendResponse bool sendRequestHeader bool sendResponseHeader bool - ignoredOps string results protos.Reporter } @@ -82,7 +81,7 @@ func (pub *transPub) createEvent(requ, resp *message) beat.Event { cassandra := common.MapStr{} status := common.OK_STATUS - //requ can be null, if the message is a PUSHed message + // requ can be null, if the message is a PUSHed message if requ != nil { pbf.Source.Bytes = int64(requ.Size) pbf.Event.Start = requ.Ts @@ -101,7 +100,7 @@ func (pub *transPub) createEvent(requ, resp *message) beat.Event { } } } else { - //dealing with PUSH message + // dealing with PUSH message cassandra["no_request"] = true } diff --git a/packetbeat/protos/cassandra/trans.go b/packetbeat/protos/cassandra/trans.go index 9b055d22c88..d7a9ae60d5f 100644 --- a/packetbeat/protos/cassandra/trans.go +++ b/packetbeat/protos/cassandra/trans.go @@ -132,7 +132,6 @@ func (trans *transactions) onResponse( func (trans *transactions) tryMergeRequests( prev, msg *message, ) (merged bool, err error) { - msg.isComplete = true return false, nil } @@ -150,7 +149,7 @@ func (trans *transactions) correlate() error { if requests.empty() { for !responses.empty() { - //if the response is EVENT, which pushed from server, we can accept that + // if the response is EVENT, which pushed from server, we can accept that resp := responses.first() if !resp.isComplete { break diff --git a/packetbeat/protos/dhcpv4/config.go b/packetbeat/protos/dhcpv4/config.go index 4121ee66ba7..7245e3c641b 100644 --- a/packetbeat/protos/dhcpv4/config.go +++ b/packetbeat/protos/dhcpv4/config.go @@ -25,10 +25,8 @@ type dhcpv4Config struct { config.ProtocolCommon `config:",inline"` } -var ( - defaultConfig = dhcpv4Config{ - ProtocolCommon: config.ProtocolCommon{ - Ports: []int{67, 68}, - }, - } -) +var defaultConfig = dhcpv4Config{ + ProtocolCommon: config.ProtocolCommon{ + Ports: []int{67, 68}, + }, +} diff --git a/packetbeat/protos/dns/config.go b/packetbeat/protos/dns/config.go index c98d52f8257..c1044cf2f7c 100644 --- a/packetbeat/protos/dns/config.go +++ b/packetbeat/protos/dns/config.go @@ -28,10 +28,8 @@ type dnsConfig struct { IncludeAdditionals bool `config:"include_additionals"` } -var ( - defaultConfig = dnsConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - }, - } -) +var defaultConfig = dnsConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + }, +} diff --git a/packetbeat/protos/dns/dns.go b/packetbeat/protos/dns/dns.go index 125d6112bae..04be88a36b1 100644 --- a/packetbeat/protos/dns/dns.go +++ b/packetbeat/protos/dns/dns.go @@ -59,18 +59,10 @@ type dnsPlugin struct { watcher procs.ProcessesWatcher } -var ( - debugf = logp.MakeDebug("dns") -) +var debugf = logp.MakeDebug("dns") const maxDNSTupleRawSize = 16 + 16 + 2 + 2 + 4 + 1 -// Constants used to associate the DNS QR flag with a meaningful value. -const ( - query = false - response = true -) - // Transport protocol. type transport uint8 @@ -203,13 +195,12 @@ func (dns *dnsPlugin) getTransaction(k hashableDNSTuple) *dnsTransaction { } type dnsTransaction struct { - ts time.Time // Time when the request was received. - tuple dnsTuple // Key used to track this transaction in the transactionsMap. - responseTime int32 // Elapsed time in milliseconds between the request and response. - src common.Endpoint - dst common.Endpoint - transport transport - notes []string + ts time.Time // Time when the request was received. + tuple dnsTuple // Key used to track this transaction in the transactionsMap. + src common.Endpoint + dst common.Endpoint + transport transport + notes []string request *dnsMessage response *dnsMessage diff --git a/packetbeat/protos/dns/dns_tcp.go b/packetbeat/protos/dns/dns_tcp.go index bbf7e736926..8addcdd6896 100644 --- a/packetbeat/protos/dns/dns_tcp.go +++ b/packetbeat/protos/dns/dns_tcp.go @@ -107,7 +107,6 @@ func (dns *dnsPlugin) doParse(conn *dnsConnectionData, pkt *protos.Packet, tcpTu } } decodedData, err := stream.handleTCPRawData() - if err != nil { if err == incompleteMsg { @@ -259,8 +258,8 @@ func (dns *dnsPlugin) publishResponseError(conn *dnsConnectionData, err error) { trans.notes = append(trans.notes, errDNS.responseError()) // Should we publish the length (bytes_out) of the failed Response? - //streamReverse.message.Length = len(streamReverse.rawData) - //trans.Response = streamReverse.message + // streamReverse.message.Length = len(streamReverse.rawData) + // trans.Response = streamReverse.message dns.publishTransaction(trans) dns.deleteTransaction(hashDNSTupleOrigin) @@ -296,7 +295,6 @@ func (stream *dnsStream) handleTCPRawData() (*mkdns.Msg, error) { } decodedData, err := decodeDNSData(transportTCP, rawData[:stream.parseOffset]) - if err != nil { return nil, err } diff --git a/packetbeat/protos/dns/dns_test.go b/packetbeat/protos/dns/dns_test.go index 9427ebeaecf..1ba03b2bd61 100644 --- a/packetbeat/protos/dns/dns_test.go +++ b/packetbeat/protos/dns/dns_test.go @@ -316,8 +316,10 @@ func TestRRsToMapStrsWithOPTRecord(t *testing.T) { o.Hdr.Rrtype = mkdns.TypeOPT r := new(mkdns.MX) - r.Hdr = mkdns.RR_Header{Name: "miek.nl", Rrtype: mkdns.TypeMX, - Class: mkdns.ClassINET, Ttl: 3600} + r.Hdr = mkdns.RR_Header{ + Name: "miek.nl", Rrtype: mkdns.TypeMX, + Class: mkdns.ClassINET, Ttl: 3600, + } r.Preference = 10 r.Mx = "mx.miek.nl" diff --git a/packetbeat/protos/dns/dns_udp_test.go b/packetbeat/protos/dns/dns_udp_test.go index 3711fb50e00..62713502e0a 100644 --- a/packetbeat/protos/dns/dns_udp_test.go +++ b/packetbeat/protos/dns/dns_udp_test.go @@ -155,10 +155,12 @@ var ( qSubdomain: "131.252.30", qTLD: "in-addr.arpa", answers: []string{"github.com"}, - authorities: []string{"a.root-servers.net", "b.root-servers.net", "c.root-servers.net", + authorities: []string{ + "a.root-servers.net", "b.root-servers.net", "c.root-servers.net", "d.root-servers.net", "e.root-servers.net", "f.root-servers.net", "g.root-servers.net", "h.root-servers.net", "i.root-servers.net", "j.root-servers.net", "k.root-servers.net", - "l.root-servers.net", "m.root-servers.net"}, + "l.root-servers.net", "m.root-servers.net", + }, request: []byte{ 0x01, 0x58, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x31, 0x33, 0x31, 0x03, 0x32, 0x35, 0x32, 0x02, 0x33, 0x30, 0x03, 0x31, 0x39, 0x32, 0x07, 0x69, 0x6e, 0x2d, 0x61, diff --git a/packetbeat/protos/http/config.go b/packetbeat/protos/http/config.go index 86f59fb36b1..45878934b0c 100644 --- a/packetbeat/protos/http/config.go +++ b/packetbeat/protos/http/config.go @@ -39,12 +39,10 @@ type httpConfig struct { RedactHeaders []string `config:"redact_headers"` } -var ( - defaultConfig = httpConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - }, - MaxMessageSize: tcp.TCPMaxDataInStream, - DecodeBody: true, - } -) +var defaultConfig = httpConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + }, + MaxMessageSize: tcp.TCPMaxDataInStream, + DecodeBody: true, +} diff --git a/packetbeat/protos/http/http.go b/packetbeat/protos/http/http.go index e86cb665587..9cc436f84f0 100644 --- a/packetbeat/protos/http/http.go +++ b/packetbeat/protos/http/http.go @@ -39,8 +39,10 @@ import ( "github.com/elastic/beats/v7/packetbeat/protos" ) -var debugf = logp.MakeDebug("http") -var detailedf = logp.MakeDebug("httpdetailed") +var ( + debugf = logp.MakeDebug("http") + detailedf = logp.MakeDebug("httpdetailed") +) type parserState uint8 @@ -300,7 +302,6 @@ func (http *httpPlugin) doParse( tcptuple *common.TCPTuple, dir uint8, ) *httpConnectionData { - if isDetailed { detailedf("Payload received: [%s]", pkt.Payload) } @@ -368,8 +369,8 @@ func newStream(pkt *protos.Packet, tcptuple *common.TCPTuple) *stream { // ReceivedFin will be called when TCP transaction is terminating. func (http *httpPlugin) ReceivedFin(tcptuple *common.TCPTuple, dir uint8, - private protos.ProtocolData) protos.ProtocolData { - + private protos.ProtocolData, +) protos.ProtocolData { debugf("Received FIN") conn := getHTTPConnection(private) if conn == nil { @@ -396,8 +397,8 @@ func (http *httpPlugin) ReceivedFin(tcptuple *common.TCPTuple, dir uint8, // GapInStream is called when a gap of nbytes bytes is found in the stream (due // to packet loss). func (http *httpPlugin) GapInStream(tcptuple *common.TCPTuple, dir uint8, - nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool) { - + nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool, +) { defer logp.Recover("GapInStream(http) exception") conn := getHTTPConnection(private) @@ -436,7 +437,6 @@ func (http *httpPlugin) handleHTTP( tcptuple *common.TCPTuple, dir uint8, ) { - m.tcpTuple = *tcptuple m.direction = dir m.cmdlineTuple = http.watcher.FindProcessesTupleTCP(tcptuple.IPPort()) @@ -488,7 +488,6 @@ func (http *httpPlugin) flushRequests(conn *httpConnectionData) { } func (http *httpPlugin) correlate(conn *httpConnectionData) { - // drop responses with missing requests if conn.requests.empty() { http.flushResponses(conn) @@ -724,8 +723,7 @@ func splitCookiesHeader(headerVal string) map[string]string { for _, cval := range cstring { cookie := strings.SplitN(cval, "=", 2) if len(cookie) == 2 { - cookies[strings.ToLower(strings.TrimSpace(cookie[0]))] = - parseCookieValue(strings.TrimSpace(cookie[1])) + cookies[strings.ToLower(strings.TrimSpace(cookie[0]))] = parseCookieValue(strings.TrimSpace(cookie[1])) } } @@ -928,10 +926,6 @@ func (ml *messageList) pop() *message { return msg } -func (ml *messageList) last() *message { - return ml.tail -} - func extractBasicAuthUser(headers map[string]common.NetString) string { const prefix = "Basic " diff --git a/packetbeat/protos/http/http_parser.go b/packetbeat/protos/http/http_parser.go index be4343ea120..a903460f772 100644 --- a/packetbeat/protos/http/http_parser.go +++ b/packetbeat/protos/http/http_parser.go @@ -45,7 +45,7 @@ type message struct { cmdlineTuple *common.ProcessTuple direction uint8 - //Request Info + // Request Info requestURI common.NetString method common.NetString statusCode uint16 @@ -187,7 +187,7 @@ func (*parser) parseHTTPLine(s *stream, m *message) (cont, ok, complete bool) { return false, false, false } if bytes.Equal(fline[0:5], constHTTPVersion) { - //RESPONSE + // RESPONSE m.isRequest = false version = fline[5:8] m.statusCode, m.statusPhrase, err = parseResponseStatus(fline[9:]) @@ -289,7 +289,7 @@ func (parser *parser) parseHeaders(s *stream, m *message) (cont, ok, complete bo s.parseOffset = 0 if !m.isRequest && ((100 <= m.statusCode && m.statusCode < 200) || m.statusCode == 204 || m.statusCode == 304) { - //response with a 1xx, 204 , or 304 status code is always terminated + // response with a 1xx, 204 , or 304 status code is always terminated // by the first empty line after the header fields if isDebug { debugf("Terminate response, status code %d", m.statusCode) diff --git a/packetbeat/protos/http/http_test.go b/packetbeat/protos/http/http_test.go index 0fa9077a5ed..4179a047d56 100644 --- a/packetbeat/protos/http/http_test.go +++ b/packetbeat/protos/http/http_test.go @@ -56,10 +56,6 @@ func (e *eventStore) publish(event beat.Event) { e.events = append(e.events, event) } -func (e *eventStore) empty() bool { - return len(e.events) == 0 -} - func newTestParser(http *httpPlugin, payloads ...string) *testParser { if http == nil { http = httpModForTests(nil) @@ -538,7 +534,7 @@ func TestHttpParser_RequestResponseBody(t *testing.T) { tp.stream.PrepareForNewMessage() tp.stream.message = &message{ts: time.Now()} - msg, ok, complete = tp.parse() + _, ok, complete = tp.parse() assert.True(t, ok) assert.True(t, complete) } @@ -646,17 +642,23 @@ func TestEatBodyChunked(t *testing.T) { st.data = append(st.data, msgs[1]...) cont, ok, complete = parser.parseBodyChunkedStart(st, msg) assert.True(t, cont) + assert.True(t, ok) + assert.False(t, complete) assert.Equal(t, 3, msg.chunkedLength) assert.Equal(t, 0, len(msg.body)) assert.Equal(t, stateBodyChunked, st.parseState) cont, ok, complete = parser.parseBodyChunked(st, msg) assert.True(t, cont) + assert.True(t, ok) + assert.False(t, complete) assert.Equal(t, stateBodyChunkedStart, st.parseState) assert.Equal(t, 3, msg.contentLength) cont, ok, complete = parser.parseBodyChunkedStart(st, msg) assert.True(t, cont) + assert.True(t, ok) + assert.False(t, complete) assert.Equal(t, 3, msg.chunkedLength) assert.Equal(t, 3, msg.contentLength) assert.Equal(t, stateBodyChunked, st.parseState) @@ -672,6 +674,8 @@ func TestEatBodyChunked(t *testing.T) { st.data = append(st.data, msgs[2]...) cont, ok, complete = parser.parseBodyChunked(st, msg) assert.True(t, cont) + assert.True(t, ok) + assert.False(t, complete) assert.Equal(t, 6, msg.contentLength) assert.Equal(t, stateBodyChunkedStart, st.parseState) @@ -729,7 +733,6 @@ func TestEatBodyChunkedWaitCRLF(t *testing.T) { ok, complete = parser.parseBodyChunkedWaitFinalCRLF(st, msg) if ok != true || complete != false { t.Error("Wrong return values", ok, complete) - } st.data = append(st.data, msgs[1]...) @@ -817,13 +820,12 @@ func TestHttpParser_censorPasswordPOST(t *testing.T) { http.parserConfig.sendHeaders = true http.parserConfig.sendAllHeaders = true - data1 := - "POST /users/login HTTP/1.1\r\n" + - "HOST: www.example.com\r\n" + - "Content-Type: application/x-www-form-urlencoded\r\n" + - "Content-Length: 28\r\n" + - "\r\n" + - "username=ME&password=secret\r\n" + data1 := "POST /users/login HTTP/1.1\r\n" + + "HOST: www.example.com\r\n" + + "Content-Type: application/x-www-form-urlencoded\r\n" + + "Content-Length: 28\r\n" + + "\r\n" + + "username=ME&password=secret\r\n" tp := newTestParser(http, data1) msg, ok, complete := tp.parse() @@ -1511,7 +1513,8 @@ func TestHTTP_Encodings(t *testing.T) { gzipDeflateBody := string([]byte{ 0x1f, 0x8b, 0x08, 0x00, 0x65, 0xdb, 0x6a, 0x5b, 0x00, 0x03, 0x3b, 0x7d, 0xe2, 0xbc, 0xe7, 0x13, 0x26, 0x06, 0x00, 0x95, 0xfa, 0x49, 0xbf, 0x07, - 0x00, 0x00, 0x00}) + 0x00, 0x00, 0x00, + }) var store eventStore http := httpModForTests(&store) diff --git a/packetbeat/protos/icmp/config.go b/packetbeat/protos/icmp/config.go index cb3ee28d7f9..4fcdb6667e5 100644 --- a/packetbeat/protos/icmp/config.go +++ b/packetbeat/protos/icmp/config.go @@ -29,8 +29,6 @@ type icmpConfig struct { TransactionTimeout time.Duration `config:"transaction_timeout"` } -var ( - defaultConfig = icmpConfig{ - TransactionTimeout: protos.DefaultTransactionExpiration, - } -) +var defaultConfig = icmpConfig{ + TransactionTimeout: protos.DefaultTransactionExpiration, +} diff --git a/packetbeat/protos/icmp/icmp.go b/packetbeat/protos/icmp/icmp.go index 521bb019ce6..c204b819adb 100644 --- a/packetbeat/protos/icmp/icmp.go +++ b/packetbeat/protos/icmp/icmp.go @@ -102,7 +102,7 @@ func (icmp *icmpPlugin) init(results protos.Reporter, watcher procs.ProcessesWat } logp.Debug("icmp", "Local IP addresses: %s", icmp.localIps) - var removalListener = func(k common.Key, v common.Value) { + removalListener := func(k common.Key, v common.Value) { icmp.expireTransaction(k.(hashableIcmpTuple), v.(*icmpTransaction)) } @@ -145,7 +145,7 @@ func (icmp *icmpPlugin) ProcessICMPv4( ts: pkt.Ts, Type: typ, code: code, - length: len(icmp4.BaseLayer.Payload), + length: len(icmp4.Payload), } if isRequest(tuple, msg) { @@ -180,7 +180,7 @@ func (icmp *icmpPlugin) ProcessICMPv6( ts: pkt.Ts, Type: typ, code: code, - length: len(icmp6.BaseLayer.Payload), + length: len(icmp6.Payload), } if isRequest(tuple, msg) { @@ -257,14 +257,6 @@ func (icmp *icmpPlugin) isLocalIP(ip net.IP) bool { return false } -func (icmp *icmpPlugin) getTransaction(k hashableIcmpTuple) *icmpTransaction { - v := icmp.transactions.Get(k) - if v != nil { - return v.(*icmpTransaction) - } - return nil -} - func (icmp *icmpPlugin) deleteTransaction(k hashableIcmpTuple) *icmpTransaction { v := icmp.transactions.Delete(k) if v != nil { diff --git a/packetbeat/protos/icmp/tuple_test.go b/packetbeat/protos/icmp/tuple_test.go index 7c9112decb1..b8d09e6753f 100644 --- a/packetbeat/protos/icmp/tuple_test.go +++ b/packetbeat/protos/icmp/tuple_test.go @@ -79,7 +79,8 @@ func TestIcmpTupleHashable(t *testing.T) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 192, 168, 0, 2, 1, 0, 0, 1, - 4} + 4, + } assert.Equal(t, expectedHashable, actualHashable) } diff --git a/packetbeat/protos/memcache/binary.go b/packetbeat/protos/memcache/binary.go index f9db915ce8a..ee831055317 100644 --- a/packetbeat/protos/memcache/binary.go +++ b/packetbeat/protos/memcache/binary.go @@ -28,8 +28,6 @@ import ( "github.com/elastic/beats/v7/libbeat/common/streambuf" ) -type memcacheMagic uint8 - const ( memcacheMagicRequest = 0x80 memcacheMagicResponse = 0x81 @@ -56,10 +54,11 @@ var binStatsValue = argDef{ serialize: serializeStats, } -var extraValue = makeValueExtra("value") -var extraDelta = makeValueExtra("delta") -var extraInitial = makeValue2Extra("initial") -var extraVerbosity = make32ValueExtra("verbosity") +var ( + extraDelta = makeValueExtra("delta") + extraInitial = makeValue2Extra("initial") + extraVerbosity = make32ValueExtra("verbosity") +) func init() { // define all memcache opcode commands: diff --git a/packetbeat/protos/memcache/config.go b/packetbeat/protos/memcache/config.go index e558c84153d..dfe01e86e3b 100644 --- a/packetbeat/protos/memcache/config.go +++ b/packetbeat/protos/memcache/config.go @@ -32,11 +32,9 @@ type memcacheConfig struct { ParseUnknown bool } -var ( - defaultConfig = memcacheConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - }, - UDPTransactionTimeout: protos.DefaultTransactionExpiration, - } -) +var defaultConfig = memcacheConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + }, + UDPTransactionTimeout: protos.DefaultTransactionExpiration, +} diff --git a/packetbeat/protos/memcache/errors.go b/packetbeat/protos/memcache/errors.go index 3b6b5b9ae45..282812a3492 100644 --- a/packetbeat/protos/memcache/errors.go +++ b/packetbeat/protos/memcache/errors.go @@ -23,9 +23,7 @@ import ( "errors" ) -var ( - errNotImplemented = errors.New("not implemented") -) +var errNotImplemented = errors.New("not implemented") // memcache text parser errors var ( diff --git a/packetbeat/protos/memcache/parse.go b/packetbeat/protos/memcache/parse.go index 2fe774c19e5..01ce9a05acb 100644 --- a/packetbeat/protos/memcache/parse.go +++ b/packetbeat/protos/memcache/parse.go @@ -25,11 +25,6 @@ import ( "github.com/elastic/beats/v7/libbeat/common/streambuf" ) -const ( - codeSpace byte = ' ' - codeTab = '\t' -) - type parserConfig struct { maxValues int maxBytesPerValue int diff --git a/packetbeat/protos/memcache/parse_test.go b/packetbeat/protos/memcache/parse_test.go index 95fdac5bad3..e1ac77160f5 100644 --- a/packetbeat/protos/memcache/parse_test.go +++ b/packetbeat/protos/memcache/parse_test.go @@ -56,8 +56,10 @@ type binValueWriter interface { WriteNetUint64At(uint64, int) error } -type extraFn func(binValueWriter) int -type valueFn func(*streambuf.Buffer, int) int +type ( + extraFn func(binValueWriter) int + valueFn func(*streambuf.Buffer, int) int +) type offsetBinWriter struct { w binValueWriter diff --git a/packetbeat/protos/memcache/plugin_tcp.go b/packetbeat/protos/memcache/plugin_tcp.go index 830a0cd64a5..c16abb3c712 100644 --- a/packetbeat/protos/memcache/plugin_tcp.go +++ b/packetbeat/protos/memcache/plugin_tcp.go @@ -60,8 +60,6 @@ type messageList struct { tail *message } -const defaultTCPTransDuration uint = 200 - func ensureMemcacheConnection(private protos.ProtocolData) *tcpConnectionData { if private == nil { return &tcpConnectionData{} diff --git a/packetbeat/protos/memcache/text.go b/packetbeat/protos/memcache/text.go index 72b36442c9a..86baa8d0627 100644 --- a/packetbeat/protos/memcache/text.go +++ b/packetbeat/protos/memcache/text.go @@ -109,12 +109,14 @@ var argStat = argDef{ serialize: serializeStats, } -var argDelta = makeValueArg("delta") -var argSleepUs = makeValueArg("sleep_us") -var argValue = makeValueArg("value") -var argVerbosity = makeValueArg("verbosity") -var argSourceClass = makeIValueArg("source_class") -var argDestClass = makeIValue2Arg("dest_class") +var ( + argDelta = makeValueArg("delta") + argSleepUs = makeValueArg("sleep_us") + argValue = makeValueArg("value") + argVerbosity = makeValueArg("verbosity") + argSourceClass = makeIValueArg("source_class") + argDestClass = makeIValue2Arg("dest_class") +) var argNoReply = argDef{ parse: func(parser *parser, hdr, buf *streambuf.Buffer) error { @@ -297,8 +299,10 @@ func makeDefTextDataMessage( } } -var defTextDataRequest = makeDefTextDataMessage(true) -var defTextDataResponse = makeDefTextDataMessage(false) +var ( + defTextDataRequest = makeDefTextDataMessage(true) + defTextDataResponse = makeDefTextDataMessage(false) +) func loadCommand(name string, code commandCode) textCommandType { return defTextMessage(name, memcacheLoadMsg, code, argMultiKeys) @@ -403,13 +407,6 @@ func makeValueArg(name string) argDef { } } -func makeValue2Arg(name string) argDef { - return argDef{ - parse: textUint64Arg(setValue2), - serialize: serializeValue2(name), - } -} - func makeIValueArg(name string) argDef { return argDef{ parse: func(parser *parser, hdr, buf *streambuf.Buffer) error { @@ -592,7 +589,7 @@ func parseNoReplyArg(buf *streambuf.Buffer) (bool, error) { return false, textArgError(err) } - var noreplyArg = []byte("noreply") + noreplyArg := []byte("noreply") noreply := bytes.HasPrefix(buf.Bytes(), noreplyArg) if !noreply { return false, errExpectedNoReply diff --git a/packetbeat/protos/mongodb/config.go b/packetbeat/protos/mongodb/config.go index e7e2143b647..c90aeb67290 100644 --- a/packetbeat/protos/mongodb/config.go +++ b/packetbeat/protos/mongodb/config.go @@ -28,12 +28,10 @@ type mongodbConfig struct { MaxDocs int `config:"max_docs"` } -var ( - defaultConfig = mongodbConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - }, - MaxDocLength: 5000, - MaxDocs: 10, - } -) +var defaultConfig = mongodbConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + }, + MaxDocLength: 5000, + MaxDocs: 10, +} diff --git a/packetbeat/protos/mongodb/mongodb.go b/packetbeat/protos/mongodb/mongodb.go index b05ebce9150..0fcc5464b45 100644 --- a/packetbeat/protos/mongodb/mongodb.go +++ b/packetbeat/protos/mongodb/mongodb.go @@ -55,9 +55,7 @@ type transactionKey struct { id int } -var ( - unmatchedRequests = monitoring.NewInt(nil, "mongodb.unmatched_requests") -) +var unmatchedRequests = monitoring.NewInt(nil, "mongodb.unmatched_requests") func init() { protos.Register("mongodb", New) @@ -218,7 +216,6 @@ func (mongodb *mongodbPlugin) handleMongodb( tcptuple *common.TCPTuple, dir uint8, ) { - m.tcpTuple = *tcptuple m.direction = dir m.cmdlineTuple = mongodb.watcher.FindProcessesTupleTCP(tcptuple.IPPort()) @@ -345,11 +342,12 @@ func reconstructQuery(t *transaction, full bool) (query string) { if !full { // remove the actual data. // TODO: review if we need to add other commands here - if t.method == "insert" { + switch t.method { + case "insert": params, err = doc2str(copyMapWithoutKey(t.params, "documents")) - } else if t.method == "update" { + case "update": params, err = doc2str(copyMapWithoutKey(t.params, "updates")) - } else if t.method == "findandmodify" { + case "findandmodify": params, err = doc2str(copyMapWithoutKey(t.params, "update")) } } else { diff --git a/packetbeat/protos/mongodb/mongodb_parser.go b/packetbeat/protos/mongodb/mongodb_parser.go index a5ff5fa0625..1abc6f890f2 100644 --- a/packetbeat/protos/mongodb/mongodb_parser.go +++ b/packetbeat/protos/mongodb/mongodb_parser.go @@ -116,10 +116,26 @@ func mongodbMessageParser(s *stream) (bool, bool) { // see http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-reply func opReplyParse(d *decoder, m *mongodbMessage) (bool, bool) { _, err := d.readInt32() // ignore flags for now + if err != nil { + logp.Err("An error occurred while parsing OP_REPLY message: %s", err) + return false, false + } m.event["cursorId"], err = d.readInt64() + if err != nil { + logp.Err("An error occurred while parsing OP_REPLY message: %s", err) + return false, false + } m.event["startingFrom"], err = d.readInt32() + if err != nil { + logp.Err("An error occurred while parsing OP_REPLY message: %s", err) + return false, false + } numberReturned, err := d.readInt32() + if err != nil { + logp.Err("An error occurred while parsing OP_REPLY message: %s", err) + return false, false + } m.event["numberReturned"] = numberReturned debugf("Prepare to read %d document from reply", m.event["numberReturned"]) @@ -128,15 +144,27 @@ func opReplyParse(d *decoder, m *mongodbMessage) (bool, bool) { for i := 0; i < numberReturned; i++ { var document bson.M document, err = d.readDocument() + if err != nil { + logp.Err("An error occurred while parsing OP_REPLY message: %s", err) + return false, false + } // Check if the result is actually an error if i == 0 { if mongoError, present := document["$err"]; present { m.error, err = doc2str(mongoError) + if err != nil { + logp.Err("An error occurred while parsing OP_REPLY message: %s", err) + return false, false + } } if writeErrors, present := document["writeErrors"]; present { m.error, err = doc2str(writeErrors) + if err != nil { + logp.Err("An error occurred while parsing OP_REPLY message: %s", err) + return false, false + } } } @@ -144,10 +172,6 @@ func opReplyParse(d *decoder, m *mongodbMessage) (bool, bool) { } m.documents = documents - if err != nil { - logp.Err("An error occurred while parsing OP_REPLY message: %s", err) - return false, false - } return true, true } @@ -163,12 +187,26 @@ func opMsgLegacyParse(d *decoder, m *mongodbMessage) (bool, bool) { func opUpdateParse(d *decoder, m *mongodbMessage) (bool, bool) { _, err := d.readInt32() // always ZERO, a slot reserved in the protocol for future use + if err != nil { + logp.Err("An error occurred while parsing OP_UPDATE message: %s", err) + return false, false + } m.event["fullCollectionName"], err = d.readCStr() + if err != nil { + logp.Err("An error occurred while parsing OP_UPDATE message: %s", err) + return false, false + } _, err = d.readInt32() // ignore flags for now - + if err != nil { + logp.Err("An error occurred while parsing OP_UPDATE message: %s", err) + return false, false + } m.event["selector"], err = d.readDocumentStr() + if err != nil { + logp.Err("An error occurred while parsing OP_UPDATE message: %s", err) + return false, false + } m.event["update"], err = d.readDocumentStr() - if err != nil { logp.Err("An error occurred while parsing OP_UPDATE message: %s", err) return false, false @@ -179,6 +217,10 @@ func opUpdateParse(d *decoder, m *mongodbMessage) (bool, bool) { func opInsertParse(d *decoder, m *mongodbMessage) (bool, bool) { _, err := d.readInt32() // ignore flags for now + if err != nil { + logp.Err("An error occurred while parsing OP_INSERT message: %s", err) + return false, false + } m.event["fullCollectionName"], err = d.readCStr() // TODO parse bson documents @@ -230,11 +272,27 @@ func isDatabaseCommand(key string, val interface{}) bool { func opQueryParse(d *decoder, m *mongodbMessage) (bool, bool) { _, err := d.readInt32() // ignore flags for now + if err != nil { + logp.Err("An error occurred while parsing OP_QUERY message: %s", err) + return false, false + } fullCollectionName, err := d.readCStr() + if err != nil { + logp.Err("An error occurred while parsing OP_QUERY message: %s", err) + return false, false + } m.event["fullCollectionName"] = fullCollectionName m.event["numberToSkip"], err = d.readInt32() + if err != nil { + logp.Err("An error occurred while parsing OP_QUERY message: %s", err) + return false, false + } m.event["numberToReturn"], err = d.readInt32() + if err != nil { + logp.Err("An error occurred while parsing OP_QUERY message: %s", err) + return false, false + } query, err := d.readDocument() if d.i < len(d.in) { @@ -275,10 +333,21 @@ func opQueryParse(d *decoder, m *mongodbMessage) (bool, bool) { func opGetMoreParse(d *decoder, m *mongodbMessage) (bool, bool) { _, err := d.readInt32() // always ZERO, a slot reserved in the protocol for future use + if err != nil { + logp.Err("An error occurred while parsing OP_GET_MORE message: %s", err) + return false, false + } m.event["fullCollectionName"], err = d.readCStr() + if err != nil { + logp.Err("An error occurred while parsing OP_GET_MORE message: %s", err) + return false, false + } m.event["numberToReturn"], err = d.readInt32() + if err != nil { + logp.Err("An error occurred while parsing OP_GET_MORE message: %s", err) + return false, false + } m.event["cursorId"], err = d.readInt64() - if err != nil { logp.Err("An error occurred while parsing OP_GET_MORE message: %s", err) return false, false @@ -288,11 +357,21 @@ func opGetMoreParse(d *decoder, m *mongodbMessage) (bool, bool) { func opDeleteParse(d *decoder, m *mongodbMessage) (bool, bool) { _, err := d.readInt32() // always ZERO, a slot reserved in the protocol for future use + if err != nil { + logp.Err("An error occurred while parsing OP_DELETE message: %s", err) + return false, false + } m.event["fullCollectionName"], err = d.readCStr() + if err != nil { + logp.Err("An error occurred while parsing OP_DELETE message: %s", err) + return false, false + } _, err = d.readInt32() // ignore flags for now - + if err != nil { + logp.Err("An error occurred while parsing OP_DELETE message: %s", err) + return false, false + } m.event["selector"], err = d.readDocumentStr() - if err != nil { logp.Err("An error occurred while parsing OP_DELETE message: %s", err) return false, false @@ -405,7 +484,6 @@ func (d *decoder) readByte() (byte, error) { func (d *decoder) readInt32() (int, error) { b, err := d.readBytes(4) - if err != nil { return 0, err } @@ -418,7 +496,6 @@ func (d *decoder) readInt32() (int, error) { func (d *decoder) readInt64() (int, error) { b, err := d.readBytes(8) - if err != nil { return 0, err } @@ -436,6 +513,9 @@ func (d *decoder) readInt64() (int, error) { func (d *decoder) readDocument() (bson.M, error) { start := d.i documentLength, err := d.readInt32() + if err != nil { + return nil, err + } d.i = start + documentLength if len(d.in) < d.i { return nil, errors.New("document out of bounds") @@ -461,6 +541,9 @@ func doc2str(documentMap interface{}) (string, error) { func (d *decoder) readDocumentStr() (string, error) { documentMap, err := d.readDocument() + if err != nil { + return "", err + } document, err := doc2str(documentMap) return document, err } diff --git a/packetbeat/protos/mongodb/mongodb_test.go b/packetbeat/protos/mongodb/mongodb_test.go index ece0e1cf4aa..a1415dfa0a2 100644 --- a/packetbeat/protos/mongodb/mongodb_test.go +++ b/packetbeat/protos/mongodb/mongodb_test.go @@ -170,6 +170,7 @@ func TestSimpleFindLimit1_split(t *testing.T) { "1b000000013000e6762ff7c97652c001" + "3100d5b14ae9996c4440000273747265" + "657400100000004d6f72726973205061") + assert.NoError(t, err) respData2, err := hex.DecodeString( "726b2041766500027a6970636f646500" + @@ -183,6 +184,7 @@ func TestSimpleFindLimit1_split(t *testing.T) { "0000000964617465000044510a410100" + "00026772616465000200000041001073" + "636f72650006000000000332002b0000") + assert.NoError(t, err) respData3, err := hex.DecodeString( "00096461746500009cda693c01000002" + diff --git a/packetbeat/protos/mysql/config.go b/packetbeat/protos/mysql/config.go index d53429c3a2c..0c634b98291 100644 --- a/packetbeat/protos/mysql/config.go +++ b/packetbeat/protos/mysql/config.go @@ -31,13 +31,11 @@ type mysqlConfig struct { StatementTimeout time.Duration `config:"statement_timeout"` } -var ( - defaultConfig = mysqlConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - }, - MaxRowLength: 1024, - MaxRows: 10, - StatementTimeout: 3600 * time.Second, - } -) +var defaultConfig = mysqlConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + }, + MaxRowLength: 1024, + MaxRows: 10, + StatementTimeout: 3600 * time.Second, +} diff --git a/packetbeat/protos/mysql/mysql.go b/packetbeat/protos/mysql/mysql.go index 1553bdf9901..49ca17ece85 100644 --- a/packetbeat/protos/mysql/mysql.go +++ b/packetbeat/protos/mysql/mysql.go @@ -62,8 +62,6 @@ type mysqlMessage struct { numberOfRows int numberOfFields int size uint64 - fields []string - rows [][]string tables string isOK bool affectedRows uint64 @@ -83,7 +81,6 @@ type mysqlMessage struct { statementID int numberOfParams int - params []string } type mysqlTransaction struct { @@ -337,7 +334,7 @@ func mysqlMessageParser(s *mysqlStream) (bool, bool) { return true, false } - s.parseOffset += 4 //header + s.parseOffset += 4 // header s.parseOffset += int(m.packetLength) m.end = s.parseOffset if m.isRequest { @@ -347,7 +344,6 @@ func mysqlMessageParser(s *mysqlStream) (bool, bool) { } else { m.query = string(s.data[m.start+5 : m.end]) } - } else if m.isOK { // affected rows affectedRows, off, complete, err := readLinteger(s.data, m.start+5) @@ -475,7 +471,7 @@ func mysqlMessageParser(s *mysqlStream) (bool, bool) { return true, false } - s.parseOffset += 4 //header + s.parseOffset += 4 // header if s.data[s.parseOffset] == 0xfe { logp.Debug("mysqldetailed", "Received EOF packet") @@ -553,8 +549,8 @@ func (mysql *mysqlPlugin) ConnectionTimeout() time.Duration { } func (mysql *mysqlPlugin) Parse(pkt *protos.Packet, tcptuple *common.TCPTuple, - dir uint8, private protos.ProtocolData) protos.ProtocolData { - + dir uint8, private protos.ProtocolData, +) protos.ProtocolData { defer logp.Recover("ParseMysql exception") priv := mysqlPrivateData{} @@ -613,8 +609,8 @@ func (mysql *mysqlPlugin) Parse(pkt *protos.Packet, tcptuple *common.TCPTuple, } func (mysql *mysqlPlugin) GapInStream(tcptuple *common.TCPTuple, dir uint8, - nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool) { - + nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool, +) { defer logp.Recover("GapInStream(mysql) exception") if private == nil { @@ -642,16 +638,16 @@ func (mysql *mysqlPlugin) GapInStream(tcptuple *common.TCPTuple, dir uint8, } func (mysql *mysqlPlugin) ReceivedFin(tcptuple *common.TCPTuple, dir uint8, - private protos.ProtocolData) protos.ProtocolData { - + private protos.ProtocolData, +) protos.ProtocolData { // TODO: check if we have data pending and either drop it to free // memory or send it up the stack. return private } func handleMysql(mysql *mysqlPlugin, m *mysqlMessage, tcptuple *common.TCPTuple, - dir uint8, rawMsg []byte) { - + dir uint8, rawMsg []byte, +) { m.tcpTuple = *tcptuple m.direction = dir m.cmdlineTuple = mysql.watcher.FindProcessesTupleTCP(tcptuple.IPPort()) @@ -689,9 +685,10 @@ func (mysql *mysqlPlugin) receivedMysqlRequest(msg *mysqlMessage) { trans.statementID = msg.statementID stmts := mysql.getStmtsMap(msg.tcpTuple.Hashable()) if stmts == nil { - if msg.typ == mysqlCmdStmtExecute { + switch msg.typ { + case mysqlCmdStmtExecute: trans.query = "Request Execute Statement" - } else if msg.typ == mysqlCmdStmtClose { + case mysqlCmdStmtClose: trans.query = "Request Close Statement" } trans.notes = append(trans.notes, "The actual query being used is unknown") @@ -699,7 +696,8 @@ func (mysql *mysqlPlugin) receivedMysqlRequest(msg *mysqlMessage) { trans.bytesIn = msg.size return } - if msg.typ == mysqlCmdStmtExecute { + switch msg.typ { + case mysqlCmdStmtExecute: if value, ok := stmts[trans.statementID]; ok { trans.query = value.query // parse parameters @@ -711,7 +709,7 @@ func (mysql *mysqlPlugin) receivedMysqlRequest(msg *mysqlMessage) { trans.bytesIn = msg.size return } - } else if msg.typ == mysqlCmdStmtClose { + case mysqlCmdStmtClose: delete(stmts, trans.statementID) trans.query = "CmdStmtClose" mysql.transactions.Delete(tuple.Hashable()) @@ -899,7 +897,7 @@ func (mysql *mysqlPlugin) parseMysqlExecuteStatement(data []byte, stmtdata *mysq valueString := strconv.Itoa(int(binary.LittleEndian.Uint32(data[paramOffset:]))) paramString = append(paramString, valueString) paramOffset += 4 - //FIELD_TYPE_FLOAT + // FIELD_TYPE_FLOAT case 0x04: paramString = append(paramString, "TYPE_FLOAT") paramOffset += 4 @@ -1012,19 +1010,19 @@ func (mysql *mysqlPlugin) parseMysqlResponse(data []byte) ([]string, [][]string) return []string{}, [][]string{} } - fields := []string{} - rows := [][]string{} - if len(data) < 5 { - logp.Warn("Invalid response: data less than 4 bytes") + logp.Warn("Invalid response: data less than 5 bytes") return []string{}, [][]string{} } - if data[4] == 0x00 { + fields := []string{} + rows := [][]string{} + switch data[4] { + case 0x00: // OK response - } else if data[4] == 0xff { + case 0xff: // Error response - } else { + default: offset := 5 logp.Debug("mysql", "Data len: %d", len(data)) @@ -1100,7 +1098,7 @@ func (mysql *mysqlPlugin) parseMysqlResponse(data []byte) ([]string, [][]string) if data[offset+4] == 0xfe { // EOF - offset += length + 4 + offset += length + 4 // ineffassign break } diff --git a/packetbeat/protos/mysql/mysql_test.go b/packetbeat/protos/mysql/mysql_test.go index 309fd45cb0f..dd942399073 100644 --- a/packetbeat/protos/mysql/mysql_test.go +++ b/packetbeat/protos/mysql/mysql_test.go @@ -49,10 +49,6 @@ func (e *eventStore) publish(event beat.Event) { e.events = append(e.events, event) } -func (e *eventStore) empty() bool { - return len(e.events) == 0 -} - func mysqlModForTests(store *eventStore) *mysqlPlugin { callback := func(beat.Event) {} if store != nil { @@ -110,6 +106,7 @@ func TestMySQLParser_simpleRequest(t *testing.T) { t.Errorf("Wrong message size %d", stream.message.size) } } + func TestMySQLParser_OKResponse(t *testing.T) { data := []byte( "0700000100010401000000") @@ -363,11 +360,11 @@ func TestParseMySQL_simpleUpdateResponse(t *testing.T) { var tuple common.TCPTuple var private mysqlPrivateData - var countHandleMysql = 0 + countHandleMysql := 0 mysql.handleMysql = func(mysql *mysqlPlugin, m *mysqlMessage, tcp *common.TCPTuple, - dir uint8, raw_msg []byte) { - + dir uint8, raw_msg []byte, + ) { countHandleMysql++ } @@ -404,11 +401,11 @@ func TestParseMySQL_threeResponses(t *testing.T) { var tuple common.TCPTuple var private mysqlPrivateData - var countHandleMysql = 0 + countHandleMysql := 0 mysql.handleMysql = func(mysql *mysqlPlugin, m *mysqlMessage, tcptuple *common.TCPTuple, - dir uint8, raw_msg []byte) { - + dir uint8, raw_msg []byte, + ) { countHandleMysql++ } @@ -431,7 +428,6 @@ func TestParseMySQL_splitResponse(t *testing.T) { "3b00000303646566086d696e697477697404706f737404706f73740d706f73745f757365726e616d6508757365726e616d650c2100f0000000fd0000000000" + "3500000403646566086d696e697477697404706f737404706f73740a706f73745f7469746c65057469746c650c2100f0000000fd0000000000" + "3300000503646566086d696e697477697404706f737404706f737409706f73745f626f647904626f64790c2100fdff0200fc1000000000") - if err != nil { t.Errorf("Failed to decode string") } @@ -446,11 +442,11 @@ func TestParseMySQL_splitResponse(t *testing.T) { var tuple common.TCPTuple var private mysqlPrivateData - var countHandleMysql = 0 + countHandleMysql := 0 mysql.handleMysql = func(mysql *mysqlPlugin, m *mysqlMessage, tcptuple *common.TCPTuple, - dir uint8, raw_msg []byte) { - + dir uint8, raw_msg []byte, + ) { countHandleMysql++ } @@ -623,12 +619,18 @@ func Test_parseMysqlResponse_invalid(t *testing.T) { {0x05, 0x00, 0x00, 0x01, 0x01, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00}, {0x05, 0x00, 0x00, 0x01, 0x01, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00}, {0x05, 0x00, 0x00, 0x01, 0x01, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00}, - {0x05, 0x00, 0x00, 0x01, 0x01, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, - 0x01, 0x00}, - {0x15, 0x00, 0x00, 0x01, 0x01, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, - 0x01, 0x00, 0x01}, - {0x15, 0x00, 0x00, 0x01, 0x01, 0x05, 0x15, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, - 0x01, 0x00, 0x01, 0x00}, + { + 0x05, 0x00, 0x00, 0x01, 0x01, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, + }, + { + 0x15, 0x00, 0x00, 0x01, 0x01, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, + }, + { + 0x15, 0x00, 0x00, 0x01, 0x01, 0x05, 0x15, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x01, 0x00, + }, } for _, input := range tests { @@ -638,12 +640,14 @@ func Test_parseMysqlResponse_invalid(t *testing.T) { } tests = [][]byte{ - {0x15, 0x00, 0x00, 0x01, 0x01, - 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xfe, 0x00, 0x01, //field + { + 0x15, 0x00, 0x00, 0x01, 0x01, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xfe, 0x00, 0x01, // field 0x01, 0x00, 0x00, 0x00, 0xfe, // EOF }, - {0x15, 0x00, 0x00, 0x01, 0x01, - 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xfe, 0x00, 0x01, //field + { + 0x15, 0x00, 0x00, 0x01, 0x01, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xfe, 0x00, 0x01, // field 0x01, 0x00, 0x00, 0x00, 0xfe, // EOF 0x00, 0x00, }, @@ -668,7 +672,7 @@ func Test_PreparedStatement(t *testing.T) { packet := protos.Packet{Payload: rawData} var private protos.ProtocolData - private = mysql.Parse(&packet, tcpTuple, dir, private) + mysql.Parse(&packet, tcpTuple, dir, private) } send(tcp.TCPDirectionOriginal, "c00000001673656c6563742064697374696e637420636f756e742864697374696e63742070757263686173656465305f2e69642920617320636f6c5f305f305f2066726f6d2070757263686173655f64656d616e642070757263686173656465305f2077686572652070757263686173656465305f2e636861696e5f6d61737465723d3f20616e642070757263686173656465305f2e6372656174655f74696d653e3d3f20616e642070757263686173656465305f2e6372656174655f74696d653c3d3f") diff --git a/packetbeat/protos/nfs/config.go b/packetbeat/protos/nfs/config.go index 639bdad525d..e23672024c8 100644 --- a/packetbeat/protos/nfs/config.go +++ b/packetbeat/protos/nfs/config.go @@ -27,10 +27,8 @@ type rpcConfig struct { config.ProtocolCommon `config:",inline"` } -var ( - defaultConfig = rpcConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: 1 * time.Minute, - }, - } -) +var defaultConfig = rpcConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: 1 * time.Minute, + }, +} diff --git a/packetbeat/protos/nfs/request_handler.go b/packetbeat/protos/nfs/request_handler.go index fea417f4dc1..1225f9f6012 100644 --- a/packetbeat/protos/nfs/request_handler.go +++ b/packetbeat/protos/nfs/request_handler.go @@ -41,9 +41,7 @@ var acceptStatus = [...]string{ "system_err", } -var ( - unmatchedRequests = monitoring.NewInt(nil, "nfs.unmatched_requests") -) +var unmatchedRequests = monitoring.NewInt(nil, "nfs.unmatched_requests") // called by Cache, when re reply seen within expected time window func (r *rpc) handleExpiredPacket(nfs *nfs) { diff --git a/packetbeat/protos/nfs/rpc.go b/packetbeat/protos/nfs/rpc.go index 9cde7ab5aac..64fffe47606 100644 --- a/packetbeat/protos/nfs/rpc.go +++ b/packetbeat/protos/nfs/rpc.go @@ -126,7 +126,6 @@ func (r *rpc) Parse( dir uint8, private protos.ProtocolData, ) protos.ProtocolData { - defer logp.Recover("ParseRPC exception") conn := ensureRPCConnection(private) @@ -140,8 +139,8 @@ func (r *rpc) Parse( // Called when the FIN flag is seen in the TCP stream. func (r *rpc) ReceivedFin(tcptuple *common.TCPTuple, dir uint8, - private protos.ProtocolData) protos.ProtocolData { - + private protos.ProtocolData, +) protos.ProtocolData { defer logp.Recover("ReceivedFinRpc exception") // forced by TCP interface @@ -151,8 +150,8 @@ func (r *rpc) ReceivedFin(tcptuple *common.TCPTuple, dir uint8, // Called when a packets are missing from the tcp // stream. func (r *rpc) GapInStream(tcptuple *common.TCPTuple, dir uint8, - nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool) { - + nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool, +) { defer logp.Recover("GapInRpcStream exception") // forced by TCP interface @@ -199,7 +198,6 @@ func (r *rpc) handleRPCFragment( tcptuple *common.TCPTuple, dir uint8, ) *rpcConnectionData { - st := conn.streams[dir] if st == nil { st = newStream(pkt, tcptuple) diff --git a/packetbeat/protos/nfs/xdr.go b/packetbeat/protos/nfs/xdr.go index de63fc755a2..168fb274cfd 100644 --- a/packetbeat/protos/nfs/xdr.go +++ b/packetbeat/protos/nfs/xdr.go @@ -40,24 +40,12 @@ func (r *xdr) size() int { return len(r.data) } -func (r *xdr) getInt() int32 { - i := int32(binary.BigEndian.Uint32(r.data[r.offset : r.offset+4])) - r.offset += 4 - return int32(i) -} - func (r *xdr) getUInt() uint32 { i := uint32(binary.BigEndian.Uint32(r.data[r.offset : r.offset+4])) r.offset += 4 return i } -func (r *xdr) getHyper() int64 { - i := int64(binary.BigEndian.Uint64(r.data[r.offset : r.offset+8])) - r.offset += 8 - return i -} - func (r *xdr) getUHyper() uint64 { i := uint64(binary.BigEndian.Uint64(r.data[r.offset : r.offset+8])) r.offset += 8 diff --git a/packetbeat/protos/pgsql/config.go b/packetbeat/protos/pgsql/config.go index 54a9a1b9e2e..13c11531409 100644 --- a/packetbeat/protos/pgsql/config.go +++ b/packetbeat/protos/pgsql/config.go @@ -28,12 +28,10 @@ type pgsqlConfig struct { MaxRows int `config:"max_rows"` } -var ( - defaultConfig = pgsqlConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - }, - MaxRowLength: 1024, - MaxRows: 10, - } -) +var defaultConfig = pgsqlConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + }, + MaxRowLength: 1024, + MaxRows: 10, +} diff --git a/packetbeat/protos/pgsql/parse.go b/packetbeat/protos/pgsql/parse.go index a7bcdb44770..9a302f99a18 100644 --- a/packetbeat/protos/pgsql/parse.go +++ b/packetbeat/protos/pgsql/parse.go @@ -158,7 +158,7 @@ func (pgsql *pgsqlPlugin) parseSimpleQuery(s *pgsqlStream, length int) (bool, bo m.start = s.parseOffset m.isRequest = true - s.parseOffset++ //type + s.parseOffset++ // type s.parseOffset += length m.end = s.parseOffset m.size = uint64(m.end - m.start) @@ -190,8 +190,8 @@ func (pgsql *pgsqlPlugin) parseRowDescription(s *pgsqlStream, length int) (bool, } pgsql.detailf("Fields: %s", m.fields) - s.parseOffset++ //type - s.parseOffset += length //length + s.parseOffset++ // type + s.parseOffset += length // length s.parseState = pgsqlGetDataState return pgsql.parseMessageData(s) } @@ -238,7 +238,7 @@ func (pgsql *pgsqlPlugin) parseCommandComplete(s *pgsqlStream, length int) (bool m.isOK = true m.toExport = true - s.parseOffset++ //type + s.parseOffset++ // type name, err := pgsqlString(s.data[s.parseOffset+4:], length-4) if err != nil { return false, false @@ -276,10 +276,10 @@ func (pgsql *pgsqlPlugin) parseErrorResponse(s *pgsqlStream, length int) (bool, m.isError = true m.toExport = true - s.parseOffset++ //type + s.parseOffset++ // type pgsql.parseError(s, s.data[s.parseOffset+4:s.parseOffset+length]) - s.parseOffset += length //length + s.parseOffset += length // length m.end = s.parseOffset m.size = uint64(m.end - m.start) @@ -294,7 +294,7 @@ func (pgsql *pgsqlPlugin) parseExtReq(s *pgsqlStream, length int) (bool, bool) { m.start = s.parseOffset m.isRequest = true - s.parseOffset++ //type + s.parseOffset++ // type s.parseOffset += length m.end = s.parseOffset m.size = uint64(m.end - m.start) @@ -326,7 +326,7 @@ func (pgsql *pgsqlPlugin) parseExtResp(s *pgsqlStream, length int) (bool, bool) m.isOK = true m.toExport = true - s.parseOffset++ //type + s.parseOffset++ // type s.parseOffset += length pgsql.detailf("Parse completion in an extended query response") s.parseState = pgsqlGetDataState @@ -336,7 +336,7 @@ func (pgsql *pgsqlPlugin) parseExtResp(s *pgsqlStream, length int) (bool, bool) func (pgsql *pgsqlPlugin) parseSkipMessage(s *pgsqlStream, length int) (bool, bool) { // TODO: add info from NoticeResponse in case there are warning messages for a query // ignore command - s.parseOffset++ //type + s.parseOffset++ // type s.parseOffset += length m := s.message @@ -615,21 +615,21 @@ func (pgsql *pgsqlPlugin) parseMessageExtendedQuery(s *pgsqlStream) (bool, bool) // skip type s.parseOffset++ s.parseOffset += length - //TODO: pgsql.parseBind(s) + // TODO: pgsql.parseBind(s) case 'D': // Bind -> Describe // skip type s.parseOffset++ s.parseOffset += length - //TODO: pgsql.parseDescribe(s) + // TODO: pgsql.parseDescribe(s) case 'E': // Bind(or Describe) -> Execute // skip type s.parseOffset++ s.parseOffset += length - //TODO: pgsql.parseExecute(s) + // TODO: pgsql.parseExecute(s) case 'S': // Execute -> Sync diff --git a/packetbeat/protos/pgsql/pgsql.go b/packetbeat/protos/pgsql/pgsql.go index 5ad6f6e305a..20ad2fc5461 100644 --- a/packetbeat/protos/pgsql/pgsql.go +++ b/packetbeat/protos/pgsql/pgsql.go @@ -126,13 +126,9 @@ const ( cancelRequest ) -var ( - errInvalidLength = errors.New("invalid length") -) +var errInvalidLength = errors.New("invalid length") -var ( - unmatchedResponses = monitoring.NewInt(nil, "pgsql.unmatched_responses") -) +var unmatchedResponses = monitoring.NewInt(nil, "pgsql.unmatched_responses") func init() { protos.Register("pgsql", New) @@ -240,8 +236,8 @@ func (pgsql *pgsqlPlugin) ConnectionTimeout() time.Duration { } func (pgsql *pgsqlPlugin) Parse(pkt *protos.Packet, tcptuple *common.TCPTuple, - dir uint8, private protos.ProtocolData) protos.ProtocolData { - + dir uint8, private protos.ProtocolData, +) protos.ProtocolData { defer logp.Recover("ParsePgsql exception") priv := pgsqlPrivateData{} @@ -334,8 +330,8 @@ func messageHasEnoughData(msg *pgsqlMessage) bool { // Called when there's a drop packet func (pgsql *pgsqlPlugin) GapInStream(tcptuple *common.TCPTuple, dir uint8, - nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool) { - + nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool, +) { defer logp.Recover("GapInPgsqlStream exception") if private == nil { @@ -378,8 +374,8 @@ func (pgsql *pgsqlPlugin) ReceivedFin(tcptuple *common.TCPTuple, dir uint8, } var handlePgsql = func(pgsql *pgsqlPlugin, m *pgsqlMessage, tcptuple *common.TCPTuple, - dir uint8, raw_msg []byte) { - + dir uint8, raw_msg []byte, +) { m.tcpTuple = *tcptuple m.direction = dir m.cmdlineTuple = pgsql.watcher.FindProcessesTupleTCP(tcptuple.IPPort()) @@ -433,7 +429,7 @@ func (pgsql *pgsqlPlugin) receivedPgsqlRequest(msg *pgsqlMessage) { func (pgsql *pgsqlPlugin) receivedPgsqlResponse(msg *pgsqlMessage) { tuple := msg.tcpTuple transList := pgsql.getTransaction(tuple.Hashable()) - if transList == nil || len(transList) == 0 { + if len(transList) == 0 { pgsql.debugf("Response from unknown transaction. Ignoring.") unmatchedResponses.Add(1) return @@ -511,8 +507,8 @@ func (pgsql *pgsqlPlugin) publishTransaction(t *pgsqlTransaction) { } func (pgsql *pgsqlPlugin) removeTransaction(transList []*pgsqlTransaction, - tuple common.TCPTuple, index int) *pgsqlTransaction { - + tuple common.TCPTuple, index int, +) *pgsqlTransaction { trans := transList[index] transList = append(transList[:index], transList[index+1:]...) if len(transList) == 0 { diff --git a/packetbeat/protos/pgsql/pgsql_test.go b/packetbeat/protos/pgsql/pgsql_test.go index 328b31e28c2..82075eaacae 100644 --- a/packetbeat/protos/pgsql/pgsql_test.go +++ b/packetbeat/protos/pgsql/pgsql_test.go @@ -46,10 +46,6 @@ func (e *eventStore) publish(event beat.Event) { e.events = append(e.events, event) } -func (e *eventStore) empty() bool { - return len(e.events) == 0 -} - func pgsqlModForTests(store *eventStore) *pgsqlPlugin { callback := func(beat.Event) {} if store != nil { @@ -234,11 +230,11 @@ func TestPgsqlParser_threeResponses(t *testing.T) { } var tuple common.TCPTuple var private pgsqlPrivateData - var countHandlePgsql = 0 + countHandlePgsql := 0 pgsql.handlePgsql = func(pgsql *pgsqlPlugin, m *pgsqlMessage, tcptuple *common.TCPTuple, - dir uint8, raw_msg []byte) { - + dir uint8, raw_msg []byte, + ) { countHandlePgsql++ } diff --git a/packetbeat/protos/protos.go b/packetbeat/protos/protos.go index e0343a0ee87..39dc09d8b7d 100644 --- a/packetbeat/protos/protos.go +++ b/packetbeat/protos/protos.go @@ -79,7 +79,6 @@ type Protocols interface { BpfFilter(withVlans bool, withICMP bool) string GetTCP(proto Protocol) TCPPlugin GetUDP(proto Protocol) UDPPlugin - GetAllTCP() map[Protocol]TCPPlugin GetAllUDP() map[Protocol]UDPPlugin diff --git a/packetbeat/protos/protos_test.go b/packetbeat/protos/protos_test.go index 22269a192d2..b3c1a912069 100644 --- a/packetbeat/protos/protos_test.go +++ b/packetbeat/protos/protos_test.go @@ -70,9 +70,7 @@ func (proto *UDPProtocol) GetPorts() []int { return proto.Ports } -func (proto *UDPProtocol) ParseUDP(pkt *Packet) { - return -} +func (proto *UDPProtocol) ParseUDP(pkt *Packet) {} type TCPUDPProtocol TestProtocol @@ -99,9 +97,7 @@ func (proto *TCPUDPProtocol) GapInStream(tcptuple *common.TCPTuple, dir uint8, return private, true } -func (proto *TCPUDPProtocol) ParseUDP(pkt *Packet) { - return -} +func (proto *TCPUDPProtocol) ParseUDP(pkt *Packet) {} func (proto *TCPUDPProtocol) ConnectionTimeout() time.Duration { return 0 } diff --git a/packetbeat/protos/redis/config.go b/packetbeat/protos/redis/config.go index beb1caed2e2..a1fd48f4149 100644 --- a/packetbeat/protos/redis/config.go +++ b/packetbeat/protos/redis/config.go @@ -27,14 +27,12 @@ type redisConfig struct { QueueLimits MessageQueueConfig `config:",inline"` } -var ( - defaultConfig = redisConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - }, - QueueLimits: MessageQueueConfig{ - MaxBytes: 1024 * 1024, - MaxMessages: 20000, - }, - } -) +var defaultConfig = redisConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + }, + QueueLimits: MessageQueueConfig{ + MaxBytes: 1024 * 1024, + MaxMessages: 20000, + }, +} diff --git a/packetbeat/protos/redis/redis.go b/packetbeat/protos/redis/redis.go index 23dd1ad8696..a219e8a14f9 100644 --- a/packetbeat/protos/redis/redis.go +++ b/packetbeat/protos/redis/redis.go @@ -140,6 +140,7 @@ func (redis *redisPlugin) Parse( } return conn } + func (redis *redisPlugin) newConnectionData() *redisConnectionData { return &redisConnectionData{ requests: NewMessageQueue(redis.queueConfig), @@ -171,7 +172,6 @@ func (redis *redisPlugin) doParse( tcptuple *common.TCPTuple, dir uint8, ) *redisConnectionData { - st := conn.streams[dir] if st == nil { st = newStream(pkt.Ts, tcptuple) @@ -339,8 +339,8 @@ func (redis *redisPlugin) newTransaction(requ, resp *redisMessage) beat.Event { } func (redis *redisPlugin) GapInStream(tcptuple *common.TCPTuple, dir uint8, - nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool) { - + nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool, +) { // tsg: being packet loss tolerant is probably not very useful for Redis, // because most requests/response tend to fit in a single packet. @@ -348,8 +348,8 @@ func (redis *redisPlugin) GapInStream(tcptuple *common.TCPTuple, dir uint8, } func (redis *redisPlugin) ReceivedFin(tcptuple *common.TCPTuple, dir uint8, - private protos.ProtocolData) protos.ProtocolData { - + private protos.ProtocolData, +) protos.ProtocolData { // TODO: check if we have pending data that we can send up the stack return private diff --git a/packetbeat/protos/sip/config.go b/packetbeat/protos/sip/config.go index 58a92606e80..309558a225f 100644 --- a/packetbeat/protos/sip/config.go +++ b/packetbeat/protos/sip/config.go @@ -29,13 +29,11 @@ type config struct { KeepOriginal bool `config:"keep_original"` } -var ( - defaultConfig = config{ - ProtocolCommon: cfg.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - }, - ParseAuthorization: true, - ParseBody: true, - KeepOriginal: true, - } -) +var defaultConfig = config{ + ProtocolCommon: cfg.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + }, + ParseAuthorization: true, + ParseBody: true, + KeepOriginal: true, +} diff --git a/packetbeat/protos/sip/parser.go b/packetbeat/protos/sip/parser.go index 8d49ad61742..db63f05b429 100644 --- a/packetbeat/protos/sip/parser.go +++ b/packetbeat/protos/sip/parser.go @@ -269,8 +269,7 @@ func parseVersion(s []byte) (uint8, uint8, error) { func (parser *parser) parseHeaders(pi *parsingInfo, m *message) error { // check if it isn't headers end yet with /r/n/r/n - if !(len(pi.data)-pi.parseOffset >= 2 && - bytes.Equal(pi.data[pi.parseOffset:pi.parseOffset+2], constCRLF)) { + if len(pi.data)-pi.parseOffset < 2 || !bytes.Equal(pi.data[pi.parseOffset:pi.parseOffset+2], constCRLF) { offset, err := parser.parseHeader(m, pi.data[pi.parseOffset:]) if err != nil { return err diff --git a/packetbeat/protos/tcp/tcp.go b/packetbeat/protos/tcp/tcp.go index e9db7b94897..51ac46346a0 100644 --- a/packetbeat/protos/tcp/tcp.go +++ b/packetbeat/protos/tcp/tcp.go @@ -61,9 +61,7 @@ type Processor interface { Process(flow *flows.FlowID, hdr *layers.TCP, pkt *protos.Packet) } -var ( - droppedBecauseOfGaps = monitoring.NewInt(nil, "tcp.dropped_because_of_gaps") -) +var droppedBecauseOfGaps = monitoring.NewInt(nil, "tcp.dropped_because_of_gaps") type seqCompare int @@ -271,7 +269,8 @@ func (tcp *TCP) getStream(pkt *protos.Packet) (stream TCPStream, created bool) { id: tcp.getID(), tuple: &pkt.Tuple, protocol: protocol, - tcp: tcp} + tcp: tcp, + } conn.tcptuple = common.TCPTupleFromIPPort(conn.tuple, conn.id) tcp.streams.PutWithTimeout(pkt.Tuple.Hashable(), conn, timeout) return TCPStream{conn: conn, dir: TCPDirectionOriginal}, true @@ -289,16 +288,12 @@ func tcpSeqCompare(seq1, seq2 uint32) seqCompare { } } -func tcpSeqBefore(seq1 uint32, seq2 uint32) bool { - return int32(seq1-seq2) < 0 -} - func tcpSeqBeforeEq(seq1 uint32, seq2 uint32) bool { return int32(seq1-seq2) <= 0 } func buildPortsMap(plugins map[protos.Protocol]protos.TCPPlugin) (map[uint16]protos.Protocol, error) { - var res = map[uint16]protos.Protocol{} + res := map[uint16]protos.Protocol{} for proto, protoPlugin := range plugins { for _, port := range protoPlugin.GetPorts() { diff --git a/packetbeat/protos/tcp/tcp_test.go b/packetbeat/protos/tcp/tcp_test.go index 9dd910799b6..5678924a7d6 100644 --- a/packetbeat/protos/tcp/tcp_test.go +++ b/packetbeat/protos/tcp/tcp_test.go @@ -41,9 +41,7 @@ const ( ClientIP = "10.0.0.1" ) -var ( - httpProtocol, mysqlProtocol, redisProtocol protos.Protocol -) +var httpProtocol, mysqlProtocol, redisProtocol protos.Protocol func init() { new := func(_ bool, _ protos.Reporter, _ procs.ProcessesWatcher, _ *common.Config) (protos.Plugin, error) { @@ -199,7 +197,7 @@ func (p protocols) GetUDP(proto protos.Protocol) protos.UDPPlugin { retur func (p protocols) GetAll() map[protos.Protocol]protos.Plugin { return nil } func (p protocols) GetAllTCP() map[protos.Protocol]protos.TCPPlugin { return p.tcp } func (p protocols) GetAllUDP() map[protos.Protocol]protos.UDPPlugin { return nil } -func (p protocols) Register(proto protos.Protocol, plugin protos.Plugin) { return } +func (p protocols) Register(proto protos.Protocol, plugin protos.Plugin) {} func TestTCSeqPayload(t *testing.T) { type segment struct { @@ -213,7 +211,8 @@ func TestTCSeqPayload(t *testing.T) { expectedGaps int expectedState []byte }{ - {"No overlap", + { + "No overlap", []segment{ {1, []byte{1, 2, 3, 4, 5}}, {6, []byte{6, 7, 8, 9, 10}}, @@ -221,7 +220,8 @@ func TestTCSeqPayload(t *testing.T) { 0, []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, }, - {"Gap drop state", + { + "Gap drop state", []segment{ {1, []byte{1, 2, 3, 4}}, {15, []byte{5, 6, 7, 8}}, @@ -229,7 +229,8 @@ func TestTCSeqPayload(t *testing.T) { 10, []byte{5, 6, 7, 8}, }, - {"ACK same sequence number", + { + "ACK same sequence number", []segment{ {1, []byte{1, 2}}, {3, nil}, @@ -239,7 +240,8 @@ func TestTCSeqPayload(t *testing.T) { 0, []byte{1, 2, 3, 4, 5, 6}, }, - {"ACK same sequence number 2", + { + "ACK same sequence number 2", []segment{ {1, nil}, {2, nil}, @@ -253,7 +255,8 @@ func TestTCSeqPayload(t *testing.T) { 0, []byte{1, 2, 3, 4, 5, 6, 7, 8}, }, - {"Overlap, first segment bigger", + { + "Overlap, first segment bigger", []segment{ {1, []byte{1, 2}}, {3, []byte{3, 4}}, @@ -263,7 +266,8 @@ func TestTCSeqPayload(t *testing.T) { 0, []byte{1, 2, 3, 4, 5, 6}, }, - {"Overlap, second segment bigger", + { + "Overlap, second segment bigger", []segment{ {1, []byte{1, 2}}, {3, []byte{3}}, @@ -273,7 +277,8 @@ func TestTCSeqPayload(t *testing.T) { 0, []byte{1, 2, 3, 4, 5, 6}, }, - {"Overlap, covered", + { + "Overlap, covered", []segment{ {1, []byte{1, 2, 3, 4}}, {2, []byte{2, 3}}, diff --git a/packetbeat/protos/thrift/config.go b/packetbeat/protos/thrift/config.go index f687da9ac0c..0d946a02438 100644 --- a/packetbeat/protos/thrift/config.go +++ b/packetbeat/protos/thrift/config.go @@ -34,16 +34,14 @@ type thriftConfig struct { IdlFiles []string `config:"idl_files"` } -var ( - defaultConfig = thriftConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - }, - StringMaxSize: 200, - CollectionMaxSize: 15, - DropAfterNStructFields: 500, - TransportType: "socket", - ProtocolType: "binary", - CaptureReply: true, - } -) +var defaultConfig = thriftConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + }, + StringMaxSize: 200, + CollectionMaxSize: 15, + DropAfterNStructFields: 500, + TransportType: "socket", + ProtocolType: "binary", + CaptureReply: true, +} diff --git a/packetbeat/protos/thrift/thrift.go b/packetbeat/protos/thrift/thrift.go index d9778031d76..04c73747f7f 100644 --- a/packetbeat/protos/thrift/thrift.go +++ b/packetbeat/protos/thrift/thrift.go @@ -656,8 +656,8 @@ func (thrift *thriftPlugin) readStruct(data []byte) (value string, ok bool, comp } func (thrift *thriftPlugin) formatStruct(fields []thriftField, resolveNames bool, - fieldnames []*string) string { - + fieldnames []*string, +) string { toJoin := []string{} for i, field := range fields { if i == thrift.collectionMaxSize { @@ -746,7 +746,7 @@ func (thrift *thriftPlugin) readField(s *thriftStream) (ok bool, complete bool, func (thrift *thriftPlugin) messageParser(s *thriftStream) (bool, bool) { var ok, complete bool - var m = s.message + m := s.message logp.Debug("thriftdetailed", "messageParser called parseState=%v offset=%v", s.parseState, s.parseOffset) @@ -860,7 +860,7 @@ func (stream *thriftStream) prepareForNewMessage(flush bool) { } else { stream.data = stream.data[stream.parseOffset:] } - //logp.Debug("thrift", "remaining data: [%s]", stream.data) + // logp.Debug("thrift", "remaining data: [%s]", stream.data) stream.parseOffset = 0 stream.message = nil stream.parseState = thriftStartState @@ -871,8 +871,8 @@ type thriftPrivateData struct { } func (thrift *thriftPlugin) messageComplete(tcptuple *common.TCPTuple, dir uint8, - stream *thriftStream, priv *thriftPrivateData) { - + stream *thriftStream, priv *thriftPrivateData, +) { flush := false if stream.message.isRequest { @@ -906,7 +906,6 @@ func (thrift *thriftPlugin) messageComplete(tcptuple *common.TCPTuple, dir uint8 // and reset message stream.prepareForNewMessage(flush) - } func (thrift *thriftPlugin) ConnectionTimeout() time.Duration { @@ -914,8 +913,8 @@ func (thrift *thriftPlugin) ConnectionTimeout() time.Duration { } func (thrift *thriftPlugin) Parse(pkt *protos.Packet, tcptuple *common.TCPTuple, dir uint8, - private protos.ProtocolData) protos.ProtocolData { - + private protos.ProtocolData, +) protos.ProtocolData { defer logp.Recover("ParseThrift exception") priv := thriftPrivateData{} @@ -1040,8 +1039,8 @@ func (thrift *thriftPlugin) receivedReply(msg *thriftMessage) { } func (thrift *thriftPlugin) ReceivedFin(tcptuple *common.TCPTuple, dir uint8, - private protos.ProtocolData) protos.ProtocolData { - + private protos.ProtocolData, +) protos.ProtocolData { trans := thrift.getTransaction(tcptuple.Hashable()) if trans != nil { if trans.request != nil && trans.reply == nil { @@ -1055,8 +1054,8 @@ func (thrift *thriftPlugin) ReceivedFin(tcptuple *common.TCPTuple, dir uint8, } func (thrift *thriftPlugin) GapInStream(tcptuple *common.TCPTuple, dir uint8, - nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool) { - + nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool, +) { defer logp.Recover("GapInStream(thrift) exception") logp.Debug("thriftdetailed", "GapInStream called") diff --git a/packetbeat/protos/thrift/thrift_idl.go b/packetbeat/protos/thrift/thrift_idl.go index 82d8dedbe93..8bc8bec5b3b 100644 --- a/packetbeat/protos/thrift/thrift_idl.go +++ b/packetbeat/protos/thrift/thrift_idl.go @@ -49,7 +49,7 @@ func fieldsToArrayByID(fields []*parser.Field) []*string { } } - output := make([]*string, max+1, max+1) + output := make([]*string, max+1) for _, field := range fields { if len(field.Name) > 0 { diff --git a/packetbeat/protos/thrift/thrift_test.go b/packetbeat/protos/thrift/thrift_test.go index b5377eb4665..0938c60a3be 100644 --- a/packetbeat/protos/thrift/thrift_test.go +++ b/packetbeat/protos/thrift/thrift_test.go @@ -122,7 +122,6 @@ func TestThrift_readMessageBegin(t *testing.T) { data, _ = hex.DecodeString("800100010000000570696e6700000001") stream = thriftStream{data: data, message: new(thriftMessage)} - m = stream.message ok, complete = thrift.readMessageBegin(&stream) if !ok || complete { t.Errorf("Bad result: %v %v", ok, complete) @@ -130,7 +129,6 @@ func TestThrift_readMessageBegin(t *testing.T) { data, _ = hex.DecodeString("800100010000000570696e6700000001") stream = thriftStream{data: data, message: new(thriftMessage)} - m = stream.message ok, complete = thrift.readMessageBegin(&stream) if !ok || complete { t.Errorf("Bad result: %v %v", ok, complete) @@ -150,7 +148,6 @@ func TestThrift_readMessageBegin(t *testing.T) { data, _ = hex.DecodeString("0000000570696e670100000000") stream = thriftStream{data: data, message: new(thriftMessage)} - m = stream.message ok, complete = thrift.readMessageBegin(&stream) if !ok || complete { t.Error("Bad result:", ok, complete) diff --git a/packetbeat/protos/tls/alerts.go b/packetbeat/protos/tls/alerts.go index 4713e7e81f6..4da5c7d5b75 100644 --- a/packetbeat/protos/tls/alerts.go +++ b/packetbeat/protos/tls/alerts.go @@ -25,8 +25,10 @@ import ( "github.com/elastic/beats/v7/libbeat/logp" ) -type alertSeverity uint8 -type alertCode uint8 +type ( + alertSeverity uint8 + alertCode uint8 +) type alert struct { severity alertSeverity @@ -67,9 +69,7 @@ var alertNames = map[alertCode]string{ 115: "unknown_psk_identity", } -var ( - errRead = errors.New("Buffer read error") -) +var errRead = errors.New("Buffer read error") func (severity alertSeverity) String() string { switch severity { diff --git a/packetbeat/protos/tls/algos.go b/packetbeat/protos/tls/algos.go index b3ba6ea1867..8abd7021b67 100644 --- a/packetbeat/protos/tls/algos.go +++ b/packetbeat/protos/tls/algos.go @@ -22,11 +22,13 @@ import ( "fmt" ) -type cipherSuite uint16 -type signatureScheme uint16 -type pointsGroup uint16 -type compressionMethod uint8 -type ecPointsFormat uint8 +type ( + cipherSuite uint16 + signatureScheme uint16 + pointsGroup uint16 + compressionMethod uint8 + ecPointsFormat uint8 +) // from https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4 var cipherSuites = map[cipherSuite]string{ @@ -440,26 +442,26 @@ var supportedGroups = map[pointsGroup]string{ } var signatureSchemes = map[signatureScheme]string{ - /* RSASSA-PKCS1-v1_5 algorithms */ + // RSASSA-PKCS1-v1_5 algorithms 0x0401: "rsa_pkcs1_sha256", 0x0501: "rsa_pkcs1_sha384", 0x0601: "rsa_pkcs1_sha512", - /* ECDSA algorithms */ + // ECDSA algorithms 0x0403: "ecdsa_secp256r1_sha256", 0x0503: "ecdsa_secp384r1_sha384", 0x0603: "ecdsa_secp521r1_sha512", - /* RSASSA-PSS algorithms */ + // RSASSA-PSS algorithms 0x0804: "rsa_pss_sha256", 0x0805: "rsa_pss_sha384", 0x0806: "rsa_pss_sha512", - /* EdDSA algorithms */ + // EdDSA algorithms 0x0807: "ed25519", 0x0808: "ed448", - /* Legacy algorithms */ + // Legacy algorithms 0x0201: "rsa_pkcs1_sha1", 0x0203: "ecdsa_sha1", } diff --git a/packetbeat/protos/tls/config.go b/packetbeat/protos/tls/config.go index 775a8f69cc1..2190ccc18dd 100644 --- a/packetbeat/protos/tls/config.go +++ b/packetbeat/protos/tls/config.go @@ -30,13 +30,11 @@ type tlsConfig struct { Fingerprints []string `config:"fingerprints"` } -var ( - defaultConfig = tlsConfig{ - ProtocolCommon: config.ProtocolCommon{ - TransactionTimeout: protos.DefaultTransactionExpiration, - }, - SendCertificates: true, - IncludeDetailedFields: true, - Fingerprints: []string{"sha1"}, - } -) +var defaultConfig = tlsConfig{ + ProtocolCommon: config.ProtocolCommon{ + TransactionTimeout: protos.DefaultTransactionExpiration, + }, + SendCertificates: true, + IncludeDetailedFields: true, + Fingerprints: []string{"sha1"}, +} diff --git a/packetbeat/protos/tls/extensions.go b/packetbeat/protos/tls/extensions.go index 0021705c7f7..1ffceb3c235 100644 --- a/packetbeat/protos/tls/extensions.go +++ b/packetbeat/protos/tls/extensions.go @@ -35,12 +35,14 @@ type Extensions struct { InOrder []ExtensionID } -type extensionParser func(reader bufferView) interface{} -type extension struct { - label string - parser extensionParser - saveRaw bool -} +type ( + extensionParser func(reader bufferView) interface{} + extension struct { + label string + parser extensionParser + saveRaw bool + } +) const ( // ExtensionSupportedGroups identifies the supported group extension @@ -72,7 +74,6 @@ var extensionMap = map[uint16]extension{ // ParseExtensions returns an Extensions object parsed from the supplied buffer func ParseExtensions(buffer bufferView) Extensions { - var extensionsLength uint16 if !buffer.read16Net(0, &extensionsLength) || extensionsLength == 0 { // No extensions diff --git a/packetbeat/protos/tls/extensions_test.go b/packetbeat/protos/tls/extensions_test.go index 23caec09019..c61937411a9 100644 --- a/packetbeat/protos/tls/extensions_test.go +++ b/packetbeat/protos/tls/extensions_test.go @@ -27,7 +27,6 @@ import ( ) func TestSni(t *testing.T) { - // Single element buf := mkBuf(t, "000d"+ // 13 bytes @@ -126,7 +125,6 @@ func TestSni(t *testing.T) { } func TestParseMaxFragmentLength(t *testing.T) { - r := parseMaxFragmentLen(*mkBuf(t, "01", 1)) assert.Equal(t, "2^9", r.(string)) r = parseMaxFragmentLen(*mkBuf(t, "04", 1)) diff --git a/packetbeat/protos/tls/fingerprint.go b/packetbeat/protos/tls/fingerprint.go index 8768ff448e7..70489b687f9 100644 --- a/packetbeat/protos/tls/fingerprint.go +++ b/packetbeat/protos/tls/fingerprint.go @@ -36,8 +36,10 @@ type FingerprintAlgorithm struct { algo AlgorithmFactory } -var hashMap = make(map[string]*FingerprintAlgorithm) -var hashNames []string +var ( + hashMap = make(map[string]*FingerprintAlgorithm) + hashNames []string +) func init() { registerAlgo(func() hash.Hash { return md5.New() }, "md5", "") diff --git a/packetbeat/protos/tls/ja3.go b/packetbeat/protos/tls/ja3.go index 6e6faf5e26c..09a0aec5ea4 100644 --- a/packetbeat/protos/tls/ja3.go +++ b/packetbeat/protos/tls/ja3.go @@ -25,7 +25,6 @@ import ( ) func getJa3Fingerprint(hello *helloMessage) (hash string, ja3str string) { - // build the array of arrays of numbers data := make([][]uint16, 5) diff --git a/packetbeat/protos/tls/parse.go b/packetbeat/protos/tls/parse.go index d0ec3be75ef..fa4515e2248 100644 --- a/packetbeat/protos/tls/parse.go +++ b/packetbeat/protos/tls/parse.go @@ -54,9 +54,9 @@ type recordType uint8 const ( recordTypeChangeCipherSpec recordType = 20 - recordTypeAlert = 21 - recordTypeHandshake = 22 - recordTypeApplicationData = 23 + recordTypeAlert recordType = 21 + recordTypeHandshake recordType = 22 + recordTypeApplicationData recordType = 23 ) type handshakeType uint8 @@ -169,8 +169,10 @@ func readHandshakeHeader(buf *streambuf.Buffer) (*handshakeHeader, error) { if len16, err = buf.ReadNetUint16At(2); err != nil { return nil, err } - return &handshakeHeader{handshakeType(typ), - int(len16) | (int(len8) << 16)}, nil + return &handshakeHeader{ + handshakeType(typ), + int(len16) | (int(len8) << 16), + }, nil } func (header *recordHeader) String() string { @@ -215,7 +217,6 @@ func (hello *helloMessage) supportedCiphers() []string { } func (parser *parser) parse(buf *streambuf.Buffer) parserResult { - for buf.Avail(recordHeaderSize) { header, err := readRecordHeader(buf) diff --git a/packetbeat/protos/tls/parse_test.go b/packetbeat/protos/tls/parse_test.go index 37f4a1b1956..f599b30c44c 100644 --- a/packetbeat/protos/tls/parse_test.go +++ b/packetbeat/protos/tls/parse_test.go @@ -125,12 +125,6 @@ func mapGet(t *testing.T, m common.MapStr, key string) interface{} { return value } -func mapInt(t *testing.T, m common.MapStr, key string) uint32 { - value, err := m.GetValue(key) - assert.NoError(t, err) - return value.(uint32) -} - func TestParseRecordHeader(t *testing.T) { if testing.Verbose() { isDebug = true @@ -173,6 +167,7 @@ func TestParseHandshakeHeader(t *testing.T) { _, err = readHandshakeHeader(sBuf(t, "112233")) assert.Error(t, err) header, err := readHandshakeHeader(sBuf(t, "11223344")) + assert.NoError(t, err) assert.Equal(t, handshakeType(0x11), header.handshakeType) assert.Equal(t, 0x223344, header.length) } @@ -202,7 +197,6 @@ func TestParserParse(t *testing.T) { // Certificate request assert.Equal(t, resultOK, parser.parse(sBuf(t, "16030300040d000000"))) assert.True(t, parser.certRequested) - } func TestParserHello(t *testing.T) { diff --git a/packetbeat/protos/tls/tls.go b/packetbeat/protos/tls/tls.go index 9db2a28f694..a785d101021 100644 --- a/packetbeat/protos/tls/tls.go +++ b/packetbeat/protos/tls/tls.go @@ -170,10 +170,9 @@ func (plugin *tlsPlugin) doParse( tcptuple *common.TCPTuple, dir uint8, ) *tlsConnectionData { - // Ignore further traffic after the handshake is completed (encrypted connection) // TODO: request/response analysis - if 0 != conn.handshakeCompleted&(1< 0 { desc = dev.Description } - r += fmt.Sprintf(" (%s)", desc) + fmt.Fprintf(&buf, " (%s)", desc) } if withIP { - ips := "Not assigned ip address" - if len(dev.Addresses) > 0 { - ips = "" - + buf.WriteString(" (") + if len(dev.Addresses) == 0 { + buf.WriteString("Not assigned ip address") + } else { for i, address := range []pcap.InterfaceAddress(dev.Addresses) { - // Add a space between the IP address. - if i > 0 { - ips += " " + if i != 0 { + buf.WriteByte(' ') } - - ips += fmt.Sprintf("%s", address.IP.String()) + fmt.Fprint(&buf, address.IP) } } - r += fmt.Sprintf(" (%s)", ips) - + buf.WriteByte(')') } - ret = append(ret, r) + names = append(names, buf.String()) } - return ret, nil + return names } func resolveDeviceName(name string) (string, error) { diff --git a/packetbeat/sniffer/device_test.go b/packetbeat/sniffer/device_test.go new file mode 100644 index 00000000000..189bc92a9cd --- /dev/null +++ b/packetbeat/sniffer/device_test.go @@ -0,0 +1,136 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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 sniffer + +import ( + "net" + "reflect" + "testing" + + "github.com/tsg/gopacket/pcap" +) + +var formatDeviceNamesTests = []struct { + name string + interfaces []pcap.Interface + withDesc bool + withIP bool + want []string +}{ + {name: "empty"}, + { + name: "loopback no withs", + interfaces: []pcap.Interface{ + { + Name: "lo", Description: "loopback", + Addresses: []pcap.InterfaceAddress{ + {IP: net.IP{127, 0, 0, 1}, Netmask: net.IPMask{255, 0, 0, 0}}, + }, + }, + }, + want: []string{ + "lo", + }, + }, + { + name: "loopback with desc", + interfaces: []pcap.Interface{ + { + Name: "lo", Description: "loopback", + Addresses: []pcap.InterfaceAddress{ + {IP: net.IP{127, 0, 0, 1}, Netmask: net.IPMask{255, 0, 0, 0}}, + }, + }, + }, + withDesc: true, + want: []string{ + "lo (loopback)", + }, + }, + { + name: "loopback with IPs", + interfaces: []pcap.Interface{ + { + Name: "lo", Description: "loopback", + Addresses: []pcap.InterfaceAddress{ + {IP: net.IP{127, 0, 0, 1}, Netmask: net.IPMask{255, 0, 0, 0}}, + }, + }, + }, + withIP: true, + want: []string{ + "lo (127.0.0.1)", + }, + }, + { + name: "loopback with the lot", + interfaces: []pcap.Interface{ + { + Name: "lo", Description: "loopback", + Addresses: []pcap.InterfaceAddress{ + {IP: net.IP{127, 0, 0, 1}, Netmask: net.IPMask{255, 0, 0, 0}}, + }, + }, + }, + withDesc: true, + withIP: true, + want: []string{ + "lo (loopback) (127.0.0.1)", + }, + }, + { + name: "two addr loopback with the lot", + interfaces: []pcap.Interface{ + { + Name: "lo", Description: "loopback", + Addresses: []pcap.InterfaceAddress{ + {IP: net.IP{127, 0, 0, 1}, Netmask: net.IPMask{255, 0, 0, 0}}, + {IP: net.IP{127, 0, 1, 1}, Netmask: net.IPMask{255, 0, 0, 0}}, + }, + }, + }, + withDesc: true, + withIP: true, + want: []string{ + "lo (loopback) (127.0.0.1 127.0.1.1)", + }, + }, + { + name: "no IP loopback with the lot", + interfaces: []pcap.Interface{ + { + Name: "lo", Description: "loopback", + }, + }, + withDesc: true, + withIP: true, + want: []string{ + "lo (loopback) (Not assigned ip address)", + }, + }, +} + +func TestFormatDevices(t *testing.T) { + for _, test := range formatDeviceNamesTests { + got := formatDeviceNames(test.interfaces, test.withDesc, test.withIP) + if !reflect.DeepEqual(got, test.want) { + t.Errorf("unexpected result for test %s:\ngot: %v\nwant:%v", + test.name, got, test.want) + } + } +} diff --git a/packetbeat/sniffer/sniffer.go b/packetbeat/sniffer/sniffer.go index bfe720c7b98..07a7e3096a9 100644 --- a/packetbeat/sniffer/sniffer.go +++ b/packetbeat/sniffer/sniffer.go @@ -39,7 +39,6 @@ import ( // to a Worker. type Sniffer struct { config config.InterfacesConfig - dumper *pcap.Dumper state atomic.Int32 // store snifferState @@ -60,7 +59,6 @@ type Worker interface { type snifferHandle interface { gopacket.PacketDataSource - LinkType() layers.LinkType Close() } diff --git a/packetbeat/sniffer/sniffer_test.go b/packetbeat/sniffer/sniffer_test.go index eea7821d889..52b0b57fb33 100644 --- a/packetbeat/sniffer/sniffer_test.go +++ b/packetbeat/sniffer/sniffer_test.go @@ -52,13 +52,16 @@ func TestSniffer_afpacketComputeSize(t *testing.T) { t.Error("Value too big", blockSize, numBlocks) } - frameSize, blockSize, numBlocks, err = afpacketComputeSize(0, 1514, 4096) + _, _, _, err = afpacketComputeSize(0, 1514, 4096) if err == nil { t.Error("Expected an error") } // 16436 is the default MTU size of the loopback interface frameSize, blockSize, numBlocks, err = afpacketComputeSize(30, 16436, 4096) + if err != nil { + t.Error(err) + } if frameSize != 4096*5 || blockSize != 4096*5*128 || numBlocks != 12 { t.Error("Bad result", frameSize, blockSize, numBlocks) } diff --git a/script/renamed_fields.py b/script/renamed_fields.py index 2de05c012b4..08059698bf1 100644 --- a/script/renamed_fields.py +++ b/script/renamed_fields.py @@ -3,7 +3,7 @@ def migration(): - beats = ["Auditbeat", "Filebeat", "Heartbeat", "Journalbeat", "Metricbeat", "Packetbeat", "Winlogbeat"] + beats = ["Auditbeat", "Filebeat", "Heartbeat", "Metricbeat", "Packetbeat", "Winlogbeat"] for beat in beats: print(".{} renamed fields in 7.0".format(beat)) diff --git a/winlogbeat/sys/winevent/event_test.go b/winlogbeat/sys/winevent/event_test.go index 4ed391b91be..b6d893957ed 100644 --- a/winlogbeat/sys/winevent/event_test.go +++ b/winlogbeat/sys/winevent/event_test.go @@ -26,6 +26,8 @@ import ( "time" "github.com/stretchr/testify/assert" + + "github.com/elastic/beats/v7/libbeat/common" ) const allXML = ` @@ -79,9 +81,10 @@ const allXML = ` func TestXML(t *testing.T) { allXMLTimeCreated, _ := time.Parse(time.RFC3339Nano, "2016-01-28T20:33:27.990735300Z") - var tests = []struct { - xml string - event Event + tests := []struct { + xml string + event Event + mapstr common.MapStr }{ { xml: allXML, @@ -150,6 +153,14 @@ func TestXML(t *testing.T) { }, }, }, + mapstr: common.MapStr{ + "event_id": "0", + "time_created": time.Time{}, + "user_data": common.MapStr{ + "Id": "{00000000-0000-0000-0000-000000000000}", + "xml_name": "Operation_ClientFailure", + }, + }, }, } @@ -160,6 +171,9 @@ func TestXML(t *testing.T) { continue } assert.Equal(t, test.event, event) + if test.mapstr != nil { + assert.Equal(t, test.mapstr, event.Fields()) + } if testing.Verbose() { json, err := json.MarshalIndent(event, "", " ") @@ -174,7 +188,7 @@ func TestXML(t *testing.T) { // Tests that control characters other than CR and LF are escaped // when the event is decoded. func TestInvalidXML(t *testing.T) { - evXML := strings.Replace(allXML, "%1", "\t \n\x1b", -1) + evXML := strings.ReplaceAll(allXML, "%1", "\t \n\x1b") ev, err := UnmarshalXML([]byte(evXML)) assert.Equal(t, nil, err) assert.Equal(t, "Creating WSMan shell on server with ResourceUri: \t\r\n\\u001b", ev.Message) diff --git a/winlogbeat/sys/winevent/maputil.go b/winlogbeat/sys/winevent/maputil.go index 45a265ae8c6..82ae2ad2a3c 100644 --- a/winlogbeat/sys/winevent/maputil.go +++ b/winlogbeat/sys/winevent/maputil.go @@ -20,6 +20,7 @@ package winevent import ( "fmt" "reflect" + "time" "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/beats/v7/winlogbeat/sys" @@ -80,25 +81,12 @@ func AddPairs(m common.MapStr, key string, pairs []KeyValue) common.MapStr { // isZero return true if the given value is the zero value for its type. func isZero(i interface{}) bool { - if i == nil { + switch i := i.(type) { + case nil: return true + case time.Time: + return false + default: + return reflect.ValueOf(i).IsZero() } - - v := reflect.ValueOf(i) - switch v.Kind() { - case reflect.Array, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return v.IsNil() - } - - return false } diff --git a/x-pack/elastic-agent/CHANGELOG.next.asciidoc b/x-pack/elastic-agent/CHANGELOG.next.asciidoc index d0de29fdea8..759fe407853 100644 --- a/x-pack/elastic-agent/CHANGELOG.next.asciidoc +++ b/x-pack/elastic-agent/CHANGELOG.next.asciidoc @@ -149,4 +149,4 @@ - Add diagnostics command to gather beat metadata. {pull}28265[28265] - Add diagnostics collect command to gather beat metadata, config, policy, and logs and bundle it into an archive. {pull}28461[28461] - Add `KIBANA_FLEET_SERVICE_TOKEN` to Elastic Agent container. {pull}28096[28096] -- Enable pprof endpoints for beats processes. Allow pprof endpoints for elastic-agent if enabled. {pull}28983[28983] +- Allow pprof endpoints for elastic-agent or beats if enabled. {pull}28983[28983] {pull}29155[29155] diff --git a/x-pack/elastic-agent/GUIDELINES.md b/x-pack/elastic-agent/GUIDELINES.md new file mode 100644 index 00000000000..3fa741fc991 --- /dev/null +++ b/x-pack/elastic-agent/GUIDELINES.md @@ -0,0 +1,9 @@ +# Guidelines + +This document contains architecture details around Elastic Agent and guidelines on how new inputs and processes should be built. + +## Processes running as service and error handling + +All the processes started by Elastic Agent are running as service. Each service is expected to handle local errors on its own and continue working. A process should only fail on startup if an invalid configuration is passed in. As soon as a process is running and partial updates to the config are made without restart, the service is expected to keep running but report the errors. + +A service that needs to do setup tasks on startup is expected to retry until it succeeds and not error out after a certain timeout. diff --git a/x-pack/elastic-agent/_meta/config/common.p2.yml.tmpl b/x-pack/elastic-agent/_meta/config/common.p2.yml.tmpl index a451165969f..de16df8ea7f 100644 --- a/x-pack/elastic-agent/_meta/config/common.p2.yml.tmpl +++ b/x-pack/elastic-agent/_meta/config/common.p2.yml.tmpl @@ -35,7 +35,7 @@ inputs: # metrics: true # # exposes /debug/pprof/ endpoints # # recommended that these endpoints are only enabled if the monitoring endpoint is set to localhost -# pprof: true +# pprof: false # # exposes agent metrics using http, by default sockets and named pipes are used # http: # # enables http endpoint diff --git a/x-pack/elastic-agent/_meta/config/common.reference.p2.yml.tmpl b/x-pack/elastic-agent/_meta/config/common.reference.p2.yml.tmpl index 922e6a4dd6a..43e48464630 100644 --- a/x-pack/elastic-agent/_meta/config/common.reference.p2.yml.tmpl +++ b/x-pack/elastic-agent/_meta/config/common.reference.p2.yml.tmpl @@ -109,7 +109,7 @@ inputs: # metrics: false # # exposes /debug/pprof/ endpoints # # recommended that these endpoints are only enabled if the monitoring endpoint is set to localhost -# pprof: true +# pprof: false # # exposes agent metrics using http, by default sockets and named pipes are used # http: # # enables http endpoint diff --git a/x-pack/elastic-agent/_meta/config/elastic-agent.docker.yml.tmpl b/x-pack/elastic-agent/_meta/config/elastic-agent.docker.yml.tmpl index a8236033303..69a80678db8 100644 --- a/x-pack/elastic-agent/_meta/config/elastic-agent.docker.yml.tmpl +++ b/x-pack/elastic-agent/_meta/config/elastic-agent.docker.yml.tmpl @@ -109,7 +109,7 @@ inputs: # metrics: false # # exposes /debug/pprof/ endpoints # # recommended that these endpoints are only enabled if the monitoring endpoint is set to localhost -# pprof: true +# pprof: false # # exposes agent metrics using http, by default sockets and named pipes are used # http: # # enables http endpoint diff --git a/x-pack/elastic-agent/elastic-agent.docker.yml b/x-pack/elastic-agent/elastic-agent.docker.yml index a1ef12ae405..9bf7307aacf 100644 --- a/x-pack/elastic-agent/elastic-agent.docker.yml +++ b/x-pack/elastic-agent/elastic-agent.docker.yml @@ -109,7 +109,7 @@ inputs: # metrics: false # # exposes /debug/pprof/ endpoints # # recommended that these endpoints are only enabled if the monitoring endpoint is set to localhost -# pprof: true +# pprof: false # # exposes agent metrics using http, by default sockets and named pipes are used # http: # # enables http endpoint diff --git a/x-pack/elastic-agent/elastic-agent.reference.yml b/x-pack/elastic-agent/elastic-agent.reference.yml index d41b7c54ed8..67922a1d89c 100644 --- a/x-pack/elastic-agent/elastic-agent.reference.yml +++ b/x-pack/elastic-agent/elastic-agent.reference.yml @@ -115,7 +115,7 @@ inputs: # metrics: false # # exposes /debug/pprof/ endpoints # # recommended that these endpoints are only enabled if the monitoring endpoint is set to localhost -# pprof: true +# pprof: false # # exposes agent metrics using http, by default sockets and named pipes are used # http: # # enables http endpoint diff --git a/x-pack/elastic-agent/elastic-agent.yml b/x-pack/elastic-agent/elastic-agent.yml index 2ea81fda476..d40b6518e8d 100644 --- a/x-pack/elastic-agent/elastic-agent.yml +++ b/x-pack/elastic-agent/elastic-agent.yml @@ -41,7 +41,7 @@ inputs: # metrics: true # # exposes /debug/pprof/ endpoints # # recommended that these endpoints are only enabled if the monitoring endpoint is set to localhost -# pprof: true +# pprof: false # # exposes agent metrics using http, by default sockets and named pipes are used # http: # # enables http endpoint diff --git a/x-pack/elastic-agent/pkg/agent/program/program_test.go b/x-pack/elastic-agent/pkg/agent/program/program_test.go index 04c3519af65..b75ac9dceaa 100644 --- a/x-pack/elastic-agent/pkg/agent/program/program_test.go +++ b/x-pack/elastic-agent/pkg/agent/program/program_test.go @@ -400,10 +400,6 @@ func TestConfiguration(t *testing.T) { // programs: []string{"auditbeat"}, // expected: 1, // }, - // "journal_config": { - // programs: []string{"journalbeat"}, - // expected: 1, - // }, "fleet_server": { programs: []string{"fleet-server"}, expected: 1, diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/journal_config-journalbeat.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/journal_config-journalbeat.yml deleted file mode 100644 index 60e6261fc0e..00000000000 --- a/x-pack/elastic-agent/pkg/agent/program/testdata/journal_config-journalbeat.yml +++ /dev/null @@ -1,15 +0,0 @@ -journalbeat: - inputs: - - type: log/journal - paths: [] - backoff: 1s - max_backoff: 20s - seek: cursor - cursor_seek_fallback: head - include_matches: [] - save_remote_hostname: false -output: - elasticsearch: - hosts: [127.0.0.1:9200, 127.0.0.1:9300] - username: elastic - password: changeme diff --git a/x-pack/elastic-agent/pkg/core/monitoring/beats/beats_monitor.go b/x-pack/elastic-agent/pkg/core/monitoring/beats/beats_monitor.go index d506c22a6cb..cb0519f9806 100644 --- a/x-pack/elastic-agent/pkg/core/monitoring/beats/beats_monitor.go +++ b/x-pack/elastic-agent/pkg/core/monitoring/beats/beats_monitor.go @@ -122,8 +122,12 @@ func (b *Monitor) EnrichArgs(spec program.Spec, pipelineID string, args []string appendix = append(appendix, "-E", "http.enabled=true", "-E", "http.host="+endpoint, - "-E", "http.pprof.enabled=true", ) + if b.config.Pprof { + appendix = append(appendix, + "-E", "http.pprof.enabled=true", + ) + } } loggingPath := b.generateLoggingPath(spec, pipelineID) diff --git a/x-pack/elastic-agent/pkg/core/monitoring/config/config.go b/x-pack/elastic-agent/pkg/core/monitoring/config/config.go index 10a3a6bd4a9..10f220fcc5a 100644 --- a/x-pack/elastic-agent/pkg/core/monitoring/config/config.go +++ b/x-pack/elastic-agent/pkg/core/monitoring/config/config.go @@ -39,6 +39,6 @@ func DefaultConfig() *MonitoringConfig { Port: defaultPort, }, Namespace: defaultNamespace, - Pprof: true, + Pprof: false, } } diff --git a/x-pack/elastic-agent/spec/journalbeat.yml.disabled b/x-pack/elastic-agent/spec/journalbeat.yml.disabled deleted file mode 100644 index ce35cc75aaf..00000000000 --- a/x-pack/elastic-agent/spec/journalbeat.yml.disabled +++ /dev/null @@ -1,22 +0,0 @@ -name: Journalbeat -cmd: journalbeat -args: ["-E", "setup.ilm.enabled=false", "-E", "setup.template.enabled=false"] -rules: -- filter_values: - selector: streams - key: type - values: - - log/journal -- copy: - from: streams - to: journalbeat -- rename: - from: journalbeat.streams - to: inputs -- filter: - selectors: - - journalbeat - - output - - keystore -when: HasItems(%{[journalbeat.inputs]}) && HasNamespace('output', 'elasticsearch', - 'redis', 'kafka', 'logstash') diff --git a/x-pack/filebeat/filebeat.reference.yml b/x-pack/filebeat/filebeat.reference.yml index 50cb79578be..fae9d78fb5d 100644 --- a/x-pack/filebeat/filebeat.reference.yml +++ b/x-pack/filebeat/filebeat.reference.yml @@ -2954,6 +2954,25 @@ filebeat.inputs: # Configure stream to filter to a specific stream: stdout, stderr or all (default) #stream: all +#------------------------------ Journald input -------------------------------- +# Journald input is experimental. +#- type: journald + #enabled: true + #id: service-foo + + # You may wish to have separate inputs for each service. You can use + # include_matches to specify a list of filter expressions that are + # applied as a logical OR. You may specify filter + #include_matches: + #- _SYSTEMD_UNIT=foo.service + + # Parsers are also supported, here is an example of the multiline + # parser. + #parsers: + #- multiline: + #type: count + #count_lines: 3 + #------------------------------ NetFlow input -------------------------------- # Experimental: Config options for the Netflow/IPFIX collector over UDP input diff --git a/x-pack/journalbeat/cmd/root.go b/x-pack/journalbeat/cmd/root.go deleted file mode 100644 index d549011f73a..00000000000 --- a/x-pack/journalbeat/cmd/root.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one -// or more contributor license agreements. Licensed under the Elastic License; -// you may not use this file except in compliance with the Elastic License. - -package cmd - -import ( - journalbeatCmd "github.com/elastic/beats/v7/journalbeat/cmd" - "github.com/elastic/beats/v7/libbeat/cmd" - - _ "github.com/elastic/beats/v7/x-pack/libbeat/include" -) - -// RootCmd to handle beats cli -var RootCmd *cmd.BeatsRootCmd - -func init() { - settings := journalbeatCmd.JournalbeatSettings() - settings.ElasticLicensed = true - RootCmd = journalbeatCmd.Initialize(settings) -} diff --git a/x-pack/journalbeat/main.go b/x-pack/journalbeat/main.go deleted file mode 100644 index 232a3e6fc49..00000000000 --- a/x-pack/journalbeat/main.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one -// or more contributor license agreements. Licensed under the Elastic License; -// you may not use this file except in compliance with the Elastic License. - -package main - -import ( - "os" - - "github.com/elastic/beats/v7/x-pack/journalbeat/cmd" - - _ "github.com/elastic/beats/v7/journalbeat/include" -) - -func main() { - if err := cmd.RootCmd.Execute(); err != nil { - os.Exit(1) - } -} diff --git a/x-pack/journalbeat/main_test.go b/x-pack/journalbeat/main_test.go deleted file mode 100644 index fcac188a31c..00000000000 --- a/x-pack/journalbeat/main_test.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one -// or more contributor license agreements. Licensed under the Elastic License; -// you may not use this file except in compliance with the Elastic License. -package main - -// This file is mandatory as otherwise the journalbeat.test binary is not generated correctly. -import ( - "flag" - "testing" - - "github.com/elastic/beats/v7/journalbeat/cmd" - "github.com/elastic/beats/v7/libbeat/tests/system/template" -) - -var systemTest *bool - -func init() { - testing.Init() - systemTest = flag.Bool("systemTest", false, "Set to true when running system tests") - cmd.RootCmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("systemTest")) - cmd.RootCmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("test.coverprofile")) -} - -// Test started when the test binary is started. Only calls main. -func TestSystem(t *testing.T) { - if *systemTest { - main() - } -} - -func TestTemplate(t *testing.T) { - template.TestTemplate(t, cmd.Name, true) -}