mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[File data visualizer] Adding ecs_compatibility setting for find structure calls (#139708)
* [File data visualizer] Adding ecs_compatibility setting for find structure calls * fixing tests
This commit is contained in:
parent
68e0a2aab2
commit
2b9faa0d12
2 changed files with 12 additions and 28 deletions
|
@ -22,6 +22,8 @@ export async function analyzeFile(
|
|||
const body = await client.asInternalUser.textStructure.findStructure(
|
||||
{
|
||||
body: data,
|
||||
// @ts-expect-error TextStructureFindStructureRequest type is out of date and doesn't include ecs_compatibility
|
||||
ecs_compatibility: 'v1',
|
||||
...overrides,
|
||||
},
|
||||
{ maxRetries: 0 }
|
||||
|
|
|
@ -18,7 +18,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
indexName: 'user-import_1',
|
||||
createIndexPattern: false,
|
||||
fieldTypeFilters: [ML_JOB_FIELD_TYPES.NUMBER, ML_JOB_FIELD_TYPES.DATE],
|
||||
fieldNameFilters: ['clientip'],
|
||||
fieldNameFilters: ['source.address'],
|
||||
expected: {
|
||||
results: {
|
||||
title: 'artificial_server_log',
|
||||
|
@ -26,21 +26,21 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
},
|
||||
metricFields: [
|
||||
{
|
||||
fieldName: 'bytes',
|
||||
fieldName: 'http.response.body.bytes',
|
||||
type: ML_JOB_FIELD_TYPES.NUMBER,
|
||||
docCountFormatted: '19 (100%)',
|
||||
statsMaxDecimalPlaces: 3,
|
||||
topValuesCount: 8,
|
||||
},
|
||||
{
|
||||
fieldName: 'httpversion',
|
||||
fieldName: 'http.version',
|
||||
type: ML_JOB_FIELD_TYPES.NUMBER,
|
||||
docCountFormatted: '19 (100%)',
|
||||
statsMaxDecimalPlaces: 3,
|
||||
topValuesCount: 1,
|
||||
},
|
||||
{
|
||||
fieldName: 'response',
|
||||
fieldName: 'http.response.status_code',
|
||||
type: ML_JOB_FIELD_TYPES.NUMBER,
|
||||
docCountFormatted: '19 (100%)',
|
||||
statsMaxDecimalPlaces: 3,
|
||||
|
@ -55,43 +55,25 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
exampleCount: 10,
|
||||
},
|
||||
{
|
||||
fieldName: 'agent',
|
||||
fieldName: 'user_agent.original',
|
||||
type: ML_JOB_FIELD_TYPES.KEYWORD,
|
||||
exampleCount: 8,
|
||||
docCountFormatted: '19 (100%)',
|
||||
},
|
||||
{
|
||||
fieldName: 'auth',
|
||||
fieldName: 'http.request.method',
|
||||
type: ML_JOB_FIELD_TYPES.KEYWORD,
|
||||
exampleCount: 1,
|
||||
docCountFormatted: '19 (100%)',
|
||||
},
|
||||
{
|
||||
fieldName: 'ident',
|
||||
type: ML_JOB_FIELD_TYPES.KEYWORD,
|
||||
exampleCount: 1,
|
||||
docCountFormatted: '19 (100%)',
|
||||
},
|
||||
{
|
||||
fieldName: 'verb',
|
||||
type: ML_JOB_FIELD_TYPES.KEYWORD,
|
||||
exampleCount: 1,
|
||||
docCountFormatted: '19 (100%)',
|
||||
},
|
||||
{
|
||||
fieldName: 'request',
|
||||
fieldName: 'url.original',
|
||||
type: ML_JOB_FIELD_TYPES.KEYWORD,
|
||||
exampleCount: 2,
|
||||
docCountFormatted: '19 (100%)',
|
||||
},
|
||||
{
|
||||
fieldName: 'referrer',
|
||||
type: ML_JOB_FIELD_TYPES.KEYWORD,
|
||||
exampleCount: 1,
|
||||
docCountFormatted: '19 (100%)',
|
||||
},
|
||||
{
|
||||
fieldName: 'clientip',
|
||||
fieldName: 'source.address',
|
||||
type: ML_JOB_FIELD_TYPES.IP,
|
||||
exampleCount: 7,
|
||||
docCountFormatted: '19 (100%)',
|
||||
|
@ -105,8 +87,8 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
],
|
||||
visibleMetricFieldsCount: 3,
|
||||
totalMetricFieldsCount: 3,
|
||||
populatedFieldsCount: 12,
|
||||
totalFieldsCount: 12,
|
||||
populatedFieldsCount: 9,
|
||||
totalFieldsCount: 9,
|
||||
fieldTypeFiltersResultCount: 4,
|
||||
fieldNameFiltersResultCount: 1,
|
||||
ingestedDocCount: 20,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue