diff --git a/go.mod b/go.mod index 4b17434841..af2ea7a437 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/elastic/go-elasticsearch/v7 v7.17.1 github.com/elastic/go-licenser v0.4.0 github.com/elastic/go-ucfg v0.8.5 - github.com/elastic/package-spec v1.10.0 + github.com/elastic/package-spec v1.11.0 github.com/fatih/color v1.13.0 github.com/go-git/go-billy/v5 v5.3.1 github.com/go-git/go-git/v5 v5.4.2 diff --git a/go.sum b/go.sum index e56eb78389..2140356041 100644 --- a/go.sum +++ b/go.sum @@ -411,8 +411,8 @@ github.com/elastic/go-licenser v0.4.0 h1:jLq6A5SilDS/Iz1ABRkO6BHy91B9jBora8FwGRs github.com/elastic/go-licenser v0.4.0/go.mod h1:V56wHMpmdURfibNBggaSBfqgPxyT1Tldns1i87iTEvU= github.com/elastic/go-ucfg v0.8.5 h1:4GB/rMpuh7qTcSFaxJUk97a/JyvFzhi6t+kaskTTLdM= github.com/elastic/go-ucfg v0.8.5/go.mod h1:4E8mPOLSUV9hQ7sgLEJ4bvt0KhMuDJa8joDT2QGAEKA= -github.com/elastic/package-spec v1.10.0 h1:fkCZRmxN4jesLuylGOEX5g31iITCXZFMbkgX6qvzkZI= -github.com/elastic/package-spec v1.10.0/go.mod h1:KzGTSDqCkdhmL1IFpOH2ZQNSSE9JEhNtndxU3ZrQilA= +github.com/elastic/package-spec v1.11.0 h1:atrhfGqCDVOnVO83Qh+doAjWnk/3Cs+d4C0U1YhvhgI= +github.com/elastic/package-spec v1.11.0/go.mod h1:KzGTSDqCkdhmL1IFpOH2ZQNSSE9JEhNtndxU3ZrQilA= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= diff --git a/internal/builder/external_fields.go b/internal/builder/external_fields.go index cdae62bf2a..961500adfa 100644 --- a/internal/builder/external_fields.go +++ b/internal/builder/external_fields.go @@ -37,11 +37,18 @@ func resolveExternalFields(packageRoot, destinationDir string) error { return errors.Wrap(err, "can't create field dependency manager") } - fieldsFile, err := filepath.Glob(filepath.Join(destinationDir, "data_stream", "*", "fields", "*.yml")) + dataStreamFieldsFiles, err := filepath.Glob(filepath.Join(destinationDir, "data_stream", "*", "fields", "*.yml")) if err != nil { return err } - for _, file := range fieldsFile { + + packageFieldsFiles, err := filepath.Glob(filepath.Join(destinationDir, "fields", "*.yml")) + if err != nil { + return err + } + + var fieldsFiles = append(packageFieldsFiles, dataStreamFieldsFiles...) + for _, file := range fieldsFiles { data, err := os.ReadFile(file) if err != nil { return err diff --git a/internal/docs/exported_fields.go b/internal/docs/exported_fields.go index 59babdae9d..585a0f693c 100644 --- a/internal/docs/exported_fields.go +++ b/internal/docs/exported_fields.go @@ -6,7 +6,6 @@ package docs import ( "fmt" - "path/filepath" "sort" "strings" @@ -25,11 +24,10 @@ type fieldsTableRecord struct { var escaper = strings.NewReplacer("*", "\\*", "{", "\\{", "}", "\\}", "<", "\\<", ">", "\\>") -func renderExportedFields(packageRoot, dataStreamName string) (string, error) { - dataStreamPath := filepath.Join(packageRoot, "data_stream", dataStreamName) - validator, err := fields.CreateValidatorForDataStream(dataStreamPath) +func renderExportedFields(fieldsParentDir string) (string, error) { + validator, err := fields.CreateValidatorForDirectory(fieldsParentDir) if err != nil { - return "", errors.Wrapf(err, "can't create fields validator instance (path: %s)", dataStreamPath) + return "", errors.Wrapf(err, "can't create fields validator instance (path: %s)", fieldsParentDir) } collected, err := collectFieldsFromDefinitions(validator) diff --git a/internal/docs/readme.go b/internal/docs/readme.go index 086201215c..3b5eb9b955 100644 --- a/internal/docs/readme.go +++ b/internal/docs/readme.go @@ -168,8 +168,12 @@ func renderReadme(fileName, packageRoot, templatePath string) ([]byte, error) { "event": func(dataStreamName string) (string, error) { return renderSampleEvent(packageRoot, dataStreamName) }, - "fields": func(dataStreamName string) (string, error) { - return renderExportedFields(packageRoot, dataStreamName) + "fields": func(args ...string) (string, error) { + if len(args) > 0 { + dataStreamPath := filepath.Join(packageRoot, "data_stream", args[0]) + return renderExportedFields(dataStreamPath) + } + return renderExportedFields(packageRoot) }, }).ParseFiles(templatePath) if err != nil { diff --git a/internal/fields/testdata/manifest.yml b/internal/fields/testdata/manifest.yml new file mode 100644 index 0000000000..07e71b586f --- /dev/null +++ b/internal/fields/testdata/manifest.yml @@ -0,0 +1,2 @@ +type: integration +version: 0.0.1 \ No newline at end of file diff --git a/internal/fields/validate.go b/internal/fields/validate.go index 8090fc61b0..5d9b6d0fdf 100644 --- a/internal/fields/validate.go +++ b/internal/fields/validate.go @@ -19,7 +19,9 @@ import ( "gopkg.in/yaml.v3" "github.com/elastic/elastic-package/internal/common" + "github.com/elastic/elastic-package/internal/logger" "github.com/elastic/elastic-package/internal/multierror" + "github.com/elastic/elastic-package/internal/packages" "github.com/elastic/elastic-package/internal/packages/buildmanifest" ) @@ -39,7 +41,7 @@ type Validator struct { allowedCIDRs []*net.IPNet } -// ValidatorOption represents an optional flag that can be passed to CreateValidatorForDataStream. +// ValidatorOption represents an optional flag that can be passed to CreateValidatorForDirectory. type ValidatorOption func(*Validator) error // WithDefaultNumericConversion configures the validator to accept defined keyword (or constant_keyword) fields as numeric-type. @@ -78,8 +80,8 @@ func WithEnabledAllowedIPCheck() ValidatorOption { } } -// CreateValidatorForDataStream function creates a validator for the data stream. -func CreateValidatorForDataStream(dataStreamRootPath string, opts ...ValidatorOption) (v *Validator, err error) { +// CreateValidatorForDirectory function creates a validator for the directory. +func CreateValidatorForDirectory(fieldsParentDir string, opts ...ValidatorOption) (v *Validator, err error) { v = new(Validator) for _, opt := range opts { if err := opt(v); err != nil { @@ -89,16 +91,28 @@ func CreateValidatorForDataStream(dataStreamRootPath string, opts ...ValidatorOp v.allowedCIDRs = initializeAllowedCIDRsList() - v.Schema, err = loadFieldsForDataStream(dataStreamRootPath) + fieldsDir := filepath.Join(fieldsParentDir, "fields") + v.Schema, err = loadFieldsFromDir(fieldsDir) if err != nil { - return nil, errors.Wrapf(err, "can't load fields for data stream (path: %s)", dataStreamRootPath) + return nil, errors.Wrapf(err, "can't load fields from directory (path: %s)", fieldsDir) } if v.disabledDependencyManagement { return v, nil } - packageRoot := filepath.Dir(filepath.Dir(dataStreamRootPath)) + packageRoot, found, err := packages.FindPackageRoot() + if err != nil { + return nil, errors.Wrap(err, "can't find package root") + } + // As every command starts with approximating where is the package root, it isn't required to return an error in case the root is missing. + // This is also useful for testing purposes, where we don't have a real package, but just "fields" directory. The package root is always absent. + if !found { + logger.Debug("Package root not found, dependency management will be disabled.") + v.disabledDependencyManagement = true + return v, nil + } + bm, ok, err := buildmanifest.ReadBuildManifest(packageRoot) if err != nil { return nil, errors.Wrap(err, "can't read build manifest") @@ -132,8 +146,7 @@ func initializeAllowedCIDRsList() (cidrs []*net.IPNet) { return cidrs } -func loadFieldsForDataStream(dataStreamRootPath string) ([]FieldDefinition, error) { - fieldsDir := filepath.Join(dataStreamRootPath, "fields") +func loadFieldsFromDir(fieldsDir string) ([]FieldDefinition, error) { files, err := filepath.Glob(filepath.Join(fieldsDir, "*.yml")) if err != nil { return nil, errors.Wrapf(err, "reading directory with fields failed (path: %s)", fieldsDir) diff --git a/internal/fields/validate_test.go b/internal/fields/validate_test.go index f468e89788..71d9d4a3f3 100644 --- a/internal/fields/validate_test.go +++ b/internal/fields/validate_test.go @@ -18,7 +18,7 @@ type results struct { } func TestValidate_NoWildcardFields(t *testing.T) { - validator, err := CreateValidatorForDataStream("../../test/packages/parallel/aws/data_stream/elb_logs") + validator, err := CreateValidatorForDirectory("../../test/packages/parallel/aws/data_stream/elb_logs") require.NoError(t, err) require.NotNil(t, validator) @@ -30,7 +30,7 @@ func TestValidate_NoWildcardFields(t *testing.T) { } func TestValidate_WithWildcardFields(t *testing.T) { - validator, err := CreateValidatorForDataStream("../../test/packages/parallel/aws/data_stream/sns") + validator, err := CreateValidatorForDirectory("../../test/packages/parallel/aws/data_stream/sns") require.NoError(t, err) require.NotNil(t, validator) @@ -40,7 +40,7 @@ func TestValidate_WithWildcardFields(t *testing.T) { } func TestValidate_WithFlattenedFields(t *testing.T) { - validator, err := CreateValidatorForDataStream("testdata", + validator, err := CreateValidatorForDirectory("testdata", WithDisabledDependencyManagement()) require.NoError(t, err) require.NotNil(t, validator) @@ -51,7 +51,7 @@ func TestValidate_WithFlattenedFields(t *testing.T) { } func TestValidate_WithNumericKeywordFields(t *testing.T) { - validator, err := CreateValidatorForDataStream("testdata", + validator, err := CreateValidatorForDirectory("testdata", WithNumericKeywordFields([]string{"foo.code"}), WithDisabledDependencyManagement()) require.NoError(t, err) @@ -63,7 +63,7 @@ func TestValidate_WithNumericKeywordFields(t *testing.T) { } func TestValidate_constantKeyword(t *testing.T) { - validator, err := CreateValidatorForDataStream("testdata") + validator, err := CreateValidatorForDirectory("testdata") require.NoError(t, err) require.NotNil(t, validator) @@ -77,7 +77,7 @@ func TestValidate_constantKeyword(t *testing.T) { } func TestValidate_ipAddress(t *testing.T) { - validator, err := CreateValidatorForDataStream("testdata", WithEnabledAllowedIPCheck()) + validator, err := CreateValidatorForDirectory("testdata", WithEnabledAllowedIPCheck()) require.NoError(t, err) require.NotNil(t, validator) @@ -491,7 +491,7 @@ func readSampleEvent(t *testing.T, path string) json.RawMessage { } func TestValidate_geo_point(t *testing.T) { - validator, err := CreateValidatorForDataStream("../../test/packages/other/fields_tests/data_stream/first") + validator, err := CreateValidatorForDirectory("../../test/packages/other/fields_tests/data_stream/first") require.NoError(t, err) require.NotNil(t, validator) diff --git a/internal/testrunner/runners/pipeline/runner.go b/internal/testrunner/runners/pipeline/runner.go index faab8b3ce9..cdd5045f85 100644 --- a/internal/testrunner/runners/pipeline/runner.go +++ b/internal/testrunner/runners/pipeline/runner.go @@ -134,7 +134,7 @@ func (r *runner) run() ([]testrunner.TestResult, error) { } tr.TimeElapsed = time.Since(startTime) - fieldsValidator, err := fields.CreateValidatorForDataStream(dataStreamPath, + fieldsValidator, err := fields.CreateValidatorForDirectory(dataStreamPath, fields.WithNumericKeywordFields(tc.config.NumericKeywordFields), // explicitly enabled for pipeline tests only // since system tests can have dynamic public IPs diff --git a/internal/testrunner/runners/static/runner.go b/internal/testrunner/runners/static/runner.go index b5cc5dba93..418c152bae 100644 --- a/internal/testrunner/runners/static/runner.go +++ b/internal/testrunner/runners/static/runner.go @@ -89,7 +89,7 @@ func (r runner) verifySampleEvent() []testrunner.TestResult { return results } - fieldsValidator, err := fields.CreateValidatorForDataStream( + fieldsValidator, err := fields.CreateValidatorForDirectory( dataStreamPath, fields.WithDefaultNumericConversion()) if err != nil { diff --git a/internal/testrunner/runners/system/runner.go b/internal/testrunner/runners/system/runner.go index e7c018b868..27356a0cc6 100644 --- a/internal/testrunner/runners/system/runner.go +++ b/internal/testrunner/runners/system/runner.go @@ -447,7 +447,7 @@ func (r *runner) runTest(config *testConfig, ctxt servicedeployer.ServiceContext } // Validate fields in docs - fieldsValidator, err := fields.CreateValidatorForDataStream(serviceOptions.DataStreamRootPath, + fieldsValidator, err := fields.CreateValidatorForDirectory(serviceOptions.DataStreamRootPath, fields.WithNumericKeywordFields(config.NumericKeywordFields)) if err != nil { return result.WithError(errors.Wrapf(err, "creating fields validator for data stream failed (path: %s)", serviceOptions.DataStreamRootPath)) diff --git a/test/packages/other/sql_input/_dev/build/build.yml b/test/packages/other/sql_input/_dev/build/build.yml new file mode 100644 index 0000000000..57064cc41b --- /dev/null +++ b/test/packages/other/sql_input/_dev/build/build.yml @@ -0,0 +1,3 @@ +dependencies: + ecs: + reference: git@v8.2.0 diff --git a/test/packages/other/sql_input/_dev/build/docs/README.md b/test/packages/other/sql_input/_dev/build/docs/README.md new file mode 100644 index 0000000000..a8b6de005e --- /dev/null +++ b/test/packages/other/sql_input/_dev/build/docs/README.md @@ -0,0 +1,5 @@ +# SQL Input + +Hello from the SQL input package! + +{{fields}} \ No newline at end of file diff --git a/test/packages/other/sql_input/docs/README.md b/test/packages/other/sql_input/docs/README.md index 2023396ba2..04c3d0cc7b 100644 --- a/test/packages/other/sql_input/docs/README.md +++ b/test/packages/other/sql_input/docs/README.md @@ -1 +1,431 @@ -# SQL Input \ No newline at end of file +# SQL Input + +Hello from the SQL input package! + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @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. | date | +| agent.ephemeral_id | Ephemeral identifier of this agent (if one exists). This id normally changes across restarts, but `agent.id` does not. | keyword | +| agent.id | Unique identifier of this agent (if one exists). Example: For Beats this would be beat.id. | keyword | +| 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. | keyword | +| 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. | keyword | +| agent.version | Version of the agent. | keyword | +| as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| as.organization.name | Organization name. | keyword | +| as.organization.name.text | Multi-field of `as.organization.name`. | match_only_text | +| 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. | keyword | +| client.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| client.as.organization.name | Organization name. | keyword | +| client.as.organization.name.text | Multi-field of `client.as.organization.name`. | match_only_text | +| client.bytes | Bytes sent from the client to the server. | long | +| client.domain | The domain name of the client system. This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment. | keyword | +| client.geo.city_name | City name. | keyword | +| client.geo.continent_name | Name of the continent. | keyword | +| client.geo.country_iso_code | Country ISO code. | keyword | +| client.geo.country_name | Country name. | keyword | +| client.geo.location | Longitude and latitude. | geo_point | +| 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. | keyword | +| client.geo.region_iso_code | Region ISO code. | keyword | +| client.geo.region_name | Region name. | keyword | +| client.ip | IP address of the client (IPv4 or IPv6). | 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. | keyword | +| client.nat.ip | Translated IP of source based NAT sessions (e.g. internal client to internet). Typically connections traversing load balancers, firewalls, or routers. | 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. | long | +| client.packets | Packets sent from the client to the server. | long | +| client.port | Port of the client. | long | +| 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". | keyword | +| 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". | keyword | +| client.user.domain | Name of the directory the user is a member of. For example, an LDAP or Active Directory domain name. | keyword | +| client.user.email | User email address. | keyword | +| client.user.full_name | User's full name, if available. | keyword | +| client.user.full_name.text | Multi-field of `client.user.full_name`. | 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. | keyword | +| client.user.group.id | Unique identifier for the group on the system/platform. | keyword | +| client.user.group.name | Name of the group. | 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. | keyword | +| client.user.id | Unique identifier of the user. | keyword | +| client.user.name | Short name or login of the user. | keyword | +| client.user.name.text | Multi-field of `client.user.name`. | match_only_text | +| 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. | keyword | +| cloud.availability_zone | Availability zone in which this host, resource, or service is located. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host, resource, or service is located. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.image.tag | Container image tags. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| container.runtime | Runtime managing this container. | keyword | +| 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. | keyword | +| destination.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| destination.as.organization.name | Organization name. | keyword | +| destination.as.organization.name.text | Multi-field of `destination.as.organization.name`. | match_only_text | +| destination.bytes | Bytes sent from the destination to the source. | long | +| destination.domain | The domain name of the destination system. This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment. | keyword | +| destination.geo.city_name | City name. | keyword | +| destination.geo.continent_name | Name of the continent. | keyword | +| destination.geo.country_iso_code | Country ISO code. | keyword | +| destination.geo.country_name | Country name. | keyword | +| destination.geo.location | Longitude and latitude. | geo_point | +| 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. | keyword | +| destination.geo.region_iso_code | Region ISO code. | keyword | +| destination.geo.region_name | Region name. | keyword | +| destination.ip | IP address of the destination (IPv4 or IPv6). | 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. | keyword | +| destination.nat.ip | Translated ip of destination based NAT sessions (e.g. internet to private DMZ) Typically used with load balancers, firewalls, or routers. | ip | +| destination.nat.port | Port the source session is translated to by NAT Device. Typically used with load balancers, firewalls, or routers. | long | +| destination.packets | Packets sent from the destination to the source. | long | +| destination.port | Port of the destination. | long | +| 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". | keyword | +| 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". | keyword | +| destination.user.domain | Name of the directory the user is a member of. For example, an LDAP or Active Directory domain name. | keyword | +| destination.user.email | User email address. | keyword | +| destination.user.full_name | User's full name, if available. | keyword | +| destination.user.full_name.text | Multi-field of `destination.user.full_name`. | 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. | keyword | +| destination.user.group.id | Unique identifier for the group on the system/platform. | keyword | +| destination.user.group.name | Name of the group. | 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. | keyword | +| destination.user.id | Unique identifier of the user. | keyword | +| destination.user.name | Short name or login of the user. | keyword | +| destination.user.name.text | Multi-field of `destination.user.name`. | match_only_text | +| 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. | object | +| dns.answers.class | The class of DNS data contained in this resource record. | keyword | +| dns.answers.data | The data describing the resource. The meaning of this data depends on the type and class of the resource record. | keyword | +| 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. | keyword | +| 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. | long | +| dns.answers.type | The type of data contained in this resource record. | keyword | +| dns.header_flags | Array of 2 letter DNS header flags. Expected values are: AA, TC, RD, RA, AD, CD, DO. | keyword | +| dns.id | The DNS packet identifier assigned by the program that generated the query. The identifier is copied to the response. | keyword | +| 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. | keyword | +| dns.question.class | The class of records being queried. | keyword | +| 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. | keyword | +| 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". | keyword | +| 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. | keyword | +| 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". | keyword | +| dns.question.type | The type of record being queried. | keyword | +| 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. | ip | +| dns.response_code | The DNS response code. | keyword | +| 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. | keyword | +| 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. | keyword | +| error.code | Error code describing the error. | keyword | +| error.id | Unique identifier for the error. | keyword | +| error.message | Error message. | match_only_text | +| error.stack_trace | The stack trace of this error in plain text. | wildcard | +| error.stack_trace.text | Multi-field of `error.stack_trace`. | match_only_text | +| error.type | The type of the error, for example the class name of the exception. | keyword | +| 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. | keyword | +| 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. | keyword | +| 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. | keyword | +| 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. | date | +| 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. | long | +| event.end | event.end contains the date when the event ended or when the activity was last observed. | date | +| event.hash | Hash (perhaps logstash fingerprint) of raw field to be able to demonstrate log integrity. | keyword | +| event.id | Unique ID to describe the event. | keyword | +| 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`. | date | +| 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. | keyword | +| 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`. | keyword | +| 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. | keyword | +| 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). | keyword | +| event.risk_score | Risk score or priority of the event (e.g. security solutions). Use your system's original value here. | 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. | 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. | long | +| 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`. | long | +| event.start | event.start contains the date when the event started or when the activity was first observed. | 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"). | 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. | keyword | +| file.accessed | Last time the file was accessed. Note that not all filesystems keep track of access time. | date | +| file.created | File creation time. Note that not all filesystems store the creation time. | 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. | date | +| file.device | Device that is the source of the file. | keyword | +| file.directory | Directory where the file is located. It should include the drive letter, when appropriate. | 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"). | keyword | +| file.gid | Primary group ID (GID) of the file. | keyword | +| file.group | Primary group name of the file. | keyword | +| file.hash.md5 | MD5 hash. | keyword | +| file.hash.sha1 | SHA1 hash. | keyword | +| file.hash.sha256 | SHA256 hash. | keyword | +| file.hash.sha512 | SHA512 hash. | keyword | +| file.inode | Inode representing the file in the filesystem. | keyword | +| file.mode | Mode of the file in octal representation. | keyword | +| file.mtime | Last time the file content was modified. | date | +| file.name | Name of the file including the extension, without the directory. | keyword | +| file.owner | File owner's username. | keyword | +| file.path | Full path to the file, including the file name. It should include the drive letter, when appropriate. | keyword | +| file.path.text | Multi-field of `file.path`. | match_only_text | +| file.size | File size in bytes. Only relevant when `file.type` is "file". | long | +| file.target_path | Target path for symlinks. | keyword | +| file.target_path.text | Multi-field of `file.target_path`. | match_only_text | +| file.type | File type (file, dir, or symlink). | keyword | +| file.uid | The user ID (UID) or security identifier (SID) of the file owner. | keyword | +| geo.city_name | City name. | keyword | +| geo.continent_name | Name of the continent. | keyword | +| geo.country_iso_code | Country ISO code. | keyword | +| geo.country_name | Country name. | keyword | +| geo.location | Longitude and latitude. | geo_point | +| 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. | keyword | +| geo.region_iso_code | Region ISO code. | keyword | +| geo.region_name | Region name. | keyword | +| group.domain | Name of the directory the group is a member of. For example, an LDAP or Active Directory domain name. | keyword | +| group.id | Unique identifier for the group on the system/platform. | keyword | +| group.name | Name of the group. | keyword | +| hash.md5 | MD5 hash. | keyword | +| hash.sha1 | SHA1 hash. | keyword | +| hash.sha256 | SHA256 hash. | keyword | +| hash.sha512 | SHA512 hash. | keyword | +| host.architecture | Operating system architecture. | keyword | +| host.geo.city_name | City name. | keyword | +| host.geo.continent_name | Name of the continent. | keyword | +| host.geo.country_iso_code | Country ISO code. | keyword | +| host.geo.country_name | Country name. | keyword | +| host.geo.location | Longitude and latitude. | geo_point | +| 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. | keyword | +| host.geo.region_iso_code | Region ISO code. | keyword | +| host.geo.region_name | Region name. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | 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`. | keyword | +| host.ip | Host ip addresses. | 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. | keyword | +| 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. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.full | Operating system name, including the version or code name. | keyword | +| host.os.full.text | Multi-field of `host.os.full`. | match_only_text | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.name.text | Multi-field of `host.os.name`. | match_only_text | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| 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. | keyword | +| host.uptime | Seconds the host has been up. | long | +| http.request.body.bytes | Size in bytes of the request body. | long | +| http.request.body.content | The full HTTP request body. | wildcard | +| http.request.body.content.text | Multi-field of `http.request.body.content`. | match_only_text | +| http.request.bytes | Total size in bytes of the request (body and headers). | long | +| 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. | keyword | +| http.request.referrer | Referrer for this HTTP request. | keyword | +| http.response.body.bytes | Size in bytes of the response body. | long | +| http.response.body.content | The full HTTP response body. | wildcard | +| http.response.body.content.text | Multi-field of `http.response.body.content`. | match_only_text | +| http.response.bytes | Total size in bytes of the response (body and headers). | long | +| http.response.status_code | HTTP response status code. | long | +| http.version | HTTP version. | keyword | +| input.name | Sample field to be added. | constant_keyword | +| 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. | object | +| 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`. | keyword | +| 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. | keyword | +| log.origin.file.line | The line number of the file containing the source code which originated the log event. | long | +| 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`. | keyword | +| log.origin.function | The name of the function or method which originated the log event. | keyword | +| log.syslog | The Syslog metadata of the event, if the event was transmitted via Syslog. Please see RFCs 5424 or 3164. | 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. | long | +| log.syslog.facility.name | The Syslog text-based facility of the log event, if available. | keyword | +| 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. | long | +| 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`. | long | +| 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`. | keyword | +| 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. | match_only_text | +| 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. | keyword | +| network.bytes | Total bytes transferred in both directions. If `source.bytes` and `destination.bytes` are known, `network.bytes` is their sum. | long | +| 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. | keyword | +| 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. | keyword | +| network.forwarded_ip | Host IP address when the source IP address is the proxy. | ip | +| 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. | keyword | +| network.name | Name given by operators to sections of their network. | keyword | +| network.packets | Total packets transferred in both directions. If `source.packets` and `destination.packets` are known, `network.packets` is their sum. | long | +| 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. | keyword | +| 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. | keyword | +| 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. | keyword | +| observer.geo.city_name | City name. | keyword | +| observer.geo.continent_name | Name of the continent. | keyword | +| observer.geo.country_iso_code | Country ISO code. | keyword | +| observer.geo.country_name | Country name. | keyword | +| observer.geo.location | Longitude and latitude. | geo_point | +| 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. | keyword | +| observer.geo.region_iso_code | Region ISO code. | keyword | +| observer.geo.region_name | Region name. | keyword | +| observer.hostname | Hostname of the observer. | keyword | +| observer.ip | IP addresses of the observer. | 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. | keyword | +| 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. | keyword | +| observer.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| observer.os.full | Operating system name, including the version or code name. | keyword | +| observer.os.full.text | Multi-field of `observer.os.full`. | match_only_text | +| observer.os.kernel | Operating system kernel version as a raw string. | keyword | +| observer.os.name | Operating system name, without the version. | keyword | +| observer.os.name.text | Multi-field of `observer.os.name`. | match_only_text | +| observer.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| observer.os.version | Operating system version as a raw string. | keyword | +| observer.product | The product name of the observer. | keyword | +| observer.serial_number | Observer serial number. | 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`. | keyword | +| observer.vendor | Vendor name of the observer. | keyword | +| observer.version | Observer version. | keyword | +| organization.id | Unique identifier for the organization. | keyword | +| organization.name | Organization name. | keyword | +| organization.name.text | Multi-field of `organization.name`. | match_only_text | +| os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| os.full | Operating system name, including the version or code name. | keyword | +| os.full.text | Multi-field of `os.full`. | match_only_text | +| os.kernel | Operating system kernel version as a raw string. | keyword | +| os.name | Operating system name, without the version. | keyword | +| os.name.text | Multi-field of `os.name`. | match_only_text | +| os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| os.version | Operating system version as a raw string. | keyword | +| package.architecture | Package architecture. | keyword | +| package.checksum | Checksum of the installed package for verification. | keyword | +| package.description | Description of the package. | keyword | +| package.install_scope | Indicating how the package was installed, e.g. user-local, global. | keyword | +| package.installed | Time when package was installed. | 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/). | keyword | +| package.name | Package name | keyword | +| package.path | Path where the package is installed. | keyword | +| package.size | Package size in bytes. | long | +| package.version | Package version | keyword | +| process.args | Array of process arguments, starting with the absolute path to the executable. May be filtered to protect sensitive information. | keyword | +| process.executable | Absolute path to the process executable. | keyword | +| process.executable.text | Multi-field of `process.executable`. | match_only_text | +| process.hash.md5 | MD5 hash. | keyword | +| process.hash.sha1 | SHA1 hash. | keyword | +| process.hash.sha256 | SHA256 hash. | keyword | +| process.hash.sha512 | SHA512 hash. | keyword | +| process.name | Process name. Sometimes called program name or similar. | keyword | +| process.name.text | Multi-field of `process.name`. | match_only_text | +| process.parent.pid | Process id. | long | +| process.pgid | Deprecated for removal in next major version release. This field is superseded by `process.group_leader.pid`. Identifier of the group of processes the process belongs to. | long | +| process.pid | Process id. | long | +| process.start | The time the process started. | date | +| process.thread.id | Thread ID. | long | +| process.thread.name | Thread name. | keyword | +| 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. | keyword | +| process.title.text | Multi-field of `process.title`. | match_only_text | +| process.uptime | Seconds the process has been up. | long | +| process.working_directory | The working directory of the process. | keyword | +| process.working_directory.text | Multi-field of `process.working_directory`. | match_only_text | +| related.ip | All of the IPs seen on your event. | ip | +| 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. | keyword | +| server.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| server.as.organization.name | Organization name. | keyword | +| server.as.organization.name.text | Multi-field of `server.as.organization.name`. | match_only_text | +| server.bytes | Bytes sent from the server to the client. | long | +| server.domain | The domain name of the server system. This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment. | keyword | +| server.geo.city_name | City name. | keyword | +| server.geo.continent_name | Name of the continent. | keyword | +| server.geo.country_iso_code | Country ISO code. | keyword | +| server.geo.country_name | Country name. | keyword | +| server.geo.location | Longitude and latitude. | geo_point | +| 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. | keyword | +| server.geo.region_iso_code | Region ISO code. | keyword | +| server.geo.region_name | Region name. | keyword | +| server.ip | IP address of the server (IPv4 or IPv6). | 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. | keyword | +| server.nat.ip | Translated ip of destination based NAT sessions (e.g. internet to private DMZ) Typically used with load balancers, firewalls, or routers. | 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. | long | +| server.packets | Packets sent from the server to the client. | long | +| server.port | Port of the server. | long | +| 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". | keyword | +| 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". | keyword | +| server.user.domain | Name of the directory the user is a member of. For example, an LDAP or Active Directory domain name. | keyword | +| server.user.email | User email address. | keyword | +| server.user.full_name | User's full name, if available. | keyword | +| server.user.full_name.text | Multi-field of `server.user.full_name`. | 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. | keyword | +| server.user.group.id | Unique identifier for the group on the system/platform. | keyword | +| server.user.group.name | Name of the group. | 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. | keyword | +| server.user.id | Unique identifier of the user. | keyword | +| server.user.name | Short name or login of the user. | keyword | +| server.user.name.text | Multi-field of `server.user.name`. | match_only_text | +| service.ephemeral_id | Ephemeral identifier of this service (if one exists). This id normally changes across restarts, but `service.id` does not. | keyword | +| 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. | keyword | +| 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. | keyword | +| 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. | keyword | +| service.state | Current state of the service. | keyword | +| 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`. | keyword | +| 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. | keyword | +| 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. | keyword | +| source.as.number | Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet. | long | +| source.as.organization.name | Organization name. | keyword | +| source.as.organization.name.text | Multi-field of `source.as.organization.name`. | match_only_text | +| source.bytes | Bytes sent from the source to the destination. | long | +| source.domain | The domain name of the source system. This value may be a host name, a fully qualified domain name, or another host naming format. The value may derive from the original event or be added from enrichment. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.country_name | Country name. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| 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. | keyword | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| source.ip | IP address of the source (IPv4 or IPv6). | 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. | keyword | +| source.nat.ip | Translated ip of source based NAT sessions (e.g. internal client to internet) Typically connections traversing load balancers, firewalls, or routers. | 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. | long | +| source.packets | Packets sent from the source to the destination. | long | +| source.port | Port of the source. | long | +| 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". | keyword | +| 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". | keyword | +| source.user.domain | Name of the directory the user is a member of. For example, an LDAP or Active Directory domain name. | keyword | +| source.user.email | User email address. | keyword | +| source.user.full_name | User's full name, if available. | keyword | +| source.user.full_name.text | Multi-field of `source.user.full_name`. | 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. | keyword | +| source.user.group.id | Unique identifier for the group on the system/platform. | keyword | +| source.user.group.name | Name of the group. | 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. | keyword | +| source.user.id | Unique identifier of the user. | keyword | +| source.user.name | Short name or login of the user. | keyword | +| source.user.name.text | Multi-field of `source.user.name`. | match_only_text | +| tags | List of keywords used to tag each event. | keyword | +| 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. | keyword | +| 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/ ) | keyword | +| 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/) | keyword | +| 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/ ) | keyword | +| 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/) | keyword | +| 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/) | keyword | +| threat.technique.name.text | Multi-field of `threat.technique.name`. | 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/) | keyword | +| 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. | keyword | +| 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. | keyword | +| 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. | keyword | +| 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"). | keyword | +| url.fragment | Portion of the url after the `#`, such as "top". The `#` is not part of the fragment. | 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. | wildcard | +| url.full.text | Multi-field of `url.full`. | 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. | wildcard | +| url.original.text | Multi-field of `url.original`. | match_only_text | +| url.password | Password of the request. | keyword | +| url.path | Path of the request, such as "/search". | wildcard | +| url.port | Port of the request, such as 443. | long | +| 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. | 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". | keyword | +| url.scheme | Scheme of the request, such as "https". Note: The `:` is not part of the scheme. | keyword | +| 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". | keyword | +| url.username | Username of the request. | keyword | +| user.domain | Name of the directory the user is a member of. For example, an LDAP or Active Directory domain name. | keyword | +| user.email | User email address. | keyword | +| user.full_name | User's full name, if available. | keyword | +| user.full_name.text | Multi-field of `user.full_name`. | 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. | keyword | +| user.group.id | Unique identifier for the group on the system/platform. | keyword | +| user.group.name | Name of the group. | 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. | keyword | +| user.id | Unique identifier of the user. | keyword | +| user.name | Short name or login of the user. | keyword | +| user.name.text | Multi-field of `user.name`. | match_only_text | +| user_agent.device.name | Name of the device. | keyword | +| user_agent.name | Name of the user agent. | keyword | +| user_agent.original | Unparsed user_agent string. | keyword | +| user_agent.original.text | Multi-field of `user_agent.original`. | match_only_text | +| user_agent.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| user_agent.os.full | Operating system name, including the version or code name. | keyword | +| user_agent.os.full.text | Multi-field of `user_agent.os.full`. | match_only_text | +| user_agent.os.kernel | Operating system kernel version as a raw string. | keyword | +| user_agent.os.name | Operating system name, without the version. | keyword | +| user_agent.os.name.text | Multi-field of `user_agent.os.name`. | match_only_text | +| user_agent.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| user_agent.os.version | Operating system version as a raw string. | keyword | +| user_agent.version | Version of the user agent. | keyword | diff --git a/test/packages/other/sql_input/fields/ecs.yml b/test/packages/other/sql_input/fields/ecs.yml new file mode 100644 index 0000000000..8d3da9674b --- /dev/null +++ b/test/packages/other/sql_input/fields/ecs.yml @@ -0,0 +1,782 @@ +- external: ecs + name: '@timestamp' +- external: ecs + name: agent.ephemeral_id +- external: ecs + name: agent.id +- external: ecs + name: agent.name +- external: ecs + name: agent.type +- external: ecs + name: agent.version +- external: ecs + name: as.number +- external: ecs + name: as.organization.name +- external: ecs + name: client.address +- external: ecs + name: client.as.number +- external: ecs + name: client.as.organization.name +- external: ecs + name: client.bytes +- external: ecs + name: client.domain +- external: ecs + name: client.geo.city_name +- external: ecs + name: client.geo.continent_name +- external: ecs + name: client.geo.country_iso_code +- external: ecs + name: client.geo.country_name +- description: Longitude and latitude. + level: core + name: client.geo.location + type: geo_point +- external: ecs + name: client.geo.name +- external: ecs + name: client.geo.region_iso_code +- external: ecs + name: client.geo.region_name +- external: ecs + name: client.ip +- external: ecs + name: client.mac +- external: ecs + name: client.nat.ip +- external: ecs + name: client.nat.port +- external: ecs + name: client.packets +- external: ecs + name: client.port +- external: ecs + name: client.registered_domain +- external: ecs + name: client.top_level_domain +- external: ecs + name: client.user.domain +- external: ecs + name: client.user.email +- external: ecs + name: client.user.full_name +- external: ecs + name: client.user.group.domain +- external: ecs + name: client.user.group.id +- external: ecs + name: client.user.group.name +- external: ecs + name: client.user.hash +- external: ecs + name: client.user.id +- external: ecs + name: client.user.name +- external: ecs + name: cloud.account.id +- external: ecs + name: cloud.availability_zone +- external: ecs + name: cloud.instance.id +- external: ecs + name: cloud.instance.name +- external: ecs + name: cloud.machine.type +- external: ecs + name: cloud.provider +- external: ecs + name: cloud.region +- external: ecs + name: container.id +- external: ecs + name: container.image.name +- external: ecs + name: container.image.tag +- external: ecs + name: container.labels +- external: ecs + name: container.name +- external: ecs + name: container.runtime +- external: ecs + name: destination.address +- external: ecs + name: destination.as.number +- external: ecs + name: destination.as.organization.name +- external: ecs + name: destination.bytes +- external: ecs + name: destination.domain +- external: ecs + name: destination.geo.city_name +- external: ecs + name: destination.geo.continent_name +- external: ecs + name: destination.geo.country_iso_code +- external: ecs + name: destination.geo.country_name +- description: Longitude and latitude. + level: core + name: destination.geo.location + type: geo_point +- external: ecs + name: destination.geo.name +- external: ecs + name: destination.geo.region_iso_code +- external: ecs + name: destination.geo.region_name +- external: ecs + name: destination.ip +- external: ecs + name: destination.mac +- external: ecs + name: destination.nat.ip +- external: ecs + name: destination.nat.port +- external: ecs + name: destination.packets +- external: ecs + name: destination.port +- external: ecs + name: destination.registered_domain +- external: ecs + name: destination.top_level_domain +- external: ecs + name: destination.user.domain +- external: ecs + name: destination.user.email +- external: ecs + name: destination.user.full_name +- external: ecs + name: destination.user.group.domain +- external: ecs + name: destination.user.group.id +- external: ecs + name: destination.user.group.name +- external: ecs + name: destination.user.hash +- external: ecs + name: destination.user.id +- external: ecs + name: destination.user.name +- external: ecs + name: dns.answers +- external: ecs + name: dns.answers.class +- external: ecs + name: dns.answers.data +- external: ecs + name: dns.answers.name +- external: ecs + name: dns.answers.ttl +- external: ecs + name: dns.answers.type +- external: ecs + name: dns.header_flags +- external: ecs + name: dns.id +- external: ecs + name: dns.op_code +- external: ecs + name: dns.question.class +- external: ecs + name: dns.question.name +- external: ecs + name: dns.question.registered_domain +- external: ecs + name: dns.question.subdomain +- external: ecs + name: dns.question.top_level_domain +- external: ecs + name: dns.question.type +- external: ecs + name: dns.resolved_ip +- external: ecs + name: dns.response_code +- external: ecs + name: dns.type +- external: ecs + name: ecs.version +- external: ecs + name: error.code +- external: ecs + name: error.id +- external: ecs + name: error.message +- external: ecs + name: error.stack_trace +- external: ecs + name: error.type +- external: ecs + name: event.action +- external: ecs + name: event.category +- external: ecs + name: event.code +- external: ecs + name: event.created +- external: ecs + name: event.duration +- external: ecs + name: event.end +- external: ecs + name: event.hash +- external: ecs + name: event.id +- external: ecs + name: event.ingested +- external: ecs + name: event.kind +- external: ecs + name: event.original +- external: ecs + name: event.outcome +- external: ecs + name: event.provider +- external: ecs + name: event.risk_score +- external: ecs + name: event.risk_score_norm +- external: ecs + name: event.sequence +- external: ecs + name: event.severity +- external: ecs + name: event.start +- external: ecs + name: event.timezone +- external: ecs + name: event.type +- external: ecs + name: file.accessed +- external: ecs + name: file.created +- external: ecs + name: file.ctime +- external: ecs + name: file.device +- external: ecs + name: file.directory +- external: ecs + name: file.extension +- external: ecs + name: file.gid +- external: ecs + name: file.group +- external: ecs + name: file.hash.md5 +- external: ecs + name: file.hash.sha1 +- external: ecs + name: file.hash.sha256 +- external: ecs + name: file.hash.sha512 +- external: ecs + name: file.inode +- external: ecs + name: file.mode +- external: ecs + name: file.mtime +- external: ecs + name: file.name +- external: ecs + name: file.owner +- external: ecs + name: file.path +- external: ecs + name: file.size +- external: ecs + name: file.target_path +- external: ecs + name: file.type +- external: ecs + name: file.uid +- external: ecs + name: geo.city_name +- external: ecs + name: geo.continent_name +- external: ecs + name: geo.country_iso_code +- external: ecs + name: geo.country_name +- external: ecs + name: geo.location +- external: ecs + name: geo.name +- external: ecs + name: geo.region_iso_code +- external: ecs + name: geo.region_name +- external: ecs + name: group.domain +- external: ecs + name: group.id +- external: ecs + name: group.name +- external: ecs + name: hash.md5 +- external: ecs + name: hash.sha1 +- external: ecs + name: hash.sha256 +- external: ecs + name: hash.sha512 +- external: ecs + name: host.architecture +- external: ecs + name: host.geo.city_name +- external: ecs + name: host.geo.continent_name +- external: ecs + name: host.geo.country_iso_code +- external: ecs + name: host.geo.country_name +- description: Longitude and latitude. + level: core + name: host.geo.location + type: geo_point +- external: ecs + name: host.geo.name +- external: ecs + name: host.geo.region_iso_code +- external: ecs + name: host.geo.region_name +- external: ecs + name: host.hostname +- external: ecs + name: host.id +- external: ecs + name: host.ip +- external: ecs + name: host.mac +- external: ecs + name: host.name +- external: ecs + name: host.os.family +- external: ecs + name: host.os.full +- external: ecs + name: host.os.kernel +- external: ecs + name: host.os.name +- external: ecs + name: host.os.platform +- external: ecs + name: host.os.version +- external: ecs + name: host.type +- external: ecs + name: host.uptime +- external: ecs + name: http.request.body.bytes +- external: ecs + name: http.request.body.content +- external: ecs + name: http.request.bytes +- external: ecs + name: http.request.method +- external: ecs + name: http.request.referrer +- external: ecs + name: http.response.body.bytes +- external: ecs + name: http.response.body.content +- external: ecs + name: http.response.bytes +- external: ecs + name: http.response.status_code +- external: ecs + name: http.version +- external: ecs + name: labels +- external: ecs + name: log.level +- external: ecs + name: log.logger +- external: ecs + name: log.origin.file.line +- external: ecs + name: log.origin.file.name +- external: ecs + name: log.origin.function +- external: ecs + name: log.syslog +- external: ecs + name: log.syslog.facility.code +- external: ecs + name: log.syslog.facility.name +- external: ecs + name: log.syslog.priority +- external: ecs + name: log.syslog.severity.code +- external: ecs + name: log.syslog.severity.name +- external: ecs + name: message +- external: ecs + name: network.application +- external: ecs + name: network.bytes +- external: ecs + name: network.community_id +- external: ecs + name: network.direction +- external: ecs + name: network.forwarded_ip +- external: ecs + name: network.iana_number +- external: ecs + name: network.name +- external: ecs + name: network.packets +- external: ecs + name: network.protocol +- external: ecs + name: network.transport +- external: ecs + name: network.type +- external: ecs + name: observer.geo.city_name +- external: ecs + name: observer.geo.continent_name +- external: ecs + name: observer.geo.country_iso_code +- external: ecs + name: observer.geo.country_name +- description: Longitude and latitude. + level: core + name: observer.geo.location + type: geo_point +- external: ecs + name: observer.geo.name +- external: ecs + name: observer.geo.region_iso_code +- external: ecs + name: observer.geo.region_name +- external: ecs + name: observer.hostname +- external: ecs + name: observer.ip +- external: ecs + name: observer.mac +- external: ecs + name: observer.name +- external: ecs + name: observer.os.family +- external: ecs + name: observer.os.full +- external: ecs + name: observer.os.kernel +- external: ecs + name: observer.os.name +- external: ecs + name: observer.os.platform +- external: ecs + name: observer.os.version +- external: ecs + name: observer.product +- external: ecs + name: observer.serial_number +- external: ecs + name: observer.type +- external: ecs + name: observer.vendor +- external: ecs + name: observer.version +- external: ecs + name: organization.id +- external: ecs + name: organization.name +- external: ecs + name: os.family +- external: ecs + name: os.full +- external: ecs + name: os.kernel +- external: ecs + name: os.name +- external: ecs + name: os.platform +- external: ecs + name: os.version +- external: ecs + name: package.architecture +- external: ecs + name: package.checksum +- external: ecs + name: package.description +- external: ecs + name: package.install_scope +- external: ecs + name: package.installed +- external: ecs + name: package.license +- external: ecs + name: package.name +- external: ecs + name: package.path +- external: ecs + name: package.size +- external: ecs + name: package.version +- external: ecs + name: process.args +- external: ecs + name: process.executable +- external: ecs + name: process.hash.md5 +- external: ecs + name: process.hash.sha1 +- external: ecs + name: process.hash.sha256 +- external: ecs + name: process.hash.sha512 +- external: ecs + name: process.name +- external: ecs + name: process.pgid +- external: ecs + name: process.pid +- external: ecs + name: process.parent.pid +- external: ecs + name: process.start +- external: ecs + name: process.thread.id +- external: ecs + name: process.thread.name +- external: ecs + name: process.title +- external: ecs + name: process.uptime +- external: ecs + name: process.working_directory +- external: ecs + name: related.ip +- external: ecs + name: server.address +- external: ecs + name: server.as.number +- external: ecs + name: server.as.organization.name +- external: ecs + name: server.bytes +- external: ecs + name: server.domain +- external: ecs + name: server.geo.city_name +- external: ecs + name: server.geo.continent_name +- external: ecs + name: server.geo.country_iso_code +- external: ecs + name: server.geo.country_name +- description: Longitude and latitude. + level: core + name: server.geo.location + type: geo_point +- external: ecs + name: server.geo.name +- external: ecs + name: server.geo.region_iso_code +- external: ecs + name: server.geo.region_name +- external: ecs + name: server.ip +- external: ecs + name: server.mac +- external: ecs + name: server.nat.ip +- external: ecs + name: server.nat.port +- external: ecs + name: server.packets +- external: ecs + name: server.port +- external: ecs + name: server.registered_domain +- external: ecs + name: server.top_level_domain +- external: ecs + name: server.user.domain +- external: ecs + name: server.user.email +- external: ecs + name: server.user.full_name +- external: ecs + name: server.user.group.domain +- external: ecs + name: server.user.group.id +- external: ecs + name: server.user.group.name +- external: ecs + name: server.user.hash +- external: ecs + name: server.user.id +- external: ecs + name: server.user.name +- external: ecs + name: service.ephemeral_id +- external: ecs + name: service.id +- external: ecs + name: service.name +- external: ecs + name: service.node.name +- external: ecs + name: service.state +- external: ecs + name: service.type +- external: ecs + name: service.version +- external: ecs + name: source.address +- external: ecs + name: source.as.number +- external: ecs + name: source.as.organization.name +- external: ecs + name: source.bytes +- external: ecs + name: source.domain +- external: ecs + name: source.geo.city_name +- external: ecs + name: source.geo.continent_name +- external: ecs + name: source.geo.country_iso_code +- external: ecs + name: source.geo.country_name +- description: Longitude and latitude. + level: core + name: source.geo.location + type: geo_point +- external: ecs + name: source.geo.name +- external: ecs + name: source.geo.region_iso_code +- external: ecs + name: source.geo.region_name +- external: ecs + name: source.ip +- external: ecs + name: source.mac +- external: ecs + name: source.nat.ip +- external: ecs + name: source.nat.port +- external: ecs + name: source.packets +- external: ecs + name: source.port +- external: ecs + name: source.registered_domain +- external: ecs + name: source.top_level_domain +- external: ecs + name: source.user.domain +- external: ecs + name: source.user.email +- external: ecs + name: source.user.full_name +- external: ecs + name: source.user.group.domain +- external: ecs + name: source.user.group.id +- external: ecs + name: source.user.group.name +- external: ecs + name: source.user.hash +- external: ecs + name: source.user.id +- external: ecs + name: source.user.name +- external: ecs + name: tags +- external: ecs + name: threat.framework +- external: ecs + name: threat.tactic.id +- external: ecs + name: threat.tactic.name +- external: ecs + name: threat.tactic.reference +- external: ecs + name: threat.technique.id +- external: ecs + name: threat.technique.name +- external: ecs + name: threat.technique.reference +- external: ecs + name: trace.id +- external: ecs + name: transaction.id +- external: ecs + name: url.domain +- external: ecs + name: url.extension +- external: ecs + name: url.fragment +- external: ecs + name: url.full +- external: ecs + name: url.original +- external: ecs + name: url.password +- external: ecs + name: url.path +- external: ecs + name: url.port +- external: ecs + name: url.query +- external: ecs + name: url.registered_domain +- external: ecs + name: url.scheme +- external: ecs + name: url.top_level_domain +- external: ecs + name: url.username +- external: ecs + name: user.domain +- external: ecs + name: user.email +- external: ecs + name: user.full_name +- external: ecs + name: user.group.domain +- external: ecs + name: user.group.id +- external: ecs + name: user.group.name +- external: ecs + name: user.hash +- external: ecs + name: user.id +- external: ecs + name: user.name +- external: ecs + name: user_agent.device.name +- external: ecs + name: user_agent.name +- external: ecs + name: user_agent.original +- external: ecs + name: user_agent.os.family +- external: ecs + name: user_agent.os.full +- external: ecs + name: user_agent.os.kernel +- external: ecs + name: user_agent.os.name +- external: ecs + name: user_agent.os.platform +- external: ecs + name: user_agent.os.version +- external: ecs + name: user_agent.version