Skip to content

Commit

Permalink
[Infra UI] Clean up Docker and Kubernetes fields for ECS (#31175) (#3…
Browse files Browse the repository at this point in the history
…1300)

* [Infra UI] Clean up Docker and Kubernetes fields for ECS

* updating tests with latest ecs fields

* Fixing documentation
  • Loading branch information
simianhacker authored Feb 15, 2019
1 parent d9fa448 commit 8357f4c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/settings/general-infra-logs-ui-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

`xpack.infra.sources.default.fields.tiebreaker`:: Field used to break ties between two entries with the same timestamp. Defaults to `_doc`.

`xpack.infra.sources.default.fields.host`:: Field used to identify hosts. Defaults to `beat.hostname`.
`xpack.infra.sources.default.fields.host`:: Field used to identify hosts. Defaults to `host.name`.

`xpack.infra.sources.default.fields.container`:: Field used to identify Docker containers. Defaults to `docker.container.name`.
`xpack.infra.sources.default.fields.container`:: Field used to identify Docker containers. Defaults to `container.id`.

`xpack.infra.sources.default.fields.pod`:: Field used to identify Kubernetes pods. Defaults to `kubernetes.pod.name`.
`xpack.infra.sources.default.fields.pod`:: Field used to identify Kubernetes pods. Defaults to `kubernetes.pod.uid`.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const FieldsConfigurationPanel = ({
id="xpack.infra.sourceConfiguration.containerFieldDescription"
defaultMessage="Field used to identify Docker containers. The recommended value is {defaultValue}."
values={{
defaultValue: <EuiCode>docker.container.id</EuiCode>,
defaultValue: <EuiCode>container.id</EuiCode>,
}}
/>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const hostK8sOverview: InfraMetricModelCreator = (timeField, indexPattern
type: InfraMetricModelMetricType.max,
},
{
field: 'kubernetes.pod.name',
field: 'kubernetes.pod.uid',
id: 'card-pod-name',
type: InfraMetricModelMetricType.cardinality,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const hostK8sPodCap: InfraMetricModelCreator = (timeField, indexPattern,
id: 'used',
metrics: [
{
field: 'kubernetes.pod.name',
field: 'kubernetes.pod.uid',
id: 'avg-pod',
type: InfraMetricModelMetricType.cardinality,
},
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/infra/server/lib/sources/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const defaultSourceConfiguration = {
metricAlias: 'metricbeat-*',
logAlias: 'filebeat-*,kibana_sample_data_logs*',
fields: {
container: 'docker.container.id',
container: 'container.id',
host: 'host.name',
pod: 'kubernetes.pod.uid',
tiebreaker: '_doc',
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/api_integration/apis/infra/sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const sourcesTests: KbnTestProvider = ({ getService }) => {
expect(sourceConfiguration.name).to.be('Default');
expect(sourceConfiguration.metricAlias).to.be('metricbeat-*');
expect(sourceConfiguration.logAlias).to.be('filebeat-*,kibana_sample_data_logs*');
expect(sourceConfiguration.fields.container).to.be('docker.container.id');
expect(sourceConfiguration.fields.container).to.be('container.id');
expect(sourceConfiguration.fields.host).to.be('host.name');
expect(sourceConfiguration.fields.pod).to.be('kubernetes.pod.uid');

Expand Down Expand Up @@ -108,7 +108,7 @@ const sourcesTests: KbnTestProvider = ({ getService }) => {
expect(configuration.description).to.be('');
expect(configuration.metricAlias).to.be('metricbeat-*');
expect(configuration.logAlias).to.be('filebeat-*,kibana_sample_data_logs*');
expect(configuration.fields.container).to.be('docker.container.id');
expect(configuration.fields.container).to.be('container.id');
expect(configuration.fields.host).to.be('host.name');
expect(configuration.fields.pod).to.be('kubernetes.pod.uid');
expect(configuration.fields.tiebreaker).to.be('_doc');
Expand Down

0 comments on commit 8357f4c

Please sign in to comment.