From 77d74292e21279786ef95e9a5c4c0ab06403595f Mon Sep 17 00:00:00 2001 From: Mathieu Martin Date: Thu, 25 Oct 2018 08:19:57 -0400 Subject: [PATCH] Rename `host.name` to `host.hostname`. (#144) This is to align with the industry's convention of using the word "hostname". --- CHANGELOG.md | 3 ++- README.md | 2 +- fields.yml | 4 ++-- schema.csv | 2 +- schemas/host.yml | 4 ++-- template.json | 8 ++++---- use-cases/kubernetes.md | 2 +- use-cases/kubernetes.yml | 2 +- use-cases/metricbeat.md | 2 +- use-cases/metricbeat.yml | 2 +- 10 files changed, 16 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7da08eb56..fdb4b8db46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,9 +18,10 @@ All notable changes to this project will be documented in this file based on the * Remove top level objects `kubernetes` and `tls`. #132 * Remove `*.timezone.offset.sec` fields as too specific for ECS at the moment. #134 * Make the following fields keyword: device.vendor, file.path, file.target_path, http.response.body, network.name, organization.name, url.href, url.path, url.query, user_agent.original -* Rename `url.host.name` to `url.hostname` to better align with industry convention. +* Rename `url.host.name` to `url.hostname` to better align with industry convention. #147 * Make the following fields keyword: device.vendor, file.path, file.target_path, http.response.body, network.name, organization.name, url.href, url.path, url.query, user_agent.original. #137 * Only two fields using `text` indexing at this time are `message` and `error.message`. +* Rename `host.name` to `host.hostname` to better align with industry convention. #144 ### Bugfixes diff --git a/README.md b/README.md index 6c5af604c2..6beb960336 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,7 @@ Normally the host information is related to the machine on which the event was g | Field | Description | Type | Multi Field | Example | |---|---|---|---|---| -| host.name | host.name is the hostname 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.hostname | Hostname 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.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 address. | ip | | | | host.mac | Host mac address. | keyword | | | diff --git a/fields.yml b/fields.yml index c443c6a903..35b64883de 100644 --- a/fields.yml +++ b/fields.yml @@ -632,11 +632,11 @@ type: group fields: - - name: name + - name: hostname level: core type: keyword description: > - host.name is the hostname of the host. + Hostname 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 diff --git a/schema.csv b/schema.csv index f40384a53e..561449762c 100644 --- a/schema.csv +++ b/schema.csv @@ -70,10 +70,10 @@ geo.country_iso_code,keyword,0, geo.location,geo_point,0, geo.region_name,keyword,0, host.architecture,keyword,0,x86_64 +host.hostname,keyword,0, host.id,keyword,0, host.ip,ip,0, host.mac,keyword,0, -host.name,keyword,0, host.os.family,keyword,0,debian host.os.name,keyword,0,Mac OS X host.os.platform,keyword,0,darwin diff --git a/schemas/host.yml b/schemas/host.yml index 3f11e4b99d..f453be59b4 100644 --- a/schemas/host.yml +++ b/schemas/host.yml @@ -11,11 +11,11 @@ type: group fields: - - name: name + - name: hostname level: core type: keyword description: > - host.name is the hostname of the host. + Hostname 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 diff --git a/template.json b/template.json index 60e781ac67..5f444136c1 100644 --- a/template.json +++ b/template.json @@ -334,6 +334,10 @@ "ignore_above": 1024, "type": "keyword" }, + "hostname": { + "ignore_above": 1024, + "type": "keyword" + }, "id": { "ignore_above": 1024, "type": "keyword" @@ -345,10 +349,6 @@ "ignore_above": 1024, "type": "keyword" }, - "name": { - "ignore_above": 1024, - "type": "keyword" - }, "os": { "properties": { "family": { diff --git a/use-cases/kubernetes.md b/use-cases/kubernetes.md index cce9d10f8b..552fab20b3 100644 --- a/use-cases/kubernetes.md +++ b/use-cases/kubernetes.md @@ -10,7 +10,7 @@ You can monitor containers running in a Kubernetes cluster by adding Kubernetes- |---|---|---|---|---| | [container.id](https://github.com/elastic/ecs#container.id) | Unique container id. | keyword | | `fdbef803fa2b` | | [container.name](https://github.com/elastic/ecs#container.name) | Container name. | keyword | | | -| [host.name](https://github.com/elastic/ecs#host.name) | host.name is the hostname 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 | | `kube-high-cpu-42` | +| [host.hostname](https://github.com/elastic/ecs#host.hostname) | Hostname 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 | | `kube-high-cpu-42` | | *kubernetes.pod.name* | *Kubernetes pod name* | keyword | | `foo-webserver` | | *kubernetes.namespace* | *Kubernetes namespace* | keyword | | `foo-team` | | *kubernetes.labels* | *Kubernetes labels map* | object | | | diff --git a/use-cases/kubernetes.yml b/use-cases/kubernetes.yml index be5c93d677..f4c46317f8 100644 --- a/use-cases/kubernetes.yml +++ b/use-cases/kubernetes.yml @@ -16,7 +16,7 @@ fields: - name: host fields: - - name: name + - name: hostname example: kube-high-cpu-42 - name: kubernetes diff --git a/use-cases/metricbeat.md b/use-cases/metricbeat.md index 64e0e56e8f..b47f2ec0a0 100644 --- a/use-cases/metricbeat.md +++ b/use-cases/metricbeat.md @@ -21,7 +21,7 @@ ECS fields used Metricbeat. | *error.** | *Error namespace
Use for errors which can happen during fetching information for a service.
* | | | | | [error.message](https://github.com/elastic/ecs#error.message) | Error message returned by the service during fetching metrics. | text | | | | [error.code](https://github.com/elastic/ecs#error.code) | Error code returned by the service during fetching metrics. | keyword | | | -| [host.name](https://github.com/elastic/ecs#host.name) | Hostname of the system metricbeat is running on or user defined name. | keyword | | | +| [host.hostname](https://github.com/elastic/ecs#host.hostname) | Hostname of the system metricbeat is running on or user defined name. | keyword | | | | *host.timezone.offset.sec* | *Timezone offset of the host in seconds.* | long | | | | [host.id](https://github.com/elastic/ecs#host.id) | Unique host id. | keyword | | | | [event.module](https://github.com/elastic/ecs#event.module) | Name of the module this data is coming from. | keyword | | `mysql` | diff --git a/use-cases/metricbeat.yml b/use-cases/metricbeat.yml index 1743370c60..bf27711edd 100644 --- a/use-cases/metricbeat.yml +++ b/use-cases/metricbeat.yml @@ -113,7 +113,7 @@ fields: - name: host fields: - - name: name + - name: hostname type: text description: > Hostname of the system metricbeat is running on or user defined name.