mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[6.x] [Infra UI] Patch the log sample dataset to be compatible with default log sources (#30060) (#30184)
Backports the following commits to 6.x: - [Infra UI] Patch the log sample dataset to be compatible with default log sources (#30060)
This commit is contained in:
parent
1d1a4f63d9
commit
ea8042042f
5 changed files with 13 additions and 5 deletions
|
@ -134,6 +134,10 @@ export const fieldMappings = {
|
|||
timestamp: {
|
||||
type: 'date'
|
||||
},
|
||||
'@timestamp': {
|
||||
type: 'alias',
|
||||
path: 'timestamp'
|
||||
},
|
||||
phpmemory: {
|
||||
type: 'long'
|
||||
},
|
||||
|
@ -149,4 +153,4 @@ export const fieldMappings = {
|
|||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -37,7 +37,9 @@ export async function calculateCardinalityOfNodeField(
|
|||
};
|
||||
|
||||
const resp = await search<CardinalityAggregation>({
|
||||
allow_no_indices: true,
|
||||
body,
|
||||
ignore_unavailable: true,
|
||||
index: `${sourceConfiguration.logAlias},${sourceConfiguration.metricAlias}`,
|
||||
});
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ export class InfraElasticsearchSourceStatusAdapter implements InfraSourceStatusA
|
|||
public async hasIndices(request: InfraFrameworkRequest, indexNames: string) {
|
||||
return await this.framework
|
||||
.callWithRequest(request, 'search', {
|
||||
ignore_unavailable: true,
|
||||
allow_no_indices: true,
|
||||
index: indexNames,
|
||||
size: 0,
|
||||
terminate_after: 1,
|
||||
|
|
|
@ -8,7 +8,7 @@ export const defaultSourceConfiguration = {
|
|||
name: 'Default',
|
||||
description: '',
|
||||
metricAlias: 'metricbeat-*',
|
||||
logAlias: 'filebeat-*',
|
||||
logAlias: 'filebeat-*,kibana_sample_data_logs*',
|
||||
fields: {
|
||||
container: 'docker.container.id',
|
||||
host: 'host.name',
|
||||
|
|
|
@ -36,7 +36,7 @@ const sourcesTests: KbnTestProvider = ({ getService }) => {
|
|||
// shipped default values
|
||||
expect(sourceConfiguration.name).to.be('Default');
|
||||
expect(sourceConfiguration.metricAlias).to.be('metricbeat-*');
|
||||
expect(sourceConfiguration.logAlias).to.be('filebeat-*');
|
||||
expect(sourceConfiguration.logAlias).to.be('filebeat-*,kibana_sample_data_logs*');
|
||||
expect(sourceConfiguration.fields.container).to.be('docker.container.id');
|
||||
expect(sourceConfiguration.fields.host).to.be('host.name');
|
||||
expect(sourceConfiguration.fields.pod).to.be('kubernetes.pod.uid');
|
||||
|
@ -107,7 +107,7 @@ const sourcesTests: KbnTestProvider = ({ getService }) => {
|
|||
expect(configuration.name).to.be('NAME');
|
||||
expect(configuration.description).to.be('');
|
||||
expect(configuration.metricAlias).to.be('metricbeat-*');
|
||||
expect(configuration.logAlias).to.be('filebeat-*');
|
||||
expect(configuration.logAlias).to.be('filebeat-*,kibana_sample_data_logs*');
|
||||
expect(configuration.fields.container).to.be('docker.container.id');
|
||||
expect(configuration.fields.host).to.be('host.name');
|
||||
expect(configuration.fields.pod).to.be('kubernetes.pod.uid');
|
||||
|
@ -285,7 +285,7 @@ const sourcesTests: KbnTestProvider = ({ getService }) => {
|
|||
expect(version).to.be.greaterThan(initialVersion);
|
||||
expect(updatedAt).to.be.greaterThan(createdAt);
|
||||
expect(configuration.metricAlias).to.be('metricbeat-**');
|
||||
expect(configuration.logAlias).to.be('filebeat-*');
|
||||
expect(configuration.logAlias).to.be('filebeat-*,kibana_sample_data_logs*');
|
||||
expect(status.logIndicesExist).to.be(true);
|
||||
expect(status.metricIndicesExist).to.be(true);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue