Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Entity Analytics] [Entity Store] [API] Changes to support event.ingested as a configurable timestamp field for init and enable endpoints #208201

Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
134d938
Changes to support event.ingested as a configurable timestamp files f…
abhishekbhatia1710 Jan 24, 2025
3727e92
[CI] Auto-commit changed files from 'yarn openapi:bundle'
kibanamachine Jan 24, 2025
4b118da
[CI] Auto-commit changed files from 'make api-docs'
kibanamachine Jan 24, 2025
e7ef2de
Merge remote-tracking branch 'origin/main' into ea-11304-configurable…
abhishekbhatia1710 Jan 29, 2025
eac1779
Updating the savedObjects model version for the mappings addition
abhishekbhatia1710 Jan 29, 2025
dd49a9f
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine Jan 29, 2025
0df7975
[CI] Auto-commit changed files from 'node scripts/jest_integration -u…
kibanamachine Jan 29, 2025
11d45cb
Adding Changes for checkTypes fix
abhishekbhatia1710 Jan 29, 2025
e0d4dc0
Merge branch 'ea-11304-configurable-sync-timestamp-field' of https://…
abhishekbhatia1710 Jan 29, 2025
a26f522
Changes for checkTypes
abhishekbhatia1710 Jan 29, 2025
4ebc829
Merge branch 'main' into ea-11304-configurable-sync-timestamp-field
elasticmachine Jan 29, 2025
8142565
Removing changes unrelated to the PR
abhishekbhatia1710 Jan 29, 2025
f29f697
remove timestampField from start API docs
hop-dev Jan 29, 2025
f6994c1
remove timestampField config value
hop-dev Jan 29, 2025
6e07f95
[CI] Auto-commit changed files from 'yarn openapi:bundle'
kibanamachine Jan 29, 2025
2175566
[CI] Auto-commit changed files from 'make api-docs'
kibanamachine Jan 29, 2025
9a69854
Merge branch 'main' into ea-11304-configurable-sync-timestamp-field
hop-dev Jan 29, 2025
e5f1406
Merge branch 'ea-11304-configurable-sync-timestamp-field' of github.c…
hop-dev Jan 29, 2025
bd94162
remove body from start calls in tests
hop-dev Jan 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 40 additions & 3 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9808,6 +9808,10 @@ paths:
description: The lookback period for the entity store
pattern: '[smdh]$'
type: string
timestampField:
default: '@timestamp'
description: The field to use as the timestamp.
type: string
description: Schema for the entity store initialization
required: true
responses:
Expand Down Expand Up @@ -9925,6 +9929,10 @@ paths:
type: string
indexPattern:
$ref: '#/components/schemas/Security_Entity_Analytics_API_IndexPattern'
timestampField:
default: '@timestamp'
description: The field to use as the timestamp for the entity type.
type: string
description: Schema for the engine initialization
required: true
responses:
Expand All @@ -9948,6 +9956,18 @@ paths:
required: true
schema:
$ref: '#/components/schemas/Security_Entity_Analytics_API_EntityType'
requestBody:
content:
application/json; Elastic-Api-Version=2023-10-31:
schema:
type: object
properties:
timestampField:
default: '@timestamp'
description: The field to use as the timestamp for the entity type.
type: string
description: Schema for the engine start
required: false
responses:
'200':
content:
Expand Down Expand Up @@ -51324,6 +51344,8 @@ components:
type: string
status:
$ref: '#/components/schemas/Security_Entity_Analytics_API_EngineStatus'
timestampField:
type: string
type:
$ref: '#/components/schemas/Security_Entity_Analytics_API_EntityType'
required:
Expand Down Expand Up @@ -51451,6 +51473,12 @@ components:
required:
- name
- source
event:
type: object
properties:
ingested:
format: date-time
type: string
host:
type: object
properties:
Expand Down Expand Up @@ -51489,7 +51517,6 @@ components:
required:
- name
required:
- '@timestamp'
- host
- entity
Security_Entity_Analytics_API_IdField:
Expand Down Expand Up @@ -51596,6 +51623,12 @@ components:
required:
- name
- source
event:
type: object
properties:
ingested:
format: date-time
type: string
service:
type: object
properties:
Expand All @@ -51606,7 +51639,6 @@ components:
required:
- name
required:
- '@timestamp'
- service
- entity
Security_Entity_Analytics_API_StoreStatus:
Expand Down Expand Up @@ -51652,6 +51684,12 @@ components:
required:
- name
- source
event:
type: object
properties:
ingested:
format: date-time
type: string
user:
type: object
properties:
Expand Down Expand Up @@ -51686,7 +51724,6 @@ components:
required:
- name
required:
- '@timestamp'
- user
- entity
Security_Exceptions_API_CreateExceptionListItemComment:
Expand Down
43 changes: 40 additions & 3 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11898,6 +11898,10 @@ paths:
description: The lookback period for the entity store
pattern: '[smdh]$'
type: string
timestampField:
default: '@timestamp'
description: The field to use as the timestamp.
type: string
description: Schema for the entity store initialization
required: true
responses:
Expand Down Expand Up @@ -12011,6 +12015,10 @@ paths:
type: string
indexPattern:
$ref: '#/components/schemas/Security_Entity_Analytics_API_IndexPattern'
timestampField:
default: '@timestamp'
description: The field to use as the timestamp for the entity type.
type: string
description: Schema for the engine initialization
required: true
responses:
Expand All @@ -12033,6 +12041,18 @@ paths:
required: true
schema:
$ref: '#/components/schemas/Security_Entity_Analytics_API_EntityType'
requestBody:
content:
application/json; Elastic-Api-Version=2023-10-31:
schema:
type: object
properties:
timestampField:
default: '@timestamp'
description: The field to use as the timestamp for the entity type.
type: string
description: Schema for the engine start
required: false
responses:
'200':
content:
Expand Down Expand Up @@ -58015,6 +58035,8 @@ components:
type: string
status:
$ref: '#/components/schemas/Security_Entity_Analytics_API_EngineStatus'
timestampField:
type: string
type:
$ref: '#/components/schemas/Security_Entity_Analytics_API_EntityType'
required:
Expand Down Expand Up @@ -58142,6 +58164,12 @@ components:
required:
- name
- source
event:
type: object
properties:
ingested:
format: date-time
type: string
host:
type: object
properties:
Expand Down Expand Up @@ -58180,7 +58208,6 @@ components:
required:
- name
required:
- '@timestamp'
- host
- entity
Security_Entity_Analytics_API_IdField:
Expand Down Expand Up @@ -58287,6 +58314,12 @@ components:
required:
- name
- source
event:
type: object
properties:
ingested:
format: date-time
type: string
service:
type: object
properties:
Expand All @@ -58297,7 +58330,6 @@ components:
required:
- name
required:
- '@timestamp'
- service
- entity
Security_Entity_Analytics_API_StoreStatus:
Expand Down Expand Up @@ -58343,6 +58375,12 @@ components:
required:
- name
- source
event:
type: object
properties:
ingested:
format: date-time
type: string
user:
type: object
properties:
Expand Down Expand Up @@ -58377,7 +58415,6 @@ components:
required:
- name
required:
- '@timestamp'
- user
- entity
Security_Exceptions_API_CreateExceptionListItemComment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@
"filter",
"indexPattern",
"status",
"timestampField",
"type"
],
"epm-packages": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,9 @@
"status": {
"type": "keyword"
},
"timestampField": {
"type": "keyword"
},
"type": {
"type": "keyword"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
"enterprise_search_telemetry": "9ac912e1417fc8681e0cd383775382117c9e3d3d",
"entity-definition": "1c6bff35c423d5dc5650bc806cf2899e4706a0bc",
"entity-discovery-api-key": "c267a65c69171d1804362155c1378365f5acef88",
"entity-engine-status": "8cb7dcb13f5e2ea8f2e08dd4af72c110e2051120",
"entity-engine-status": "8c65ed80f9c653dc9cc5a2f21f2a4dd2bd3df46a",
"epm-packages": "8042d4a1522f6c4e6f5486e791b3ffe3a22f88fd",
"epm-packages-assets": "7a3e58efd9a14191d0d1a00b8aaed30a145fd0b1",
"event-annotation-group": "715ba867d8c68f3c9438052210ea1c30a9362582",
Expand Down
3 changes: 2 additions & 1 deletion x-pack/platform/plugins/shared/fleet/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ import type { DashboardStart } from '@kbn/dashboard-plugin/public';

import { Subject } from 'rxjs';

import type { AutomaticImportPluginStart } from '@kbn/automatic-import-plugin/public';

import type { FleetAuthz } from '../common';
import { appRoutesService, INTEGRATIONS_PLUGIN_ID, PLUGIN_ID, setupRouteService } from '../common';
import {
Expand Down Expand Up @@ -87,7 +89,6 @@ import type {
import { LazyCustomLogsAssetsExtension } from './lazy_custom_logs_assets_extension';
import { setCustomIntegrations, setCustomIntegrationsStart } from './services/custom_integrations';
import { getFleetDeepLinks } from './deep_links';
import type { AutomaticImportPluginStart } from '@kbn/automatic-import-plugin/public';

export type { FleetConfigType } from '../common/types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,19 @@ export const SearchSynonymsOverview = () => {
rightSideItems={[
<EuiFlexGroup alignItems="center">
<EuiFlexItem grow={false}>
<EuiLink>
<EuiLink data-test-subj="searchSynonymsSearchSynonymsOverviewApiDocumentationLink">
<FormattedMessage
id="xpack.searchSynonyms.synonymsSetDetail.documentationLink"
defaultMessage="API Documentation"
/>
</EuiLink>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton fill iconType="plusInCircle">
<EuiButton
data-test-subj="searchSynonymsSearchSynonymsOverviewCreateButton"
fill
iconType="plusInCircle"
>
<FormattedMessage
id="xpack.searchSynonyms.synonymsSetDetail.createButton"
defaultMessage="Create"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export const SynonymSets = () => {
}),
render: (name: string) => (
<div data-test-subj="synonyms-set-item-name">
<EuiLink onClick={() => application?.navigateToUrl(`${PLUGIN_ROUTE_ROOT}/sets/${name}`)}>
<EuiLink
data-test-subj="searchSynonymsColumnsLink"
onClick={() => application?.navigateToUrl(`${PLUGIN_ROUTE_ROOT}/sets/${name}`)}
>
{name}
</EuiLink>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,24 @@ export const SynonymsSetDetail = () => {
rightSideItems={[
<EuiFlexGroup alignItems="center">
<EuiFlexItem grow={false}>
<EuiButton color="text" iconType="endpoint">
<EuiButton
data-test-subj="searchSynonymsSynonymsSetDetailConnectToApiButton"
color="text"
iconType="endpoint"
>
<FormattedMessage
id="xpack.searchSynonyms.synonymsSetDetail.connectToApiButton"
defaultMessage="Connect to API"
/>
</EuiButton>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonIcon iconType="boxesHorizontal" size="m" color="text" />
<EuiButtonIcon
data-test-subj="searchSynonymsSynonymsSetDetailButton"
iconType="boxesHorizontal"
size="m"
color="text"
/>
</EuiFlexItem>
</EuiFlexGroup>,
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const SynonymsSetRuleTable = ({ synonymsSetId = '' }: { synonymsSetId: st
<EuiFlexGroup responsive={false}>
<EuiFlexItem grow={false}>
<EuiButtonIcon
data-test-subj="searchSynonymsColumnsButton"
iconType="expand"
aria-label={i18n.translate(
'xpack.searchSynonyms.synonymsSetTable.expandSynonyms.aria.label',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const EngineDescriptor = z.object({
.regex(/[smdh]$/)
.optional()
.default('24h'),
timestampField: z.string().optional(),
error: z.object({}).optional(),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ components:
type: string
default: 24h
pattern: '[smdh]$'
timestampField:
type: string
error:
type: object

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export const InitEntityStoreRequestBody = z.object({
filter: z.string().optional(),
entityTypes: z.array(EntityType).optional(),
enrichPolicyExecutionInterval: Interval.optional(),
/**
* The field to use as the timestamp.
*/
timestampField: z.string().optional().default('@timestamp'),
});
export type InitEntityStoreRequestBodyInput = z.input<typeof InitEntityStoreRequestBody>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ paths:
$ref: './common.schema.yaml#/components/schemas/EntityType'
enrichPolicyExecutionInterval:
$ref: './common.schema.yaml#/components/schemas/Interval'
timestampField:
type: string
description: The field to use as the timestamp.
default: '@timestamp'
responses:
'200':
description: Successful response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export const InitEntityEngineRequestBody = z.object({
indexPattern: IndexPattern.optional(),
filter: z.string().optional(),
enrichPolicyExecutionInterval: Interval.optional(),
/**
* The field to use as the timestamp for the entity type.
*/
timestampField: z.string().optional().default('@timestamp'),
});
export type InitEntityEngineRequestBodyInput = z.input<typeof InitEntityEngineRequestBody>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ paths:
type: string
enrichPolicyExecutionInterval:
$ref: '../common.schema.yaml#/components/schemas/Interval'
timestampField:
type: string
description: The field to use as the timestamp for the entity type.
default: '@timestamp'
responses:
'200':
description: Successful response
Expand Down
Loading