mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
[ObsUX] Remove entities v2 code and Inventory (#224696)
Co-authored-by: Milton Hultgren <milton.hultgren@elastic.co> Co-authored-by: Caue Marcondes <caue.marcondes@elastic.co> Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
bd412c0f83
commit
c1563c2f45
367 changed files with 276 additions and 19992 deletions
|
@ -92,10 +92,6 @@
|
|||
"key": "cypress/profiling_cypress",
|
||||
"name": "Profiling - Cypress"
|
||||
},
|
||||
{
|
||||
"key": "cypress/inventory_cypress",
|
||||
"name": "Inventory - Cypress"
|
||||
},
|
||||
{
|
||||
"key": "cypress/cloud_security_posture",
|
||||
"name": "Cloud Security Posture - Cypress"
|
||||
|
|
|
@ -49,25 +49,6 @@ steps:
|
|||
- exit_status: '*'
|
||||
limit: 1
|
||||
|
||||
- command: .buildkite/scripts/steps/functional/inventory_cypress.sh
|
||||
label: 'Inventory Cypress Tests'
|
||||
agents:
|
||||
image: family/kibana-ubuntu-2004
|
||||
imageProject: elastic-images-prod
|
||||
provider: gcp
|
||||
machineType: n2-standard-4
|
||||
preemptible: true
|
||||
depends_on: build
|
||||
env:
|
||||
PING_SLACK_TEAM: "@obs-ux-infra_services-team"
|
||||
timeout_in_minutes: 120
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: '-1'
|
||||
limit: 3
|
||||
- exit_status: '*'
|
||||
limit: 1
|
||||
|
||||
- command: .buildkite/scripts/steps/test/scout_test_run_builder.sh
|
||||
label: 'Scout Test Run Builder'
|
||||
agents:
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
steps:
|
||||
- command: .buildkite/scripts/steps/functional/inventory_cypress.sh
|
||||
label: 'Inventory Cypress Tests'
|
||||
agents:
|
||||
machineType: n2-standard-4
|
||||
preemptible: true
|
||||
depends_on:
|
||||
- build
|
||||
- quick_checks
|
||||
- checks
|
||||
- linting
|
||||
- linting_with_types
|
||||
- check_types
|
||||
- check_oas_snapshot
|
||||
timeout_in_minutes: 120
|
||||
parallelism: 1
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: '-1'
|
||||
limit: 3
|
||||
- exit_status: '*'
|
||||
limit: 1
|
|
@ -99,16 +99,6 @@ const getPipeline = (filename: string, removeSteps = true) => {
|
|||
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml'));
|
||||
}
|
||||
|
||||
if (
|
||||
(await doAnyChangesMatch([
|
||||
/^x-pack\/solutions\/observability\/plugins\/inventory/,
|
||||
/^src\/platform\/packages\/shared\/kbn-apm-synthtrace/,
|
||||
])) ||
|
||||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
|
||||
) {
|
||||
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/inventory_cypress.yml'));
|
||||
}
|
||||
|
||||
if (
|
||||
(await doAnyChangesMatch([/^x-pack\/solutions\/observability\/plugins\/profiling/])) ||
|
||||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source .buildkite/scripts/common/util.sh
|
||||
|
||||
.buildkite/scripts/bootstrap.sh
|
||||
.buildkite/scripts/download_build_artifacts.sh
|
||||
.buildkite/scripts/copy_es_snapshot_cache.sh
|
||||
|
||||
export JOB=kibana-inventory-onboarding-cypress
|
||||
|
||||
echo "--- Observability Inventory Cypress Tests"
|
||||
|
||||
cd "$XPACK_DIR"
|
||||
|
||||
node solutions/observability/plugins/inventory/scripts/test/e2e.js \
|
||||
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
|
4
.github/CODEOWNERS
vendored
4
.github/CODEOWNERS
vendored
|
@ -1012,12 +1012,8 @@ x-pack/solutions/observability/packages/utils-server @elastic/observability-ui
|
|||
x-pack/solutions/observability/plugins/apm @elastic/obs-ux-infra_services-team
|
||||
x-pack/solutions/observability/plugins/apm_data_access @elastic/obs-ux-infra_services-team
|
||||
x-pack/solutions/observability/plugins/apm/ftr_e2e @elastic/obs-ux-infra_services-team
|
||||
x-pack/solutions/observability/plugins/entities_data_access @elastic/obs-entities
|
||||
x-pack/solutions/observability/plugins/entity_manager_app @elastic/obs-entities
|
||||
x-pack/solutions/observability/plugins/exploratory_view @elastic/obs-ux-management-team
|
||||
x-pack/solutions/observability/plugins/infra @elastic/obs-ux-logs-team @elastic/obs-ux-infra_services-team
|
||||
x-pack/solutions/observability/plugins/inventory @elastic/obs-ux-infra_services-team
|
||||
x-pack/solutions/observability/plugins/inventory/e2e @elastic/obs-ux-infra_services-team
|
||||
x-pack/solutions/observability/plugins/metrics_data_access @elastic/obs-ux-infra_services-team
|
||||
x-pack/solutions/observability/plugins/observability @elastic/obs-ux-management-team
|
||||
x-pack/solutions/observability/plugins/observability_ai_assistant_app @elastic/obs-ai-assistant
|
||||
|
|
|
@ -136,9 +136,7 @@ mapped_pages:
|
|||
| [embeddableEnhanced](enhanced-embeddables-plugin.md) | Enhances Embeddables by registering a custom factory provider. The enhanced factory provider adds dynamic actions to every embeddables state, in order to support drilldowns. |
|
||||
| [encryptedSavedObjects](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/encrypted_saved_objects/README.md) | The purpose of this plugin is to provide a way to encrypt/decrypt attributes on the custom Saved Objects that works with security and spaces filtering. |
|
||||
| [enterpriseSearch](https://github.com/elastic/kibana/blob/main/x-pack/solutions/search/plugins/enterprise_search/README.md) | This plugin provides Kibana user interfaces for managing the Enterprise Search solution and its products, App Search and Workplace Search. |
|
||||
| [entitiesDataAccess](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/entities_data_access/README.md) | Exposes services to access entities data. |
|
||||
| [entityManager](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/entity_manager/README.md) | This plugin provides access to observed entity data, such as information about hosts, pods, containers, services, and more. |
|
||||
| [entityManagerApp](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/entity_manager_app/README.md) | This plugin provides a user interface to interact with the Entity Manager. |
|
||||
| [eventLog](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/event_log/README.md) | The event log plugin provides a persistent history of alerting and action activities. |
|
||||
| [exploratoryView](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/exploratory_view/README.md) | A shared component for visualizing observability data types via lens embeddable. For further details. |
|
||||
| [features](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/features/README.md) | The features plugin enhance Kibana with a per-feature privilege system. |
|
||||
|
@ -157,7 +155,6 @@ mapped_pages:
|
|||
| [infra](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/infra/README.md) | This is the home of the infra plugin, which aims to provide a solution for the infrastructure monitoring use-case within Kibana. |
|
||||
| [ingestPipelines](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/ingest_pipelines/README.md) | The ingest_pipelines plugin provides Kibana support for Elasticsearch's ingest pipelines. |
|
||||
| [intercepts](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/private/intercepts/README.md) | Contains business logic and orchestration for displaying the intercept dialog suited to the needs of Kibana, and is made available so that other solution teams might leverage this to register and schedule an intercept of their choosing |
|
||||
| [inventory](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/inventory/README.md) | Home of the Inventory plugin, which renders the... inventory. |
|
||||
| [lens](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/lens/readme.md) | Lens is a visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. |
|
||||
| [licenseApiGuard](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/private/license_api_guard/README.md) | This plugin is used by ES UI plugins to reject API requests when the plugin is unsupported by the user's license. |
|
||||
| [licenseManagement](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/license_management/README.md) | This plugin enables users to activate a trial license, downgrade to Basic, and upload a new license. |
|
||||
|
|
|
@ -505,10 +505,8 @@
|
|||
"@kbn/encrypted-saved-objects-plugin": "link:x-pack/platform/plugins/shared/encrypted_saved_objects",
|
||||
"@kbn/encrypted-saved-objects-shared": "link:src/platform/packages/shared/kbn-encrypted-saved-objects-shared",
|
||||
"@kbn/enterprise-search-plugin": "link:x-pack/solutions/search/plugins/enterprise_search",
|
||||
"@kbn/entities-data-access-plugin": "link:x-pack/solutions/observability/plugins/entities_data_access",
|
||||
"@kbn/entities-schema": "link:x-pack/platform/packages/shared/kbn-entities-schema",
|
||||
"@kbn/entity-manager-fixture-plugin": "link:x-pack/platform/test/api_integration/apis/entity_manager/fixture_plugin",
|
||||
"@kbn/entityManager-app-plugin": "link:x-pack/solutions/observability/plugins/entity_manager_app",
|
||||
"@kbn/entityManager-plugin": "link:x-pack/platform/plugins/shared/entity_manager",
|
||||
"@kbn/error-boundary-example-plugin": "link:examples/error_boundary",
|
||||
"@kbn/es-errors": "link:src/platform/packages/shared/kbn-es-errors",
|
||||
|
@ -617,7 +615,6 @@
|
|||
"@kbn/interactive-setup-test-endpoints-plugin": "link:src/platform/test/interactive_setup_api_integration/plugins/test_endpoints",
|
||||
"@kbn/intercepts-plugin": "link:x-pack/platform/plugins/private/intercepts",
|
||||
"@kbn/interpreter": "link:src/platform/packages/shared/kbn-interpreter",
|
||||
"@kbn/inventory-plugin": "link:x-pack/solutions/observability/plugins/inventory",
|
||||
"@kbn/io-ts-utils": "link:src/platform/packages/shared/kbn-io-ts-utils",
|
||||
"@kbn/ipynb": "link:x-pack/solutions/search/packages/kbn-ipynb",
|
||||
"@kbn/item-buffer": "link:src/platform/packages/private/kbn-item-buffer",
|
||||
|
@ -1537,7 +1534,6 @@
|
|||
"@kbn/import-locator": "link:packages/kbn-import-locator",
|
||||
"@kbn/import-resolver": "link:src/platform/packages/private/kbn-import-resolver",
|
||||
"@kbn/inference-cli": "link:x-pack/platform/packages/shared/kbn-inference-cli",
|
||||
"@kbn/inventory-e2e": "link:x-pack/solutions/observability/plugins/inventory/e2e",
|
||||
"@kbn/jest-serializers": "link:src/platform/packages/private/kbn-jest-serializers",
|
||||
"@kbn/journeys": "link:src/platform/packages/private/kbn-journeys",
|
||||
"@kbn/json-ast": "link:packages/kbn-json-ast",
|
||||
|
|
|
@ -43,8 +43,6 @@ pageLoadAssetSize:
|
|||
embeddableAlertsTable: 19615
|
||||
embeddableEnhanced: 22107
|
||||
enterpriseSearch: 66810
|
||||
entityManager: 17175
|
||||
entityManagerApp: 20378
|
||||
esql: 37000
|
||||
esqlDataGrid: 24582
|
||||
esUiShared: 326654
|
||||
|
@ -83,7 +81,6 @@ pageLoadAssetSize:
|
|||
inspector: 18000
|
||||
interactiveSetup: 80000
|
||||
intercepts: 26158
|
||||
inventory: 27430
|
||||
kibanaOverview: 56279
|
||||
kibanaReact: 74422
|
||||
kibanaUsageCollection: 16463
|
||||
|
|
|
@ -40,7 +40,6 @@ export const storybookAliases = {
|
|||
grouping: 'src/platform/packages/shared/kbn-grouping/.storybook',
|
||||
home: 'src/platform/plugins/shared/home/.storybook',
|
||||
infra: 'x-pack/solutions/observability/plugins/infra/.storybook',
|
||||
inventory: 'x-pack/solutions/observability/plugins/inventory/.storybook',
|
||||
kibana_react: 'src/platform/plugins/shared/kibana_react/.storybook',
|
||||
language_documentation_popover:
|
||||
'src/platform/packages/private/kbn-language-documentation/.storybook',
|
||||
|
@ -50,7 +49,6 @@ export const storybookAliases = {
|
|||
'x-pack/solutions/observability/plugins/observability_ai_assistant_app/.storybook',
|
||||
observability_ai_assistant:
|
||||
'x-pack/platform/plugins/shared/observability_ai_assistant/.storybook',
|
||||
observability_inventory: 'x-pack/solutions/observability/plugins/inventory/.storybook',
|
||||
observability_shared: 'x-pack/solutions/observability/plugins/observability_shared/.storybook',
|
||||
observability_slo: 'x-pack/solutions/observability/plugins/slo/.storybook',
|
||||
observability: 'x-pack/solutions/observability/plugins/observability/.storybook',
|
||||
|
|
|
@ -54,4 +54,3 @@ export {
|
|||
export { log, type LogDocument, LONG_FIELD_NAME } from './src/lib/logs';
|
||||
export { otelLog, type OtelLogDocument } from './src/lib/otel_logs';
|
||||
export { syntheticsMonitor, type SyntheticsMonitorDocument } from './src/lib/synthetics';
|
||||
export { type EntityFields, entities } from './src/lib/entities';
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { EntityDataStreamType, EntityFields } from '.';
|
||||
import { Serializable } from '../serializable';
|
||||
|
||||
class ContainerEntity extends Serializable<EntityFields> {
|
||||
constructor(fields: EntityFields) {
|
||||
super({
|
||||
...fields,
|
||||
'entity.type': 'container',
|
||||
'entity.definition_id': 'builtin_containers_from_ecs_data',
|
||||
'entity.identity_fields': ['container.id'],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function containerEntity({
|
||||
agentName,
|
||||
dataStreamType,
|
||||
containerId,
|
||||
entityId,
|
||||
}: {
|
||||
agentName: string[];
|
||||
dataStreamType: EntityDataStreamType[];
|
||||
containerId: string;
|
||||
entityId: string;
|
||||
}) {
|
||||
return new ContainerEntity({
|
||||
'source_data_stream.type': dataStreamType,
|
||||
'agent.name': agentName,
|
||||
'container.id': containerId,
|
||||
'entity.display_name': containerId,
|
||||
'entity.id': entityId,
|
||||
});
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { EntityDataStreamType, EntityFields } from '.';
|
||||
import { Serializable } from '../serializable';
|
||||
|
||||
class HostEntity extends Serializable<EntityFields> {
|
||||
constructor(fields: EntityFields) {
|
||||
super({
|
||||
...fields,
|
||||
'entity.type': 'host',
|
||||
'entity.definition_id': 'builtin_hosts_from_ecs_data',
|
||||
'entity.identity_fields': ['host.name'],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function hostEntity({
|
||||
agentName,
|
||||
dataStreamType,
|
||||
hostName,
|
||||
entityId,
|
||||
}: {
|
||||
agentName: string[];
|
||||
dataStreamType: EntityDataStreamType[];
|
||||
hostName: string;
|
||||
entityId: string;
|
||||
}) {
|
||||
return new HostEntity({
|
||||
'source_data_stream.type': dataStreamType,
|
||||
'agent.name': agentName,
|
||||
'host.name': hostName,
|
||||
'entity.display_name': hostName,
|
||||
'entity.id': entityId,
|
||||
});
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Fields } from '../entity';
|
||||
import { serviceEntity } from './service_entity';
|
||||
import { hostEntity } from './host_entity';
|
||||
import { containerEntity } from './container_entity';
|
||||
import { k8sClusterJobEntity } from './kubernetes/cluster_entity';
|
||||
import { k8sCronJobEntity } from './kubernetes/cron_job_entity';
|
||||
import { k8sDaemonSetEntity } from './kubernetes/daemon_set_entity';
|
||||
import { k8sDeploymentEntity } from './kubernetes/deployment_entity';
|
||||
import { k8sJobEntity } from './kubernetes/job_entity';
|
||||
import { k8sNodeEntity } from './kubernetes/node_entity';
|
||||
import { k8sPodEntity } from './kubernetes/pod_entity';
|
||||
import { k8sReplicaSetEntity } from './kubernetes/replica_set';
|
||||
import { k8sStatefulSetEntity } from './kubernetes/stateful_set';
|
||||
import { k8sServiceEntity } from './kubernetes/service';
|
||||
import { k8sContainerEntity } from './kubernetes/container_entity';
|
||||
|
||||
export type EntityDataStreamType = 'metrics' | 'logs' | 'traces';
|
||||
export type Schema = 'ecs' | 'otel';
|
||||
|
||||
export type EntityFields = Fields &
|
||||
Partial<{
|
||||
'agent.name': string[];
|
||||
'source_data_stream.type': string | string[];
|
||||
'source_data_stream.dataset': string | string[];
|
||||
'event.ingested': string;
|
||||
source_index: string;
|
||||
'entity.last_seen_timestamp': string;
|
||||
'entity.schema_version': string;
|
||||
'entity.definition_version': string;
|
||||
'entity.display_name': string;
|
||||
'entity.identity_fields': string | string[];
|
||||
'entity.id': string;
|
||||
'entity.type': string;
|
||||
'entity.definition_id': string;
|
||||
[key: string]: any;
|
||||
}>;
|
||||
|
||||
export const entities = {
|
||||
serviceEntity,
|
||||
hostEntity,
|
||||
containerEntity,
|
||||
k8s: {
|
||||
k8sClusterJobEntity,
|
||||
k8sCronJobEntity,
|
||||
k8sDaemonSetEntity,
|
||||
k8sDeploymentEntity,
|
||||
k8sJobEntity,
|
||||
k8sNodeEntity,
|
||||
k8sPodEntity,
|
||||
k8sReplicaSetEntity,
|
||||
k8sStatefulSetEntity,
|
||||
k8sServiceEntity,
|
||||
k8sContainerEntity,
|
||||
},
|
||||
};
|
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Schema } from '..';
|
||||
import { K8sEntity } from '.';
|
||||
|
||||
export function k8sClusterJobEntity({
|
||||
schema,
|
||||
name,
|
||||
entityId,
|
||||
...others
|
||||
}: {
|
||||
schema: Schema;
|
||||
name: string;
|
||||
entityId: string;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
if (schema === 'ecs') {
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'cluster',
|
||||
'entity.type': 'cluster',
|
||||
'orchestrator.cluster.name': name,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
||||
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'cluster',
|
||||
'entity.type': 'cluster',
|
||||
'k8s.cluster.uid': name,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Schema } from '..';
|
||||
import { K8sEntity } from '.';
|
||||
|
||||
export function k8sContainerEntity({
|
||||
schema,
|
||||
id,
|
||||
entityId,
|
||||
...others
|
||||
}: {
|
||||
schema: Schema;
|
||||
id: string;
|
||||
entityId: string;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
if (schema === 'ecs') {
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'container',
|
||||
'entity.type': 'container',
|
||||
'kubernetes.container.id': id,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
||||
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'container',
|
||||
'entity.type': 'container',
|
||||
'container.id': id,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Schema } from '..';
|
||||
import { K8sEntity } from '.';
|
||||
|
||||
export function k8sCronJobEntity({
|
||||
schema,
|
||||
name,
|
||||
uid,
|
||||
clusterName,
|
||||
entityId,
|
||||
...others
|
||||
}: {
|
||||
schema: Schema;
|
||||
name: string;
|
||||
uid?: string;
|
||||
clusterName?: string;
|
||||
entityId: string;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
if (schema === 'ecs') {
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'cron_job',
|
||||
'entity.type': 'cronjob',
|
||||
'kubernetes.cronjob.name': name,
|
||||
'kubernetes.namespace': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
||||
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'cron_job',
|
||||
'entity.type': 'cronjob',
|
||||
'k8s.cronjob.name': name,
|
||||
'k8s.cronjob.uid': uid,
|
||||
'k8s.cluster.name': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Schema } from '..';
|
||||
import { K8sEntity } from '.';
|
||||
|
||||
export function k8sDaemonSetEntity({
|
||||
schema,
|
||||
name,
|
||||
uid,
|
||||
clusterName,
|
||||
entityId,
|
||||
...others
|
||||
}: {
|
||||
schema: Schema;
|
||||
name: string;
|
||||
uid?: string;
|
||||
clusterName?: string;
|
||||
entityId: string;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
if (schema === 'ecs') {
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'daemon_set',
|
||||
'entity.type': 'daemonset',
|
||||
'kubernetes.daemonset.name': name,
|
||||
'kubernetes.daemonset.uid': uid,
|
||||
'kubernetes.namespace': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
||||
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'daemon_set',
|
||||
'entity.type': 'daemonset',
|
||||
'k8s.daemonset.name': name,
|
||||
'k8s.daemonset.uid': uid,
|
||||
'k8s.cluster.name': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Schema } from '..';
|
||||
import { K8sEntity } from '.';
|
||||
|
||||
export function k8sDeploymentEntity({
|
||||
schema,
|
||||
name,
|
||||
uid,
|
||||
clusterName,
|
||||
entityId,
|
||||
...others
|
||||
}: {
|
||||
schema: Schema;
|
||||
name: string;
|
||||
uid?: string;
|
||||
clusterName?: string;
|
||||
entityId: string;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
if (schema === 'ecs') {
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'deployment',
|
||||
'entity.type': 'deployment',
|
||||
'kubernetes.deployment.name': name,
|
||||
'kubernetes.namespace': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
||||
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'deployment',
|
||||
'entity.type': 'deployment',
|
||||
'k8s.deployment.name': name,
|
||||
'k8s.deployment.uid': uid,
|
||||
'k8s.cluster.name': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import type { EntityFields, Schema } from '..';
|
||||
import { Serializable } from '../../serializable';
|
||||
|
||||
const identityFieldsMap: Record<Schema, Record<string, string[]>> = {
|
||||
ecs: {
|
||||
pod: ['kubernetes.pod.uid'],
|
||||
cluster: ['orchestrator.cluster.name'],
|
||||
cronjob: ['kubernetes.cronjob.name'],
|
||||
daemonset: ['kubernetes.daemonset.name'],
|
||||
deployment: ['kubernetes.deployment.name'],
|
||||
job: ['kubernetes.job.name'],
|
||||
node: ['kubernetes.node.name'],
|
||||
replicaset: ['kubernetes.replicaset.name'],
|
||||
statefulset: ['kubernetes.statefulset.name'],
|
||||
service: ['kubernetes.service.name'],
|
||||
container: ['kubernetes.container.id'],
|
||||
},
|
||||
otel: {
|
||||
pod: ['k8s.pod.uid'],
|
||||
cluster: ['k8s.cluster.uid'],
|
||||
cronjob: ['k8s.cronjob.uid'],
|
||||
daemonset: ['k8s.daemonset.uid'],
|
||||
deployment: ['k8s.deployment.uid'],
|
||||
job: ['k8s.job.uid'],
|
||||
node: ['k8s.node.uid'],
|
||||
replicaset: ['k8s.replicaset.uid'],
|
||||
statefulset: ['k8s.statefulset.uid'],
|
||||
container: ['container.id'],
|
||||
},
|
||||
};
|
||||
|
||||
export class K8sEntity extends Serializable<EntityFields> {
|
||||
constructor(schema: Schema, fields: EntityFields) {
|
||||
const entityType = fields['entity.type'];
|
||||
if (entityType === undefined) {
|
||||
throw new Error(`Entity type not defined`);
|
||||
}
|
||||
|
||||
const entityDefinitionId = fields['entity.definition_id'];
|
||||
if (entityDefinitionId === undefined) {
|
||||
throw new Error(`Entity definition id not defined`);
|
||||
}
|
||||
|
||||
const entityDefinitionWithSchema = `kubernetes_${entityDefinitionId}_${
|
||||
schema === 'ecs' ? schema : 'semconv'
|
||||
}`;
|
||||
const identityFields = identityFieldsMap[schema][entityType];
|
||||
if (identityFields === undefined || identityFields.length === 0) {
|
||||
throw new Error(
|
||||
`Identity fields not defined for schema: ${schema} and entity type: ${entityType}`
|
||||
);
|
||||
}
|
||||
|
||||
super({
|
||||
...fields,
|
||||
'entity.type': `k8s.${entityType}.${schema}`,
|
||||
'entity.definition_id': `builtin_${entityDefinitionWithSchema}`,
|
||||
'entity.identity_fields': identityFields,
|
||||
'entity.display_name': getDisplayName({ identityFields, fields }),
|
||||
'entity.definition_version': '1.0.0',
|
||||
'entity.schema_version': '1.0',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getDisplayName({
|
||||
identityFields,
|
||||
fields,
|
||||
}: {
|
||||
identityFields: string[];
|
||||
fields: EntityFields;
|
||||
}) {
|
||||
return identityFields
|
||||
.map((field) => fields[field])
|
||||
.filter((_) => _)
|
||||
.join(':');
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Schema } from '..';
|
||||
import { K8sEntity } from '.';
|
||||
|
||||
export function k8sJobEntity({
|
||||
schema,
|
||||
name,
|
||||
uid,
|
||||
clusterName,
|
||||
entityId,
|
||||
...others
|
||||
}: {
|
||||
schema: Schema;
|
||||
name: string;
|
||||
uid?: string;
|
||||
clusterName?: string;
|
||||
entityId: string;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
if (schema === 'ecs') {
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'job',
|
||||
'entity.type': 'job',
|
||||
'kubernetes.job.name': name,
|
||||
'kubernetes.namespace': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
||||
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'job',
|
||||
'entity.type': 'job',
|
||||
'k8s.job.name': name,
|
||||
'k8s.job.uid': uid,
|
||||
'k8s.cluster.name': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Schema } from '..';
|
||||
import { K8sEntity } from '.';
|
||||
|
||||
export function k8sNodeEntity({
|
||||
schema,
|
||||
name,
|
||||
uid,
|
||||
clusterName,
|
||||
entityId,
|
||||
...others
|
||||
}: {
|
||||
schema: Schema;
|
||||
name: string;
|
||||
uid?: string;
|
||||
clusterName?: string;
|
||||
entityId: string;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
if (schema === 'ecs') {
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'node',
|
||||
'entity.type': 'node',
|
||||
'kubernetes.node.name': name,
|
||||
'kubernetes.namespace': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
||||
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'node',
|
||||
'entity.type': 'node',
|
||||
'k8s.node.uid': uid,
|
||||
'k8s.cluster.name': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Schema } from '..';
|
||||
import { K8sEntity } from '.';
|
||||
|
||||
export function k8sPodEntity({
|
||||
schema,
|
||||
name,
|
||||
uid,
|
||||
clusterName,
|
||||
entityId,
|
||||
...others
|
||||
}: {
|
||||
schema: Schema;
|
||||
name: string;
|
||||
uid?: string;
|
||||
clusterName?: string;
|
||||
entityId: string;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
if (schema === 'ecs') {
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'pod',
|
||||
'entity.type': 'pod',
|
||||
'kubernetes.pod.name': name,
|
||||
'kubernetes.pod.uid': uid,
|
||||
'kubernetes.namespace': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
||||
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'pod',
|
||||
'entity.type': 'pod',
|
||||
'k8s.pod.name': name,
|
||||
'k8s.pod.uid': uid,
|
||||
'k8s.cluster.name': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Schema } from '..';
|
||||
import { K8sEntity } from '.';
|
||||
|
||||
export function k8sReplicaSetEntity({
|
||||
schema,
|
||||
name,
|
||||
uid,
|
||||
clusterName,
|
||||
entityId,
|
||||
...others
|
||||
}: {
|
||||
schema: Schema;
|
||||
name: string;
|
||||
uid?: string;
|
||||
clusterName?: string;
|
||||
entityId: string;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
if (schema === 'ecs') {
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'replica_set',
|
||||
'entity.type': 'replicaset',
|
||||
'kubernetes.replicaset.name': name,
|
||||
'kubernetes.namespace': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
||||
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'replica_set',
|
||||
'entity.type': 'replicaset',
|
||||
'k8s.replicaset.name': name,
|
||||
'k8s.replicaset.uid': uid,
|
||||
'k8s.cluster.name': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Schema } from '..';
|
||||
import { K8sEntity } from '.';
|
||||
|
||||
export function k8sServiceEntity({
|
||||
schema,
|
||||
name,
|
||||
uid,
|
||||
clusterName,
|
||||
entityId,
|
||||
...others
|
||||
}: {
|
||||
schema: Schema;
|
||||
name: string;
|
||||
uid?: string;
|
||||
clusterName?: string;
|
||||
entityId: string;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
if (schema !== 'ecs') {
|
||||
throw new Error('Schema not supported for service entity: ' + schema);
|
||||
}
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'service',
|
||||
'entity.type': 'service',
|
||||
'kubernetes.service.name': name,
|
||||
'kubernetes.namespace': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Schema } from '..';
|
||||
import { K8sEntity } from '.';
|
||||
|
||||
export function k8sStatefulSetEntity({
|
||||
schema,
|
||||
name,
|
||||
uid,
|
||||
clusterName,
|
||||
entityId,
|
||||
...others
|
||||
}: {
|
||||
schema: Schema;
|
||||
name: string;
|
||||
uid?: string;
|
||||
clusterName?: string;
|
||||
entityId: string;
|
||||
[key: string]: any;
|
||||
}) {
|
||||
if (schema === 'ecs') {
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'stateful_set',
|
||||
'entity.type': 'statefulset',
|
||||
'kubernetes.statefulset.name': name,
|
||||
'kubernetes.namespace': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
||||
|
||||
return new K8sEntity(schema, {
|
||||
'entity.definition_id': 'stateful_set',
|
||||
'entity.type': 'statefulset',
|
||||
'k8s.statefulset.name': name,
|
||||
'k8s.statefulset.uid': uid,
|
||||
'k8s.cluster.name': clusterName,
|
||||
'entity.id': entityId,
|
||||
...others,
|
||||
});
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { EntityDataStreamType, EntityFields } from '.';
|
||||
import { Serializable } from '../serializable';
|
||||
|
||||
class ServiceEntity extends Serializable<EntityFields> {
|
||||
constructor(fields: EntityFields) {
|
||||
super({
|
||||
...fields,
|
||||
'entity.type': 'service',
|
||||
'entity.definition_id': 'builtin_services_from_ecs_data',
|
||||
'entity.identity_fields': ['service.name'],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function serviceEntity({
|
||||
agentName,
|
||||
dataStreamType,
|
||||
serviceName,
|
||||
environment,
|
||||
entityId,
|
||||
}: {
|
||||
agentName: string[];
|
||||
serviceName: string;
|
||||
dataStreamType: EntityDataStreamType[];
|
||||
environment?: string;
|
||||
entityId: string;
|
||||
}) {
|
||||
return new ServiceEntity({
|
||||
'service.name': serviceName,
|
||||
'entity.display_name': serviceName,
|
||||
'service.environment': environment,
|
||||
'source_data_stream.type': dataStreamType,
|
||||
'agent.name': agentName,
|
||||
'entity.id': entityId,
|
||||
});
|
||||
}
|
|
@ -20,8 +20,6 @@ export { InfraSynthtraceEsClient } from './src/lib/infra/infra_synthtrace_es_cli
|
|||
export { InfraSynthtraceKibanaClient } from './src/lib/infra/infra_synthtrace_kibana_client';
|
||||
export { MonitoringSynthtraceEsClient } from './src/lib/monitoring/monitoring_synthtrace_es_client';
|
||||
export { LogsSynthtraceEsClient } from './src/lib/logs/logs_synthtrace_es_client';
|
||||
export { EntitiesSynthtraceEsClient } from './src/lib/entities/entities_synthtrace_es_client';
|
||||
export { EntitiesSynthtraceKibanaClient } from './src/lib/entities/entities_synthtrace_kibana_client';
|
||||
export { SyntheticsSynthtraceEsClient } from './src/lib/synthetics/synthetics_synthtrace_es_client';
|
||||
export {
|
||||
addObserverVersionTransform,
|
||||
|
|
|
@ -11,8 +11,6 @@ import { Required } from 'utility-types';
|
|||
import { Client } from '@elastic/elasticsearch';
|
||||
import { ApmSynthtraceEsClient } from '../../lib/apm/client/apm_synthtrace_es_client';
|
||||
import { ApmSynthtraceKibanaClient } from '../../lib/apm/client/apm_synthtrace_kibana_client';
|
||||
import { EntitiesSynthtraceEsClient } from '../../lib/entities/entities_synthtrace_es_client';
|
||||
import { EntitiesSynthtraceKibanaClient } from '../../lib/entities/entities_synthtrace_kibana_client';
|
||||
import { InfraSynthtraceEsClient } from '../../lib/infra/infra_synthtrace_es_client';
|
||||
import { LogsSynthtraceEsClient } from '../../lib/logs/logs_synthtrace_es_client';
|
||||
import { SynthtraceEsClientOptions } from '../../lib/shared/base_client';
|
||||
|
@ -22,12 +20,10 @@ import { Logger } from '../../lib/utils/create_logger';
|
|||
|
||||
export interface SynthtraceClients {
|
||||
apmEsClient: ApmSynthtraceEsClient;
|
||||
entitiesEsClient: EntitiesSynthtraceEsClient;
|
||||
infraEsClient: InfraSynthtraceEsClient;
|
||||
logsEsClient: LogsSynthtraceEsClient;
|
||||
streamsClient: StreamsSynthtraceClient;
|
||||
syntheticsEsClient: SyntheticsSynthtraceEsClient;
|
||||
entitiesKibanaClient: EntitiesSynthtraceKibanaClient;
|
||||
esClient: Client;
|
||||
}
|
||||
|
||||
|
@ -67,12 +63,6 @@ export async function getClients({
|
|||
|
||||
const logsEsClient = new LogsSynthtraceEsClient(options);
|
||||
const infraEsClient = new InfraSynthtraceEsClient(options);
|
||||
const entitiesEsClient = new EntitiesSynthtraceEsClient(options);
|
||||
|
||||
const entitiesKibanaClient = new EntitiesSynthtraceKibanaClient({
|
||||
...options,
|
||||
kibanaClient: options.kibana,
|
||||
});
|
||||
|
||||
const syntheticsEsClient = new SyntheticsSynthtraceEsClient(options);
|
||||
|
||||
|
@ -80,12 +70,10 @@ export async function getClients({
|
|||
|
||||
return {
|
||||
apmEsClient,
|
||||
entitiesEsClient,
|
||||
infraEsClient,
|
||||
logsEsClient,
|
||||
streamsClient,
|
||||
syntheticsEsClient,
|
||||
entitiesKibanaClient,
|
||||
esClient: options.client,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,96 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Client } from '@elastic/elasticsearch';
|
||||
import { EntityFields, ESDocumentWithOperation } from '@kbn/apm-synthtrace-client';
|
||||
import { pipeline, Readable, Transform } from 'stream';
|
||||
import { SynthtraceEsClient, SynthtraceEsClientOptions } from '../shared/base_client';
|
||||
import { getDedotTransform } from '../shared/get_dedot_transform';
|
||||
import { getSerializeTransform } from '../shared/get_serialize_transform';
|
||||
import { Logger } from '../utils/create_logger';
|
||||
|
||||
export type EntitiesSynthtraceEsClientOptions = Omit<SynthtraceEsClientOptions, 'pipeline'>;
|
||||
|
||||
interface Pipeline {
|
||||
includeSerialization?: boolean;
|
||||
}
|
||||
|
||||
export class EntitiesSynthtraceEsClient extends SynthtraceEsClient<EntityFields> {
|
||||
constructor(
|
||||
options: {
|
||||
client: Client;
|
||||
logger: Logger;
|
||||
pipeline?: Pipeline;
|
||||
} & EntitiesSynthtraceEsClientOptions
|
||||
) {
|
||||
super({
|
||||
...options,
|
||||
pipeline: entitiesPipeline({
|
||||
includeSerialization: options.pipeline?.includeSerialization,
|
||||
}),
|
||||
});
|
||||
this.indices = ['.entities.v1.latest.builtin*'];
|
||||
}
|
||||
}
|
||||
|
||||
function entitiesPipeline({ includeSerialization }: Pipeline = { includeSerialization: true }) {
|
||||
return (base: Readable) => {
|
||||
const serializationTransform = includeSerialization ? [getSerializeTransform()] : [];
|
||||
|
||||
return pipeline(
|
||||
base,
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
...serializationTransform,
|
||||
lastSeenTimestampTransform(),
|
||||
getRoutingTransform(),
|
||||
getDedotTransform(),
|
||||
(err: unknown) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
function lastSeenTimestampTransform() {
|
||||
return new Transform({
|
||||
objectMode: true,
|
||||
transform(document: ESDocumentWithOperation<EntityFields>, encoding, callback) {
|
||||
const timestamp = document['@timestamp'];
|
||||
if (timestamp) {
|
||||
const isoString = new Date(timestamp).toISOString();
|
||||
document['entity.last_seen_timestamp'] = isoString;
|
||||
document['event.ingested'] = isoString;
|
||||
delete document['@timestamp'];
|
||||
}
|
||||
callback(null, document);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function getRoutingTransform() {
|
||||
return new Transform({
|
||||
objectMode: true,
|
||||
transform(document: ESDocumentWithOperation<EntityFields>, encoding, callback) {
|
||||
const definitionId: string | undefined = document['entity.definition_id'];
|
||||
if (definitionId === undefined) {
|
||||
throw new Error(`entity.definition_id was not defined: ${JSON.stringify(document)}`);
|
||||
}
|
||||
document._action = {
|
||||
index: {
|
||||
_index: `.entities.v1.latest.${definitionId}`.toLocaleLowerCase(),
|
||||
_id: document['entity.id'],
|
||||
},
|
||||
};
|
||||
|
||||
callback(null, document);
|
||||
},
|
||||
});
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { Logger } from '../utils/create_logger';
|
||||
import { KibanaClient } from '../shared/base_kibana_client';
|
||||
import { getKibanaClient } from '../../cli/utils/get_kibana_client';
|
||||
|
||||
interface EntityDefinitionResponse {
|
||||
definitions: Array<{ type: string; state: { installed: boolean; running: boolean } }>;
|
||||
}
|
||||
|
||||
export class EntitiesSynthtraceKibanaClient {
|
||||
private readonly logger: Logger;
|
||||
private readonly kibana: KibanaClient;
|
||||
|
||||
constructor(options: { logger: Logger } & ({ target: string } | { kibanaClient: KibanaClient })) {
|
||||
this.kibana = 'kibanaClient' in options ? options.kibanaClient : getKibanaClient(options);
|
||||
this.logger = options.logger;
|
||||
}
|
||||
|
||||
async installEntityIndexPatterns() {
|
||||
const entityDefinition = await this.kibana.fetch<EntityDefinitionResponse>(
|
||||
`/internal/entities/definition?includeState=true`,
|
||||
{
|
||||
method: 'GET',
|
||||
}
|
||||
);
|
||||
|
||||
const hasEntityDefinitionsInstalled = entityDefinition.definitions?.find(
|
||||
(definition) => definition.type === 'service'
|
||||
)?.state.installed;
|
||||
|
||||
if (hasEntityDefinitionsInstalled === true) {
|
||||
this.logger.debug('Entity definitions are already defined');
|
||||
} else {
|
||||
this.logger.debug('Installing Entity definitions');
|
||||
await this.kibana.fetch(`/internal/entities/managed/enablement?installOnly=true`, {
|
||||
method: 'PUT',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async uninstallEntityIndexPatterns() {
|
||||
await this.kibana.fetch(`/internal/entities/managed/enablement`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,172 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { EntityFields, entities, generateShortId } from '@kbn/apm-synthtrace-client';
|
||||
import { Schema } from '@kbn/apm-synthtrace-client/src/lib/entities';
|
||||
import { Scenario } from '../cli/scenario';
|
||||
import { withClient } from '../lib/utils/with_client';
|
||||
|
||||
const CLUSTER_NAME = 'cluster_foo';
|
||||
|
||||
const CLUSTER_ENTITY_ID = generateShortId();
|
||||
const POD_ENTITY_ID = generateShortId();
|
||||
const POD_UID = generateShortId();
|
||||
const REPLICA_SET_ENTITY_ID = generateShortId();
|
||||
const REPLICA_SET_UID = generateShortId();
|
||||
const DEPLOYMENT_ENTITY_ID = generateShortId();
|
||||
const DEPLOYMENT_UID = generateShortId();
|
||||
const STATEFUL_SET_ENTITY_ID = generateShortId();
|
||||
const STATEFUL_SET_UID = generateShortId();
|
||||
const DAEMON_SET_ENTITY_ID = generateShortId();
|
||||
const DAEMON_SET_UID = generateShortId();
|
||||
const JOB_SET_ENTITY_ID = generateShortId();
|
||||
const JOB_SET_UID = generateShortId();
|
||||
const CRON_JOB_ENTITY_ID = generateShortId();
|
||||
const CRON_JOB_UID = generateShortId();
|
||||
const NODE_ENTITY_ID = generateShortId();
|
||||
const NODE_UID = generateShortId();
|
||||
const SERVICE_UID = generateShortId();
|
||||
|
||||
const scenario: Scenario<Partial<EntityFields>> = async (runOptions) => {
|
||||
const { logger } = runOptions;
|
||||
|
||||
return {
|
||||
bootstrap: async ({ entitiesKibanaClient }) => {
|
||||
await entitiesKibanaClient.installEntityIndexPatterns();
|
||||
},
|
||||
generate: ({ range, clients: { entitiesEsClient } }) => {
|
||||
const getK8sEntitiesEvents = (schema: Schema) =>
|
||||
range
|
||||
.interval('1m')
|
||||
.rate(1)
|
||||
.generator((timestamp) => {
|
||||
const commonEntities = [
|
||||
entities.k8s
|
||||
.k8sClusterJobEntity({
|
||||
schema,
|
||||
name: CLUSTER_NAME,
|
||||
entityId: CLUSTER_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sPodEntity({
|
||||
schema,
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'pod_foo',
|
||||
uid: POD_UID,
|
||||
entityId: POD_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sReplicaSetEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'replica_set_foo',
|
||||
schema,
|
||||
uid: REPLICA_SET_UID,
|
||||
entityId: REPLICA_SET_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sDeploymentEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'deployment_foo',
|
||||
schema,
|
||||
uid: DEPLOYMENT_UID,
|
||||
entityId: DEPLOYMENT_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sStatefulSetEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'stateful_set_foo',
|
||||
schema,
|
||||
uid: STATEFUL_SET_UID,
|
||||
entityId: STATEFUL_SET_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sDaemonSetEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'daemon_set_foo',
|
||||
schema,
|
||||
uid: DAEMON_SET_UID,
|
||||
entityId: DAEMON_SET_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sJobEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'job_set_foo',
|
||||
schema,
|
||||
uid: JOB_SET_UID,
|
||||
entityId: JOB_SET_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sCronJobEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'cron_job_foo',
|
||||
schema,
|
||||
uid: CRON_JOB_UID,
|
||||
entityId: CRON_JOB_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sNodeEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'node_job_foo',
|
||||
schema,
|
||||
uid: NODE_UID,
|
||||
entityId: NODE_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sContainerEntity({
|
||||
id: '123',
|
||||
schema,
|
||||
entityId: NODE_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
];
|
||||
|
||||
if (schema === 'ecs') {
|
||||
return [
|
||||
...commonEntities,
|
||||
entities.k8s
|
||||
.k8sServiceEntity({
|
||||
schema,
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'my_service',
|
||||
entityId: SERVICE_UID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
];
|
||||
}
|
||||
|
||||
return commonEntities;
|
||||
});
|
||||
|
||||
const ecsEntities = getK8sEntitiesEvents('ecs');
|
||||
const otelEntities = getK8sEntitiesEvents('otel');
|
||||
|
||||
return [
|
||||
withClient(
|
||||
entitiesEsClient,
|
||||
logger.perf('generating_entities_ecs_events', () => ecsEntities)
|
||||
),
|
||||
withClient(
|
||||
entitiesEsClient,
|
||||
logger.perf('generating_entities_otel_events', () => otelEntities)
|
||||
),
|
||||
];
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default scenario;
|
|
@ -1,185 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { EntityFields, entities, generateShortId } from '@kbn/apm-synthtrace-client';
|
||||
import { Schema } from '@kbn/apm-synthtrace-client/src/lib/entities';
|
||||
import { Scenario } from '../cli/scenario';
|
||||
import { withClient } from '../lib/utils/with_client';
|
||||
|
||||
const CLUSTER_NAME = 'cluster_foo';
|
||||
|
||||
const CLUSTER_ENTITY_ID = generateShortId();
|
||||
const POD_ENTITY_ID = generateShortId();
|
||||
const POD_UID = generateShortId();
|
||||
const REPLICA_SET_ENTITY_ID = generateShortId();
|
||||
const REPLICA_SET_UID = generateShortId();
|
||||
const DEPLOYMENT_ENTITY_ID = generateShortId();
|
||||
const DEPLOYMENT_UID = generateShortId();
|
||||
const STATEFUL_SET_ENTITY_ID = generateShortId();
|
||||
const STATEFUL_SET_UID = generateShortId();
|
||||
const DAEMON_SET_ENTITY_ID = generateShortId();
|
||||
const DAEMON_SET_UID = generateShortId();
|
||||
const JOB_SET_ENTITY_ID = generateShortId();
|
||||
const JOB_SET_UID = generateShortId();
|
||||
const CRON_JOB_ENTITY_ID = generateShortId();
|
||||
const CRON_JOB_UID = generateShortId();
|
||||
const NODE_ENTITY_ID = generateShortId();
|
||||
const NODE_UID = generateShortId();
|
||||
const SYNTH_JAVA_TRACE_ENTITY_ID = generateShortId();
|
||||
const SYNTH_HOST_FOO_LOGS_ENTITY_ID = generateShortId();
|
||||
const SYNTH_CONTAINER_FOO_LOGS_ENTITY_ID = generateShortId();
|
||||
|
||||
const scenario: Scenario<Partial<EntityFields>> = async (runOptions) => {
|
||||
const { logger } = runOptions;
|
||||
|
||||
return {
|
||||
bootstrap: async ({ entitiesKibanaClient }) => {
|
||||
await entitiesKibanaClient.installEntityIndexPatterns();
|
||||
},
|
||||
generate: ({ range, clients: { entitiesEsClient } }) => {
|
||||
const rangeInterval = range.interval('1m').rate(1);
|
||||
const getK8sEntitiesEvents = (schema: Schema) =>
|
||||
rangeInterval.generator((timestamp) => {
|
||||
return [
|
||||
entities.k8s
|
||||
.k8sClusterJobEntity({
|
||||
schema,
|
||||
name: CLUSTER_NAME,
|
||||
entityId: CLUSTER_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sPodEntity({
|
||||
schema,
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'pod_foo',
|
||||
uid: POD_UID,
|
||||
entityId: POD_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sReplicaSetEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'replica_set_foo',
|
||||
schema,
|
||||
uid: REPLICA_SET_UID,
|
||||
entityId: REPLICA_SET_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sDeploymentEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'deployment_foo',
|
||||
schema,
|
||||
uid: DEPLOYMENT_UID,
|
||||
entityId: DEPLOYMENT_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sStatefulSetEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'stateful_set_foo',
|
||||
schema,
|
||||
uid: STATEFUL_SET_UID,
|
||||
entityId: STATEFUL_SET_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sDaemonSetEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'daemon_set_foo',
|
||||
schema,
|
||||
uid: DAEMON_SET_UID,
|
||||
entityId: DAEMON_SET_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sJobEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'job_set_foo',
|
||||
schema,
|
||||
uid: JOB_SET_UID,
|
||||
entityId: JOB_SET_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sCronJobEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'cron_job_foo',
|
||||
schema,
|
||||
uid: CRON_JOB_UID,
|
||||
entityId: CRON_JOB_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sNodeEntity({
|
||||
clusterName: CLUSTER_NAME,
|
||||
name: 'node_job_foo',
|
||||
schema,
|
||||
uid: NODE_UID,
|
||||
entityId: NODE_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
entities.k8s
|
||||
.k8sContainerEntity({
|
||||
id: '123',
|
||||
schema,
|
||||
entityId: NODE_ENTITY_ID,
|
||||
})
|
||||
.timestamp(timestamp),
|
||||
];
|
||||
});
|
||||
|
||||
const ecsEntities = getK8sEntitiesEvents('ecs');
|
||||
const otelEntities = getK8sEntitiesEvents('otel');
|
||||
const synthJavaTraces = entities.serviceEntity({
|
||||
serviceName: 'synth_java',
|
||||
agentName: ['java'],
|
||||
dataStreamType: ['traces'],
|
||||
environment: 'production',
|
||||
entityId: SYNTH_JAVA_TRACE_ENTITY_ID,
|
||||
});
|
||||
const synthHostFooLogs = entities.hostEntity({
|
||||
hostName: 'synth_host_foo',
|
||||
agentName: ['macbook'],
|
||||
dataStreamType: ['logs'],
|
||||
entityId: SYNTH_HOST_FOO_LOGS_ENTITY_ID,
|
||||
});
|
||||
const synthContainerFooLogs = entities.containerEntity({
|
||||
containerId: 'synth_container_foo',
|
||||
agentName: ['macbook'],
|
||||
dataStreamType: ['logs'],
|
||||
entityId: SYNTH_CONTAINER_FOO_LOGS_ENTITY_ID,
|
||||
});
|
||||
|
||||
const otherEvents = rangeInterval.generator((timestamp) => [
|
||||
synthJavaTraces.timestamp(timestamp),
|
||||
synthHostFooLogs.timestamp(timestamp),
|
||||
synthContainerFooLogs.timestamp(timestamp),
|
||||
]);
|
||||
|
||||
return [
|
||||
withClient(
|
||||
entitiesEsClient,
|
||||
logger.perf('generating_entities_k8s_ecs_events', () => ecsEntities)
|
||||
),
|
||||
withClient(
|
||||
entitiesEsClient,
|
||||
logger.perf('generating_entities_k8s_otel_events', () => otelEntities)
|
||||
),
|
||||
withClient(
|
||||
entitiesEsClient,
|
||||
logger.perf('generating_entities_other_events', () => otherEvents)
|
||||
),
|
||||
];
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default scenario;
|
|
@ -1,264 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import {
|
||||
apm,
|
||||
generateLongId,
|
||||
generateShortId,
|
||||
Instance,
|
||||
log,
|
||||
entities,
|
||||
} from '@kbn/apm-synthtrace-client';
|
||||
import { Readable } from 'stream';
|
||||
import { Scenario } from '../cli/scenario';
|
||||
import { getSynthtraceEnvironment } from '../lib/utils/get_synthtrace_environment';
|
||||
import { withClient } from '../lib/utils/with_client';
|
||||
import { parseLogsScenarioOpts } from './helpers/logs_scenario_opts_parser';
|
||||
import { IndexTemplateName } from '../lib/logs/custom_logsdb_index_templates';
|
||||
|
||||
const ENVIRONMENT = getSynthtraceEnvironment(__filename);
|
||||
|
||||
const MESSAGE_LOG_LEVELS = [
|
||||
{ message: 'A simple log with something random <random> in the middle', level: 'info' },
|
||||
{ message: 'Yet another debug log', level: 'debug' },
|
||||
{ message: 'Error with certificate: "ca_trusted_fingerprint"', level: 'error' },
|
||||
];
|
||||
|
||||
const SYNTH_JAVA_TRACE_ENTITY_ID = generateShortId();
|
||||
const SYNTH_NODE_TRACES_LOGS_ENTITY_ID = generateShortId();
|
||||
const SYNTH_GO_LOGS_ENTITY_ID = generateShortId();
|
||||
|
||||
const scenario: Scenario = async (runOptions) => {
|
||||
const { logger } = runOptions;
|
||||
const { isLogsDb } = parseLogsScenarioOpts(runOptions.scenarioOpts);
|
||||
|
||||
return {
|
||||
bootstrap: async ({ entitiesKibanaClient, logsEsClient }) => {
|
||||
await entitiesKibanaClient.installEntityIndexPatterns();
|
||||
if (isLogsDb) await logsEsClient.createIndexTemplate(IndexTemplateName.LogsDb);
|
||||
},
|
||||
generate: ({ range, clients: { entitiesEsClient, logsEsClient, apmEsClient } }) => {
|
||||
const transactionName = '240rpm/75% 1000ms';
|
||||
|
||||
const entityHistoryTimestamps = range.interval('1m').rate(1);
|
||||
const successfulTimestamps = range.interval('1m').rate(1);
|
||||
const failedTimestamps = range.interval('1m').rate(1);
|
||||
|
||||
const instanceSpans = (instance: Instance) => {
|
||||
const successfulTraceEvents = successfulTimestamps.generator((timestamp) =>
|
||||
instance
|
||||
.transaction({ transactionName })
|
||||
.timestamp(timestamp)
|
||||
.duration(1000)
|
||||
.success()
|
||||
.children(
|
||||
instance
|
||||
.span({
|
||||
spanName: 'GET apm-*/_search',
|
||||
spanType: 'db',
|
||||
spanSubtype: 'elasticsearch',
|
||||
})
|
||||
.duration(1000)
|
||||
.success()
|
||||
.destination('elasticsearch')
|
||||
.timestamp(timestamp),
|
||||
instance
|
||||
.span({ spanName: 'custom_operation', spanType: 'custom' })
|
||||
.duration(100)
|
||||
.success()
|
||||
.timestamp(timestamp)
|
||||
)
|
||||
);
|
||||
|
||||
const failedTraceEvents = failedTimestamps.generator((timestamp) =>
|
||||
instance
|
||||
.transaction({ transactionName })
|
||||
.timestamp(timestamp)
|
||||
.duration(600)
|
||||
.failure()
|
||||
.errors(
|
||||
instance
|
||||
.error({
|
||||
message: '[ResponseError] index_not_found_exception',
|
||||
type: 'ResponseError',
|
||||
})
|
||||
.timestamp(timestamp + 50)
|
||||
)
|
||||
);
|
||||
|
||||
const metricsets = range
|
||||
.interval('30s')
|
||||
.rate(1)
|
||||
.generator((timestamp) =>
|
||||
instance
|
||||
.appMetrics({
|
||||
'system.memory.actual.free': 800,
|
||||
'system.memory.total': 1000,
|
||||
'system.cpu.total.norm.pct': 0.6,
|
||||
'system.process.cpu.total.norm.pct': 0.7,
|
||||
})
|
||||
.timestamp(timestamp)
|
||||
);
|
||||
|
||||
return [...successfulTraceEvents, ...failedTraceEvents, ...metricsets];
|
||||
};
|
||||
|
||||
const SYNTH_JAVA_TRACE = 'synth-java-trace';
|
||||
const apmOnlyInstance = apm
|
||||
.service({ name: SYNTH_JAVA_TRACE, agentName: 'java', environment: ENVIRONMENT })
|
||||
.instance('intance');
|
||||
const apmOnlyEvents = instanceSpans(apmOnlyInstance);
|
||||
const synthJavaTraces = entities.serviceEntity({
|
||||
serviceName: SYNTH_JAVA_TRACE,
|
||||
agentName: ['java'],
|
||||
dataStreamType: ['traces'],
|
||||
environment: ENVIRONMENT,
|
||||
entityId: SYNTH_JAVA_TRACE_ENTITY_ID,
|
||||
});
|
||||
|
||||
const SYNTH_NODE_TRACE_LOGS = 'synth-node-trace-logs';
|
||||
const apmAndLogsInstance = apm
|
||||
.service({ name: SYNTH_NODE_TRACE_LOGS, agentName: 'nodejs', environment: ENVIRONMENT })
|
||||
.instance('intance');
|
||||
const apmAndLogsApmEvents = instanceSpans(apmAndLogsInstance);
|
||||
const apmAndLogsLogsEvents = range
|
||||
.interval('1m')
|
||||
.rate(1)
|
||||
.generator((timestamp) => {
|
||||
return Array(3)
|
||||
.fill(0)
|
||||
.map(() => {
|
||||
const index = Math.floor(Math.random() * 3);
|
||||
const { message, level } = MESSAGE_LOG_LEVELS[index];
|
||||
const CLUSTER = {
|
||||
clusterId: generateShortId(),
|
||||
clusterName: 'synth-cluster-2',
|
||||
namespace: 'production',
|
||||
};
|
||||
|
||||
return log
|
||||
.create({ isLogsDb })
|
||||
.message(message.replace('<random>', generateShortId()))
|
||||
.logLevel(level)
|
||||
.service(SYNTH_NODE_TRACE_LOGS)
|
||||
.defaults({
|
||||
'trace.id': generateShortId(),
|
||||
'agent.name': 'nodejs',
|
||||
'orchestrator.cluster.name': CLUSTER.clusterName,
|
||||
'orchestrator.cluster.id': CLUSTER.clusterId,
|
||||
'orchestrator.namespace': CLUSTER.namespace,
|
||||
'container.name': `${SYNTH_NODE_TRACE_LOGS}-${generateShortId()}`,
|
||||
'orchestrator.resource.id': generateShortId(),
|
||||
'cloud.provider': 'gcp',
|
||||
'cloud.region': 'eu-central-1',
|
||||
'cloud.availability_zone': 'eu-central-1a',
|
||||
'log.level': 'error',
|
||||
'cloud.project.id': generateShortId(),
|
||||
'cloud.instance.id': generateShortId(),
|
||||
'log.file.path': `/logs/${generateLongId()}/error.txt`,
|
||||
})
|
||||
.timestamp(timestamp);
|
||||
});
|
||||
});
|
||||
const synthNodeTracesLogs = entities.serviceEntity({
|
||||
serviceName: SYNTH_NODE_TRACE_LOGS,
|
||||
agentName: ['nodejs'],
|
||||
dataStreamType: ['traces', 'logs'],
|
||||
environment: ENVIRONMENT,
|
||||
entityId: SYNTH_NODE_TRACES_LOGS_ENTITY_ID,
|
||||
});
|
||||
|
||||
const SYNTH_GO_LOGS = 'synth-go-logs';
|
||||
const logsEvents = range
|
||||
.interval('1m')
|
||||
.rate(1)
|
||||
.generator((timestamp) => {
|
||||
return Array(3)
|
||||
.fill(0)
|
||||
.map(() => {
|
||||
const index = Math.floor(Math.random() * 3);
|
||||
const { message, level } = MESSAGE_LOG_LEVELS[index];
|
||||
const CLUSTER = {
|
||||
clusterId: generateShortId(),
|
||||
clusterName: 'synth-cluster-2',
|
||||
namespace: 'production',
|
||||
};
|
||||
|
||||
return log
|
||||
.create({ isLogsDb })
|
||||
.message(message.replace('<random>', generateShortId()))
|
||||
.logLevel(level)
|
||||
.service(SYNTH_GO_LOGS)
|
||||
.defaults({
|
||||
'trace.id': generateShortId(),
|
||||
'agent.name': 'nodejs',
|
||||
'orchestrator.cluster.name': CLUSTER.clusterName,
|
||||
'orchestrator.cluster.id': CLUSTER.clusterId,
|
||||
'orchestrator.namespace': CLUSTER.namespace,
|
||||
'container.name': `${SYNTH_GO_LOGS}-${generateShortId()}`,
|
||||
'orchestrator.resource.id': generateShortId(),
|
||||
'cloud.provider': 'gcp',
|
||||
'cloud.region': 'eu-central-1',
|
||||
'cloud.availability_zone': 'eu-central-1a',
|
||||
'log.level': 'error',
|
||||
'cloud.project.id': generateShortId(),
|
||||
'cloud.instance.id': generateShortId(),
|
||||
'log.file.path': `/logs/${generateLongId()}/error.txt`,
|
||||
})
|
||||
.timestamp(timestamp);
|
||||
});
|
||||
});
|
||||
const synthGoTraces = entities.serviceEntity({
|
||||
serviceName: SYNTH_GO_LOGS,
|
||||
agentName: ['go'],
|
||||
dataStreamType: ['logs'],
|
||||
environment: ENVIRONMENT,
|
||||
entityId: SYNTH_GO_LOGS_ENTITY_ID,
|
||||
});
|
||||
|
||||
const entitiesEvents = entityHistoryTimestamps.generator((timestamp) => {
|
||||
return [
|
||||
synthNodeTracesLogs.timestamp(timestamp),
|
||||
synthJavaTraces.timestamp(timestamp),
|
||||
synthGoTraces.timestamp(timestamp),
|
||||
];
|
||||
});
|
||||
|
||||
const apmPython = apm
|
||||
.service({ name: 'synth-python', agentName: 'python', environment: ENVIRONMENT })
|
||||
.instance('intance');
|
||||
const apmPythonEvents = instanceSpans(apmPython);
|
||||
|
||||
return [
|
||||
withClient(
|
||||
entitiesEsClient,
|
||||
logger.perf('generating_entities_events', () => entitiesEvents)
|
||||
),
|
||||
withClient(
|
||||
logsEsClient,
|
||||
logger.perf('generating_logs', () =>
|
||||
Readable.from(Array.from(apmAndLogsLogsEvents).concat(Array.from(logsEvents)))
|
||||
)
|
||||
),
|
||||
withClient(
|
||||
apmEsClient,
|
||||
logger.perf('generating_apm_events', () =>
|
||||
Readable.from(
|
||||
Array.from(apmOnlyEvents).concat(
|
||||
Array.from(apmAndLogsApmEvents).concat(Array.from(apmPythonEvents))
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
];
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default scenario;
|
|
@ -9,4 +9,3 @@
|
|||
|
||||
export * from './summary_column';
|
||||
export * from './log_level_badge_cell/log_level_badge_cell';
|
||||
export * from './service_name_badge_with_actions';
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { getRouterLinkProps } from '@kbn/router-utils';
|
||||
import { EuiLink } from '@elastic/eui';
|
||||
import { OBSERVABILITY_ENTITY_CENTRIC_EXPERIENCE } from '@kbn/management-settings-ids';
|
||||
import type { SharePublicStart } from '@kbn/share-plugin/public/plugin';
|
||||
import {
|
||||
FieldBadgeWithActions,
|
||||
FieldBadgeWithActionsProps,
|
||||
FieldBadgeWithActionsPropsAndDependencies,
|
||||
} from './cell_actions_popover';
|
||||
|
||||
const SERVICE_ENTITY_LOCATOR = 'SERVICE_ENTITY_LOCATOR';
|
||||
|
||||
export function ServiceNameBadgeWithActions(props: FieldBadgeWithActionsPropsAndDependencies) {
|
||||
const { share, core } = props;
|
||||
const canViewApm = core?.application.capabilities.apm?.show || false;
|
||||
const isEntityCentricExperienceSettingEnabled = canViewApm
|
||||
? core?.uiSettings.get(OBSERVABILITY_ENTITY_CENTRIC_EXPERIENCE)
|
||||
: false;
|
||||
|
||||
const derivedPropsForEntityExperience = isEntityCentricExperienceSettingEnabled
|
||||
? getDerivedPropsForEntityExperience({ serviceName: props.value, share })
|
||||
: {};
|
||||
|
||||
return <FieldBadgeWithActions {...props} {...derivedPropsForEntityExperience} />;
|
||||
}
|
||||
|
||||
const getDerivedPropsForEntityExperience = ({
|
||||
serviceName,
|
||||
share,
|
||||
}: {
|
||||
serviceName: string;
|
||||
share?: SharePublicStart;
|
||||
}): Pick<FieldBadgeWithActionsProps, 'renderValue'> => {
|
||||
const apmLinkToServiceEntityLocator = share?.url?.locators.get<{ serviceName: string }>(
|
||||
SERVICE_ENTITY_LOCATOR
|
||||
);
|
||||
const href = apmLinkToServiceEntityLocator?.getRedirectUrl({ serviceName });
|
||||
|
||||
const routeLinkProps = href
|
||||
? getRouterLinkProps({
|
||||
href,
|
||||
onClick: () => apmLinkToServiceEntityLocator?.navigate({ serviceName }),
|
||||
})
|
||||
: undefined;
|
||||
|
||||
if (routeLinkProps) {
|
||||
return {
|
||||
renderValue: (value) => <EuiLink {...routeLinkProps}>{value}</EuiLink>,
|
||||
};
|
||||
}
|
||||
|
||||
return {};
|
||||
};
|
|
@ -33,7 +33,6 @@ import { DataView } from '@kbn/data-views-plugin/common';
|
|||
import { testPatternAgainstAllowedList } from '@kbn/data-view-utils';
|
||||
import { FieldFormatsStart } from '@kbn/field-formats-plugin/public';
|
||||
import { FieldBadgeWithActions, FieldBadgeWithActionsProps } from '../cell_actions_popover';
|
||||
import { ServiceNameBadgeWithActions } from '../service_name_badge_with_actions';
|
||||
import { TransactionNameIcon } from './icons/transaction_name_icon';
|
||||
|
||||
type FieldKey = keyof DataTableRecord['flattened'];
|
||||
|
@ -92,10 +91,6 @@ const getResourceBadgeComponent = (
|
|||
share?: SharePluginStart
|
||||
): React.ComponentType<FieldBadgeWithActionsProps> => {
|
||||
switch (name) {
|
||||
case SERVICE_NAME_FIELD:
|
||||
return (props: FieldBadgeWithActionsProps) => (
|
||||
<ServiceNameBadgeWithActions {...props} share={share} core={core} />
|
||||
);
|
||||
case EVENT_OUTCOME_FIELD:
|
||||
return EventOutcomeBadge;
|
||||
default:
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
"kbn_references": [
|
||||
"@kbn/field-formats-plugin",
|
||||
"@kbn/discover-utils",
|
||||
"@kbn/router-utils",
|
||||
"@kbn/management-settings-ids",
|
||||
"@kbn/share-plugin",
|
||||
"@kbn/unified-data-table",
|
||||
"@kbn/unified-doc-viewer",
|
||||
|
|
|
@ -118,7 +118,6 @@ export const OBSERVABILITY_APM_ENABLE_TABLE_SEARCH_BAR = 'observability:apmEnabl
|
|||
export const OBSERVABILITY_APM_ENABLE_SERVICE_INVENTORY_TABLE_SEARCH_BAR =
|
||||
'observability:apmEnableServiceInventoryTableSearchBar';
|
||||
export const OBSERVABILITY_LOGS_SHARED_NEW_LOGS_OVERVIEW_ID = 'observability:newLogsOverview';
|
||||
export const OBSERVABILITY_ENTITY_CENTRIC_EXPERIENCE = 'observability:entityCentricExperience';
|
||||
export const OBSERVABILITY_LOGS_DATA_ACCESS_LOG_SOURCES_ID = 'observability:logSources';
|
||||
export const OBSERVABILITY_AI_ASSISTANT_SIMULATED_FUNCTION_CALLING =
|
||||
'observability:aiAssistantSimulatedFunctionCalling';
|
||||
|
|
|
@ -21,7 +21,6 @@ export const OBSERVABILITY_PROJECT_SETTINGS = [
|
|||
settings.OBSERVABILITY_APM_PROGRESSIVE_LOADING_ID,
|
||||
settings.OBSERVABILITY_APM_ENABLE_TABLE_SEARCH_BAR,
|
||||
settings.OBSERVABILITY_APM_ENABLE_SERVICE_INVENTORY_TABLE_SEARCH_BAR,
|
||||
settings.OBSERVABILITY_ENTITY_CENTRIC_EXPERIENCE,
|
||||
settings.OBSERVABILITY_LOGS_DATA_ACCESS_LOG_SOURCES_ID,
|
||||
settings.OBSERVABILITY_ENABLE_STREAMS_UI,
|
||||
];
|
||||
|
|
|
@ -149,7 +149,6 @@ export const applicationUsageSchema = {
|
|||
enterpriseSearchSemanticSearch: commonSchema,
|
||||
enterpriseSearchVectorSearch: commonSchema,
|
||||
enterpriseSearchElasticsearch: commonSchema,
|
||||
entity_manager: commonSchema,
|
||||
searchExperiences: commonSchema,
|
||||
graph: commonSchema,
|
||||
logs: commonSchema,
|
||||
|
@ -157,7 +156,6 @@ export const applicationUsageSchema = {
|
|||
fleet: commonSchema,
|
||||
integrations: commonSchema,
|
||||
ingestManager: commonSchema,
|
||||
inventory: commonSchema,
|
||||
lens: commonSchema,
|
||||
maps: commonSchema,
|
||||
ml: commonSchema,
|
||||
|
|
|
@ -464,10 +464,6 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
|
|||
type: 'boolean',
|
||||
_meta: { description: 'Non-default value of setting.' },
|
||||
},
|
||||
'observability:entityCentricExperience': {
|
||||
type: 'boolean',
|
||||
_meta: { description: 'Non-default value of setting.' },
|
||||
},
|
||||
'observability:apmAWSLambdaPriceFactor': {
|
||||
type: 'text',
|
||||
_meta: { description: 'Non-default value of setting.' },
|
||||
|
|
|
@ -151,7 +151,6 @@ export interface UsageStats {
|
|||
'observability:enableLegacyUptimeApp': boolean;
|
||||
'observability:apmProgressiveLoading': string;
|
||||
'observability:apmServiceGroupMaxNumberOfServices': number;
|
||||
'observability:entityCentricExperience': boolean;
|
||||
'observability:profilingShowErrorFrames': boolean;
|
||||
'securitySolution:enableGroupedNav': boolean;
|
||||
'securitySolution:showRelatedIntegrations': boolean;
|
||||
|
|
|
@ -15,7 +15,7 @@ import { dynamic } from '@kbn/shared-ux-utility';
|
|||
import type { DataGridCellValueElementProps } from '@kbn/unified-data-table';
|
||||
import { css } from '@emotion/react';
|
||||
import { formatFieldValue, getFieldValue } from '@kbn/discover-utils';
|
||||
import { ServiceNameBadgeWithActions } from '@kbn/discover-contextual-components';
|
||||
import { FieldBadgeWithActions } from '@kbn/discover-contextual-components/src/data_types/logs/components/cell_actions_popover';
|
||||
import { useDiscoverServices } from '../../../hooks/use_discover_services';
|
||||
import type { CellRenderersExtensionParams } from '../../../context_awareness';
|
||||
import { AGENT_NAME_FIELD } from '../../../../common/data_types/logs/constants';
|
||||
|
@ -55,7 +55,7 @@ export const getServiceNameCell =
|
|||
);
|
||||
|
||||
return (
|
||||
<ServiceNameBadgeWithActions
|
||||
<FieldBadgeWithActions
|
||||
onFilter={actions.addFilter}
|
||||
icon={getIcon}
|
||||
rawValue={serviceNameValue}
|
||||
|
|
|
@ -3801,137 +3801,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"entity_manager": {
|
||||
"properties": {
|
||||
"appId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "The application being tracked"
|
||||
}
|
||||
},
|
||||
"viewId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "Always `main`"
|
||||
}
|
||||
},
|
||||
"clicks_total": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application since we started counting them"
|
||||
}
|
||||
},
|
||||
"clicks_7_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application over the last 7 days"
|
||||
}
|
||||
},
|
||||
"clicks_30_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application over the last 30 days"
|
||||
}
|
||||
},
|
||||
"clicks_90_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application over the last 90 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_total": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen since we started counting them."
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_7_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen over the last 7 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_30_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen over the last 30 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_90_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen over the last 90 days"
|
||||
}
|
||||
},
|
||||
"views": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"properties": {
|
||||
"appId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "The application being tracked"
|
||||
}
|
||||
},
|
||||
"viewId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "The application view being tracked"
|
||||
}
|
||||
},
|
||||
"clicks_total": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application sub view since we started counting them"
|
||||
}
|
||||
},
|
||||
"clicks_7_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the active application sub view over the last 7 days"
|
||||
}
|
||||
},
|
||||
"clicks_30_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the active application sub view over the last 30 days"
|
||||
}
|
||||
},
|
||||
"clicks_90_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the active application sub view over the last 90 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_total": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application sub view is active and on-screen since we started counting them."
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_7_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen active application sub view over the last 7 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_30_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen active application sub view over the last 30 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_90_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen active application sub view over the last 90 days"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"searchExperiences": {
|
||||
"properties": {
|
||||
"appId": {
|
||||
|
@ -4849,137 +4718,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"inventory": {
|
||||
"properties": {
|
||||
"appId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "The application being tracked"
|
||||
}
|
||||
},
|
||||
"viewId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "Always `main`"
|
||||
}
|
||||
},
|
||||
"clicks_total": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application since we started counting them"
|
||||
}
|
||||
},
|
||||
"clicks_7_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application over the last 7 days"
|
||||
}
|
||||
},
|
||||
"clicks_30_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application over the last 30 days"
|
||||
}
|
||||
},
|
||||
"clicks_90_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application over the last 90 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_total": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen since we started counting them."
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_7_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen over the last 7 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_30_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen over the last 30 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_90_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen over the last 90 days"
|
||||
}
|
||||
},
|
||||
"views": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"properties": {
|
||||
"appId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "The application being tracked"
|
||||
}
|
||||
},
|
||||
"viewId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "The application view being tracked"
|
||||
}
|
||||
},
|
||||
"clicks_total": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application sub view since we started counting them"
|
||||
}
|
||||
},
|
||||
"clicks_7_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the active application sub view over the last 7 days"
|
||||
}
|
||||
},
|
||||
"clicks_30_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the active application sub view over the last 30 days"
|
||||
}
|
||||
},
|
||||
"clicks_90_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the active application sub view over the last 90 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_total": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application sub view is active and on-screen since we started counting them."
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_7_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen active application sub view over the last 7 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_30_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen active application sub view over the last 30 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_90_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen active application sub view over the last 90 days"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"lens": {
|
||||
"properties": {
|
||||
"appId": {
|
||||
|
@ -11256,12 +10994,6 @@
|
|||
"description": "Non-default value of setting."
|
||||
}
|
||||
},
|
||||
"observability:entityCentricExperience": {
|
||||
"type": "boolean",
|
||||
"_meta": {
|
||||
"description": "Non-default value of setting."
|
||||
}
|
||||
},
|
||||
"observability:apmAWSLambdaPriceFactor": {
|
||||
"type": "text",
|
||||
"_meta": {
|
||||
|
|
|
@ -122,17 +122,11 @@ const buildHit = (fields: Record<string, unknown> = {}, customIndex: string = DA
|
|||
|
||||
const fullHit = buildHit();
|
||||
|
||||
const getCustomUnifedDocViewerServices = (params?: {
|
||||
showApm: boolean;
|
||||
entityCentricExperienceEnabled?: boolean;
|
||||
}) => ({
|
||||
const getCustomUnifedDocViewerServices = (params?: { showApm: boolean }) => ({
|
||||
core: {
|
||||
application: {
|
||||
capabilities: { apm: { show: params?.showApm || false } },
|
||||
},
|
||||
uiSettings: {
|
||||
get: () => params?.entityCentricExperienceEnabled || false,
|
||||
},
|
||||
},
|
||||
share: {
|
||||
url: {
|
||||
|
@ -357,40 +351,13 @@ describe('LogsOverview with accordion state', () => {
|
|||
|
||||
describe('LogsOverview with APM links', () => {
|
||||
describe('Highlights section', () => {
|
||||
describe('When APM and Entity centric experience are enabled', () => {
|
||||
describe('When APM is enabled', () => {
|
||||
beforeEach(() => {
|
||||
setUnifiedDocViewerServices(
|
||||
merge(
|
||||
mockUnifiedDocViewerServices,
|
||||
getCustomUnifedDocViewerServices({
|
||||
showApm: true,
|
||||
entityCentricExperienceEnabled: true,
|
||||
})
|
||||
)
|
||||
);
|
||||
renderLogsOverview();
|
||||
});
|
||||
it('should render service name link', () => {
|
||||
expect(
|
||||
screen.queryByTestId('unifiedDocViewLogsOverviewServiceNameHighlightLink')
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should render trace id link', () => {
|
||||
expect(
|
||||
screen.queryByTestId('unifiedDocViewLogsOverviewTraceIdHighlightLink')
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
describe('When APM is enabled and Entity centric experience is disabled', () => {
|
||||
beforeEach(() => {
|
||||
setUnifiedDocViewerServices(
|
||||
merge(
|
||||
mockUnifiedDocViewerServices,
|
||||
getCustomUnifedDocViewerServices({
|
||||
showApm: true,
|
||||
entityCentricExperienceEnabled: false,
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -408,32 +375,6 @@ describe('LogsOverview with APM links', () => {
|
|||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
describe('When APM is disabled and Entity centric experience is enabled', () => {
|
||||
beforeEach(() => {
|
||||
setUnifiedDocViewerServices(
|
||||
merge(
|
||||
mockUnifiedDocViewerServices,
|
||||
getCustomUnifedDocViewerServices({
|
||||
showApm: false,
|
||||
entityCentricExperienceEnabled: true,
|
||||
})
|
||||
)
|
||||
);
|
||||
renderLogsOverview();
|
||||
});
|
||||
it('should not render service name link', () => {
|
||||
expect(
|
||||
screen.queryByTestId('unifiedDocViewLogsOverviewServiceNameHighlightLink')
|
||||
).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should not render trace id link', () => {
|
||||
expect(
|
||||
screen.queryByTestId('unifiedDocViewLogsOverviewTraceIdHighlightLink')
|
||||
).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ import { StreamsFeature } from '@kbn/discover-shared-plugin/public/services/disc
|
|||
import { HighlightField } from './sub_components/highlight_field';
|
||||
import { HighlightSection } from './sub_components/highlight_section';
|
||||
import { getUnifiedDocViewerServices } from '../../plugin';
|
||||
import { ServiceNameHighlightField } from './sub_components/service_name_highlight_field';
|
||||
import { TraceIdHighlightField } from './sub_components/trace_id_highlight_field';
|
||||
|
||||
export function LogsOverviewHighlights({
|
||||
|
@ -71,7 +70,7 @@ export function LogsOverviewHighlights({
|
|||
data-test-subj="unifiedDocViewLogsOverviewHighlightSectionServiceInfra"
|
||||
>
|
||||
{shouldRenderHighlight(fieldConstants.SERVICE_NAME_FIELD) && (
|
||||
<ServiceNameHighlightField
|
||||
<HighlightField
|
||||
data-test-subj="unifiedDocViewLogsOverviewService"
|
||||
label={serviceLabel}
|
||||
fieldMetadata={fieldsMetadata[fieldConstants.SERVICE_NAME_FIELD]}
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { EuiLink } from '@elastic/eui';
|
||||
import { getRouterLinkProps } from '@kbn/router-utils';
|
||||
import { OBSERVABILITY_ENTITY_CENTRIC_EXPERIENCE } from '@kbn/management-settings-ids';
|
||||
import { HighlightField, HighlightFieldProps } from './highlight_field';
|
||||
import { getUnifiedDocViewerServices } from '../../../plugin';
|
||||
|
||||
const SERVICE_ENTITY_LOCATOR = 'SERVICE_ENTITY_LOCATOR';
|
||||
|
||||
export function ServiceNameHighlightField(props: HighlightFieldProps) {
|
||||
const {
|
||||
share: { url: urlService },
|
||||
core,
|
||||
} = getUnifiedDocViewerServices();
|
||||
const canViewApm = core.application.capabilities.apm?.show || false;
|
||||
|
||||
const isEntityCentricExperienceSettingEnabled = canViewApm
|
||||
? core.uiSettings.get(OBSERVABILITY_ENTITY_CENTRIC_EXPERIENCE)
|
||||
: false;
|
||||
|
||||
const apmLinkToServiceEntityLocator = urlService.locators.get<{ serviceName: string }>(
|
||||
SERVICE_ENTITY_LOCATOR
|
||||
);
|
||||
const href = apmLinkToServiceEntityLocator?.getRedirectUrl({
|
||||
serviceName: props.value as string,
|
||||
});
|
||||
|
||||
const routeLinkProps = href
|
||||
? getRouterLinkProps({
|
||||
href,
|
||||
onClick: () =>
|
||||
apmLinkToServiceEntityLocator?.navigate({ serviceName: props.value as string }),
|
||||
})
|
||||
: undefined;
|
||||
|
||||
return (
|
||||
<HighlightField {...props}>
|
||||
{canViewApm && isEntityCentricExperienceSettingEnabled && routeLinkProps
|
||||
? ({ content }) => (
|
||||
<EuiLink
|
||||
{...routeLinkProps}
|
||||
data-test-subj="unifiedDocViewLogsOverviewServiceNameHighlightLink"
|
||||
>
|
||||
{content}
|
||||
</EuiLink>
|
||||
)
|
||||
: undefined}
|
||||
</HighlightField>
|
||||
);
|
||||
}
|
|
@ -36,7 +36,6 @@
|
|||
"@kbn/router-utils",
|
||||
"@kbn/unified-field-list",
|
||||
"@kbn/core-lifecycle-browser",
|
||||
"@kbn/management-settings-ids",
|
||||
"@kbn/apm-types",
|
||||
"@kbn/event-stacktrace",
|
||||
"@kbn/elastic-agent-utils",
|
||||
|
|
|
@ -866,14 +866,10 @@
|
|||
"@kbn/encrypted-saved-objects-shared/*": ["src/platform/packages/shared/kbn-encrypted-saved-objects-shared/*"],
|
||||
"@kbn/enterprise-search-plugin": ["x-pack/solutions/search/plugins/enterprise_search"],
|
||||
"@kbn/enterprise-search-plugin/*": ["x-pack/solutions/search/plugins/enterprise_search/*"],
|
||||
"@kbn/entities-data-access-plugin": ["x-pack/solutions/observability/plugins/entities_data_access"],
|
||||
"@kbn/entities-data-access-plugin/*": ["x-pack/solutions/observability/plugins/entities_data_access/*"],
|
||||
"@kbn/entities-schema": ["x-pack/platform/packages/shared/kbn-entities-schema"],
|
||||
"@kbn/entities-schema/*": ["x-pack/platform/packages/shared/kbn-entities-schema/*"],
|
||||
"@kbn/entity-manager-fixture-plugin": ["x-pack/platform/test/api_integration/apis/entity_manager/fixture_plugin"],
|
||||
"@kbn/entity-manager-fixture-plugin/*": ["x-pack/platform/test/api_integration/apis/entity_manager/fixture_plugin/*"],
|
||||
"@kbn/entityManager-app-plugin": ["x-pack/solutions/observability/plugins/entity_manager_app"],
|
||||
"@kbn/entityManager-app-plugin/*": ["x-pack/solutions/observability/plugins/entity_manager_app/*"],
|
||||
"@kbn/entityManager-plugin": ["x-pack/platform/plugins/shared/entity_manager"],
|
||||
"@kbn/entityManager-plugin/*": ["x-pack/platform/plugins/shared/entity_manager/*"],
|
||||
"@kbn/error-boundary-example-plugin": ["examples/error_boundary"],
|
||||
|
@ -1134,10 +1130,6 @@
|
|||
"@kbn/intercepts-plugin/*": ["x-pack/platform/plugins/private/intercepts/*"],
|
||||
"@kbn/interpreter": ["src/platform/packages/shared/kbn-interpreter"],
|
||||
"@kbn/interpreter/*": ["src/platform/packages/shared/kbn-interpreter/*"],
|
||||
"@kbn/inventory-e2e": ["x-pack/solutions/observability/plugins/inventory/e2e"],
|
||||
"@kbn/inventory-e2e/*": ["x-pack/solutions/observability/plugins/inventory/e2e/*"],
|
||||
"@kbn/inventory-plugin": ["x-pack/solutions/observability/plugins/inventory"],
|
||||
"@kbn/inventory-plugin/*": ["x-pack/solutions/observability/plugins/inventory/*"],
|
||||
"@kbn/io-ts-utils": ["src/platform/packages/shared/kbn-io-ts-utils"],
|
||||
"@kbn/io-ts-utils/*": ["src/platform/packages/shared/kbn-io-ts-utils/*"],
|
||||
"@kbn/ipynb": ["x-pack/solutions/search/packages/kbn-ipynb"],
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
export * from './src/schema/v1/entity_definition';
|
||||
export * from './src/schema/v1/entity';
|
||||
export * from './src/schema/v2';
|
||||
export * from './src/schema/v1/common';
|
||||
export * from './src/schema/v1/patterns';
|
||||
export * from './src/rest_spec/create';
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export interface EntityV2 {
|
||||
'entity.id': string;
|
||||
'entity.type': string;
|
||||
'entity.display_name': string;
|
||||
'entity.last_seen_timestamp'?: string;
|
||||
[metadata: string]: any;
|
||||
}
|
|
@ -10595,7 +10595,6 @@
|
|||
"xpack.apm.a.thresholdMet": "Seuil atteint",
|
||||
"xpack.apm.add.apm.agent.button.": "Ajouter un APM",
|
||||
"xpack.apm.addDataButtonLabel": "Ajouter des données",
|
||||
"xpack.apm.addDataContextMenu.link": "Ajouter des données",
|
||||
"xpack.apm.agent_explorer.error.missing_configuration": "Pour utiliser la toute dernière version de l’agent, vous devez définir xpack.apm.latestAgentVersionsUrl.",
|
||||
"xpack.apm.agentConfig.allOptionLabel": "Tous",
|
||||
"xpack.apm.agentConfig.apiRequestSize.description": "Taille totale compressée maximale du corps de la requête envoyé à l'API d'ingestion du serveur APM depuis un encodage fragmenté (diffusion HTTP). Veuillez noter qu'un léger dépassement est possible. Les unités d'octets autorisées sont `b`, `kb` et `mb`. `1kb` correspond à `1024b`.",
|
||||
|
@ -11077,13 +11076,6 @@
|
|||
"xpack.apm.eemFeedback.title": "Faites-nous part de vos réflexions !",
|
||||
"xpack.apm.emptyMessage.noDataFoundDescription": "Essayez avec une autre plage temporelle ou réinitialisez le filtre de recherche.",
|
||||
"xpack.apm.emptyMessage.noDataFoundLabel": "Aucune donnée trouvée.",
|
||||
"xpack.apm.entitiesInventoryCallout.ariaLabel": "Masquer la légende de l'inventaire des entités",
|
||||
"xpack.apm.entitiesInventoryCallout.linklabel": "Essayez notre nouvel inventaire !",
|
||||
"xpack.apm.entitiesInventoryCallout.linkTooltip": "Cacher ceci",
|
||||
"xpack.apm.entityLink.eemGuide.description": "Désolé, nous ne pouvons pas vous donner plus de détails sur ce service pour le moment dû au motif suivant : {limitationsLink}.",
|
||||
"xpack.apm.entityLink.eemGuide.description.link": "limitations du modèle d'entité d'Elastic",
|
||||
"xpack.apm.entityLink.eemGuide.goBackButtonLabel": "Retour",
|
||||
"xpack.apm.entityLink.eemGuide.title": "Service non pris en charge",
|
||||
"xpack.apm.environmentsSelectPlaceholder": "Sélectionner l'environnement",
|
||||
"xpack.apm.error.prompt.body": "Veuillez consulter la console de développeur de votre navigateur pour plus de détails.",
|
||||
"xpack.apm.error.prompt.title": "Désolé, une erreur s'est produite :(",
|
||||
|
@ -11357,11 +11349,6 @@
|
|||
"xpack.apm.latencyCorrelations.licenseCheckText": "Pour utiliser les corrélations de latence, vous devez disposer d'une licence Elastic Platinum. Elle vous permettra de découvrir quels champs sont corrélés à de faibles performances.",
|
||||
"xpack.apm.license.button": "Démarrer l'essai",
|
||||
"xpack.apm.license.title": "Commencer un essai gratuit de 30 jours",
|
||||
"xpack.apm.logErrorRate": "Taux d'erreur des logs",
|
||||
"xpack.apm.logErrorRate.tooltip.description": "Taux de logs d'erreurs par minute observé pour un {serviceName} donné.",
|
||||
"xpack.apm.logRate": "Taux du log",
|
||||
"xpack.apm.logs.chart.logRate": "Taux de log",
|
||||
"xpack.apm.logs.chart.logsErrorRate": "Taux d'erreur des logs",
|
||||
"xpack.apm.managedTable.errorMessage": "Impossible de récupérer",
|
||||
"xpack.apm.managedTable.loadingDescription": "Chargement…",
|
||||
"xpack.apm.metadata.help": "Comment ajouter des étiquettes et d'autres données",
|
||||
|
@ -11424,10 +11411,6 @@
|
|||
"xpack.apm.mobileServiceDetails.serviceMapTabLabel": "Carte des services",
|
||||
"xpack.apm.mobileServiceDetails.transactionsTabLabel": "Transactions",
|
||||
"xpack.apm.mobileServices.breadcrumb.title": "Services",
|
||||
"xpack.apm.multiSignal.servicesTable.logErrorRate.tooltip.serviceNameLabel": "service.name",
|
||||
"xpack.apm.multiSignal.servicesTable.logRate.tooltip.description": "Taux de logs par minute observé pour un {serviceName} donné.",
|
||||
"xpack.apm.multiSignal.servicesTable.logRate.tooltip.serviceNameLabel": "service.name",
|
||||
"xpack.apm.multiSignal.table.tooltip.formula": "Calcul de la formule :",
|
||||
"xpack.apm.navigation.apmSettingsTitle": "Paramètres",
|
||||
"xpack.apm.navigation.apmStorageExplorerTitle": "Explorateur de stockage",
|
||||
"xpack.apm.navigation.apmTutorialTitle": "Tutoriel",
|
||||
|
@ -11696,8 +11679,6 @@
|
|||
"xpack.apm.serviceGroups.list.sort.ariaLabel": "Trier les groupes de services par",
|
||||
"xpack.apm.serviceGroups.list.sort.recentlyAdded": "Récemment ajouté",
|
||||
"xpack.apm.serviceGroups.listDescription": "Le nombre de services affiché reflète les dernières 24 heures.",
|
||||
"xpack.apm.serviceGroups.onlyApm": "Seuls les services {link} sont affichés",
|
||||
"xpack.apm.serviceGroups.onlyApmLink": "instrumenté avec APM.",
|
||||
"xpack.apm.serviceGroups.searchResults.error": "Erreur de récupération des résultats de recherche",
|
||||
"xpack.apm.serviceGroups.selectServicesForm.cancel": "Annuler",
|
||||
"xpack.apm.serviceGroups.selectServicesForm.editGroupDetails": "Modifier les détails du groupe",
|
||||
|
@ -11867,8 +11848,6 @@
|
|||
"xpack.apm.servicesTable.latencyAvgColumnLabel": "Latence (moy.)",
|
||||
"xpack.apm.servicesTable.metricsExplanationLabel": "Que sont ces indicateurs ?",
|
||||
"xpack.apm.servicesTable.nameColumnLabel": "Nom",
|
||||
"xpack.apm.servicesTable.notAvailableApmMetrics.content": "Comprenez les indicateurs clés comme la latence des transactions, le débit et le taux d'erreur en instrumentant votre service avec APM.",
|
||||
"xpack.apm.servicesTable.notAvailableApmMetrics.title": "Vous souhaitez en savoir plus ?",
|
||||
"xpack.apm.servicesTable.notFoundLabel": "Aucun service trouvé",
|
||||
"xpack.apm.servicesTable.throughputColumnLabel": "Rendement",
|
||||
"xpack.apm.servicesTable.tooltip.alertsCount": "Le nombre d'alertes actives",
|
||||
|
@ -11876,21 +11855,6 @@
|
|||
"xpack.apm.servicesTable.tooltip.metricsExplanation": "Les indicateurs du services sont agrégés sur le type de transaction, qui peut être une requête ou un chargement de page. Si ni l'un ni l'autre n'existent, les indicateurs sont agrégés sur le type de transaction disponible en premier.",
|
||||
"xpack.apm.servicesTable.transactionColumnLabel": "Type de transaction",
|
||||
"xpack.apm.servicesTable.transactionErrorRate": "Taux de transactions ayant échoué",
|
||||
"xpack.apm.serviceTabEmptyState.defaultPrimaryActionLabel": "Ajouter un APM",
|
||||
"xpack.apm.serviceTabEmptyState.dependenciesContent": "Visualisez les dépendances de votre service sur les services internes et tiers en instrumentant avec APM.",
|
||||
"xpack.apm.serviceTabEmptyState.dependenciesTitle": "Comprendre les dépendances de votre service",
|
||||
"xpack.apm.serviceTabEmptyState.errorGroupOverviewContent": "Analysez les erreurs jusqu'à la transaction spécifique pour identifier les erreurs spécifiques au sein de votre service.",
|
||||
"xpack.apm.serviceTabEmptyState.errorGroupOverviewTitle": "Identifier les erreurs de transaction liées à vos applications",
|
||||
"xpack.apm.serviceTabEmptyState.infrastructureContent": "Résolvez les problèmes de service en visualisant l'infrastructure sur laquelle votre service s'exécute.",
|
||||
"xpack.apm.serviceTabEmptyState.infrastructureTitle": "Comprendre sur quoi s'exécute votre service",
|
||||
"xpack.apm.serviceTabEmptyState.metricsContent": "Collectez des indicateurs tels que l'utilisation du processeur et de la mémoire pour identifier les goulots d'étranglement des performances qui pourraient affecter vos utilisateurs.",
|
||||
"xpack.apm.serviceTabEmptyState.metricsTitle": "Afficher les indicateurs clés de votre application",
|
||||
"xpack.apm.serviceTabEmptyState.overviewContent": "Comprendre les performances, les relations et les dépendances de vos applications en instrumentant avec APM.",
|
||||
"xpack.apm.serviceTabEmptyState.overviewTitle": "Détectez et résolvez les problèmes plus rapidement grâce à une meilleure visibilité sur votre application",
|
||||
"xpack.apm.serviceTabEmptyState.serviceMapContent": "Consultez en un coup d'œil les dépendances de vos services pour vous aider à identifier celles susceptibles d'affecter votre service.",
|
||||
"xpack.apm.serviceTabEmptyState.serviceMapTitle": "Visualiser les dépendances reliant vos services",
|
||||
"xpack.apm.serviceTabEmptyState.transactionsContent": "Résolvez les problèmes liés aux performances de votre service en analysant la latence, le débit et les erreurs jusqu'à la transaction spécifique.",
|
||||
"xpack.apm.serviceTabEmptyState.transactionsTitle": "Résoudre les problèmes liés à la latence, au débit et aux erreurs",
|
||||
"xpack.apm.settings.agentConfig": "Configuration de l'agent",
|
||||
"xpack.apm.settings.agentConfig.createConfigButton.tooltip": "Vous ne disposez pas d'autorisations pour créer des configurations d'agent",
|
||||
"xpack.apm.settings.agentConfig.descriptionText": "Affinez votre configuration d'agent depuis l'application APM. Les modifications sont automatiquement propagées à vos agents APM, ce qui vous évite d'effectuer un redéploiement.",
|
||||
|
@ -24251,56 +24215,6 @@
|
|||
"xpack.ingestPipelines.testPipelineFlyout.outputTab.verboseSwitchLabel": "Afficher la sortie détaillée",
|
||||
"xpack.ingestPipelines.testPipelineFlyout.successNotificationText": "Pipeline exécuté",
|
||||
"xpack.ingestPipelines.testPipelineFlyout.title": "Pipeline de test",
|
||||
"xpack.inventory.add.apm.agent.button.": "Ajouter des données",
|
||||
"xpack.inventory.addDataContextMenu.link": "Ajouter des données",
|
||||
"xpack.inventory.apiCall.error.title": "Erreur lors de la récupération des ressources",
|
||||
"xpack.inventory.appTitle": "Inventory",
|
||||
"xpack.inventory.associate.service.logs.button": "Associer les logs de service existants",
|
||||
"xpack.inventory.badgeFilterWithPopover.copyValueButtonEmptyLabel": "Copier la valeur",
|
||||
"xpack.inventory.badgeFilterWithPopover.filterForButtonEmptyLabel": "Exclure",
|
||||
"xpack.inventory.badgeFilterWithPopover.openPopoverBadgeLabel": "Ouvrir la fenêtre contextuelle",
|
||||
"xpack.inventory.data_view.creation_failed": "Une erreur s'est produite lors de la création de la vue de données",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.actionsLabel": "Actions",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.alertsLabel": "Alertes",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.alertsTooltip": "Le nombre d'alertes actives",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.entityNameLabel": "Nom de l'entité",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.entityNameTooltip": "Nom de l'entité (entity.displayName)",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.headerLeft": "Affichage de {currentItems} {boldEntities} sur {total}",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.headerLeft.entities": "Entités",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.inventoryEntitiesGridLabel": "Grille des entités d'inventaire",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.lastSeen": "{date} à {time}",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.lastSeenLabel": "Vu en dernier",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.lastSeenTooltip": "Horodatage des dernières données reçues pour l'entité (entity.lastSeenTimestamp)",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.typeLabel": "Type",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.typeTooltip": "Type d'entité (entity.type)",
|
||||
"xpack.inventory.entityActions.euiButtonIcon.showActionsLabel": "Afficher les actions",
|
||||
"xpack.inventory.entityActions.exploreInDiscoverLink": "Explorer dans Discover",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.empty": "Aucun type disponible",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.loading": "Chargement des types",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.notFound": "Aucun type trouvé",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.placeholder": "Types de filtre",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.typeLabel": "Type d'entité",
|
||||
"xpack.inventory.entityTypesMultiSelect.typeFilterButtonLabel": "Type",
|
||||
"xpack.inventory.featureRegistry.inventoryFeatureName": "Inventory",
|
||||
"xpack.inventory.groupedInventoryPage.entitiesTotalLabel": "{total} entités",
|
||||
"xpack.inventory.groupedInventoryPage.groupedByLabel": "Regrouper les entités par : {grouping}",
|
||||
"xpack.inventory.groupedInventoryPage.groupSelectorLabel": "Sélectionner un groupe",
|
||||
"xpack.inventory.groupedInventoryPage.groupsTotalLabel": "{total} groupes",
|
||||
"xpack.inventory.groupedInventoryPage.typeLabel": "Type",
|
||||
"xpack.inventory.home.serviceAlertsTable.tooltip.activeAlertsExplanation": "Alertes actives",
|
||||
"xpack.inventory.inventoryGroupPanel.entitiesBadgeLabel": "Entités",
|
||||
"xpack.inventory.inventoryLinkTitle": "Inventory",
|
||||
"xpack.inventory.inventoryPageHeaderLabel": "Inventory",
|
||||
"xpack.inventory.noEntitiesEmptyState.actions.title": "Commencez à observer vos entités :",
|
||||
"xpack.inventory.noEntitiesEmptyState.body.description": "Visualisez toutes vos entités observées en un seul endroit en collectant des données.",
|
||||
"xpack.inventory.noEntitiesEmptyState.callout.title": "C'est votre premier essai ?",
|
||||
"xpack.inventory.noEntitiesEmptyState.description": "L'affichage de vos entités peut prendre quelques minutes. Essayez de rafraîchir à nouveau dans une minute ou deux.",
|
||||
"xpack.inventory.noEntitiesEmptyState.learnMore.link": "En savoir plus",
|
||||
"xpack.inventory.noEntitiesEmptyState.title": "Aucune entité disponible",
|
||||
"xpack.inventory.searchBar.placeholder": "Recherchez vos entités par nom ou par leurs métadonnées (par exemple entity.type : service)",
|
||||
"xpack.inventory.shareLink.shareButtonLabel": "Partager",
|
||||
"xpack.inventory.shareLink.shareToastFailureLabel": "Les URL courtes ne peuvent pas être copiées.",
|
||||
"xpack.inventory.shareLink.shareToastSuccessLabel": "URL courte copiée dans le presse-papiers !",
|
||||
"xpack.lens.action.exploreInDiscover": "Explorer dans Discover",
|
||||
"xpack.lens.AggBasedLabel": "visualisation basée sur l'agrégation",
|
||||
"xpack.lens.app.addToLibrary": "Enregistrer dans la bibliothèque",
|
||||
|
@ -31954,8 +31868,6 @@
|
|||
"xpack.observability.enableInspectEsQueriesExperimentName": "Inspecter les recherches ES",
|
||||
"xpack.observability.enableLegacyUptimeApp": "Toujours afficher l’application Uptime héritée",
|
||||
"xpack.observability.enableLegacyUptimeAppDescription": "Par défaut, l’application Uptime héritée est masquée de l’interface quand elle n’obtient pas de données pendant plus d’une semaine. Activez cette option pour qu’elle soit toujours affichée.",
|
||||
"xpack.observability.entityCentricExperience": "Expérience centrée sur l'entité",
|
||||
"xpack.observability.entityCentricExperienceDescription": "{technicalPreviewLabel} Faites la promotion d'une expérience axée sur l'entité auprès des utilisateurs.",
|
||||
"xpack.observability.experimentalBadgeDescription": "Cette fonctionnalité est en version d'évaluation technique et pourra être modifiée ou retirée complètement dans une future version. Elastic s'efforcera de corriger tout problème, mais les fonctionnalités des versions d'évaluation technique ne sont pas soumises aux SLA de support des fonctionnalités officielles en disponibilité générale.",
|
||||
"xpack.observability.experimentalBadgeLabel": "Version d'évaluation technique",
|
||||
"xpack.observability.featureCatalogueDescription": "Consolidez vos logs, indicateurs, traces d'application et disponibilités système avec les interfaces utilisateur spécialement conçues.",
|
||||
|
|
|
@ -10604,7 +10604,6 @@
|
|||
"xpack.apm.a.thresholdMet": "しきい値一致",
|
||||
"xpack.apm.add.apm.agent.button.": "APM を追加",
|
||||
"xpack.apm.addDataButtonLabel": "データの追加",
|
||||
"xpack.apm.addDataContextMenu.link": "データの追加",
|
||||
"xpack.apm.agent_explorer.error.missing_configuration": "最新のエージェントバージョンを使用するには、xpack.apm.latestAgentVersionsUrlを設定する必要があります。",
|
||||
"xpack.apm.agentConfig.allOptionLabel": "すべて",
|
||||
"xpack.apm.agentConfig.apiRequestSize.description": "チャンクエンコーディング(HTTPストリーミング)を経由してAPM ServerインテークAPIに送信されるリクエスト本文の最大合計圧縮サイズ。わずかなオーバーシュートの可能性があることに注意してください。使用できるバイト単位は、「b」、「kb」、「mb」です。「1kb」は「1024b」と等価です。",
|
||||
|
@ -11085,13 +11084,6 @@
|
|||
"xpack.apm.eemFeedback.title": "ご意見、ご感想をお寄せください。",
|
||||
"xpack.apm.emptyMessage.noDataFoundDescription": "別の時間範囲を試すか検索フィルターをリセットしてください。",
|
||||
"xpack.apm.emptyMessage.noDataFoundLabel": "データが見つかりません。",
|
||||
"xpack.apm.entitiesInventoryCallout.ariaLabel": "エンティティインベントリコールアウトを非表示",
|
||||
"xpack.apm.entitiesInventoryCallout.linklabel": "新しいインベントリをお試しください!",
|
||||
"xpack.apm.entitiesInventoryCallout.linkTooltip": "これを非表示",
|
||||
"xpack.apm.entityLink.eemGuide.description": "申し訳ありません。{limitationsLink}のため、このサービスに関する詳細はまだ提供できません。",
|
||||
"xpack.apm.entityLink.eemGuide.description.link": "Elasticエンティティモデルの制限",
|
||||
"xpack.apm.entityLink.eemGuide.goBackButtonLabel": "戻る",
|
||||
"xpack.apm.entityLink.eemGuide.title": "サービスはサポートされていません",
|
||||
"xpack.apm.environmentsSelectPlaceholder": "環境を選択",
|
||||
"xpack.apm.error.prompt.body": "詳細はブラウザの開発者コンソールをご確認ください。",
|
||||
"xpack.apm.error.prompt.title": "申し訳ございませんが、エラーが発生しました :(",
|
||||
|
@ -11366,11 +11358,6 @@
|
|||
"xpack.apm.latencyCorrelations.licenseCheckText": "遅延の相関関係を使用するには、Elastic Platinumライセンスのサブスクリプションが必要です。使用すると、パフォーマンスの低下に関連しているフィールドを検出できます。",
|
||||
"xpack.apm.license.button": "トライアルを開始",
|
||||
"xpack.apm.license.title": "無料の 30 日トライアルを開始",
|
||||
"xpack.apm.logErrorRate": "ログエラー率",
|
||||
"xpack.apm.logErrorRate.tooltip.description": "特定の{serviceName}で観測された1分間のエラーログの割合。",
|
||||
"xpack.apm.logRate": "ログレート",
|
||||
"xpack.apm.logs.chart.logRate": "ログレート",
|
||||
"xpack.apm.logs.chart.logsErrorRate": "ログエラー率",
|
||||
"xpack.apm.managedTable.errorMessage": "取得できませんでした",
|
||||
"xpack.apm.managedTable.loadingDescription": "読み込み中…",
|
||||
"xpack.apm.metadata.help": "ラベルとその他のデータを追加する方法",
|
||||
|
@ -11433,10 +11420,6 @@
|
|||
"xpack.apm.mobileServiceDetails.serviceMapTabLabel": "サービスマップ",
|
||||
"xpack.apm.mobileServiceDetails.transactionsTabLabel": "トランザクション",
|
||||
"xpack.apm.mobileServices.breadcrumb.title": "サービス",
|
||||
"xpack.apm.multiSignal.servicesTable.logErrorRate.tooltip.serviceNameLabel": "service.name",
|
||||
"xpack.apm.multiSignal.servicesTable.logRate.tooltip.description": "特定の{serviceName}で観測された1分間のログの割合。",
|
||||
"xpack.apm.multiSignal.servicesTable.logRate.tooltip.serviceNameLabel": "service.name",
|
||||
"xpack.apm.multiSignal.table.tooltip.formula": "式計算:",
|
||||
"xpack.apm.navigation.apmSettingsTitle": "設定",
|
||||
"xpack.apm.navigation.apmStorageExplorerTitle": "ストレージエクスプローラー",
|
||||
"xpack.apm.navigation.apmTutorialTitle": "チュートリアル",
|
||||
|
@ -11707,8 +11690,6 @@
|
|||
"xpack.apm.serviceGroups.list.sort.ariaLabel": "サービスグループの並べ替え順",
|
||||
"xpack.apm.serviceGroups.list.sort.recentlyAdded": "最近追加された項目",
|
||||
"xpack.apm.serviceGroups.listDescription": "過去24時間のサービス数が表示されます。",
|
||||
"xpack.apm.serviceGroups.onlyApm": "サービス{link}のみを表示中",
|
||||
"xpack.apm.serviceGroups.onlyApmLink": "APMでインストルメント化されています。",
|
||||
"xpack.apm.serviceGroups.searchResults.error": "検索結果の取得エラー",
|
||||
"xpack.apm.serviceGroups.selectServicesForm.cancel": "キャンセル",
|
||||
"xpack.apm.serviceGroups.selectServicesForm.editGroupDetails": "グループ詳細を編集",
|
||||
|
@ -11878,8 +11859,6 @@
|
|||
"xpack.apm.servicesTable.latencyAvgColumnLabel": "レイテンシ(平均)",
|
||||
"xpack.apm.servicesTable.metricsExplanationLabel": "これらのメトリックは何か。",
|
||||
"xpack.apm.servicesTable.nameColumnLabel": "名前",
|
||||
"xpack.apm.servicesTable.notAvailableApmMetrics.content": "APMでサービスをインストルメント化し、トランザクション遅延、スループット、エラー率などの主要メトリックを把握します。",
|
||||
"xpack.apm.servicesTable.notAvailableApmMetrics.title": "詳細に関心がありますか?",
|
||||
"xpack.apm.servicesTable.notFoundLabel": "サービスが見つかりません",
|
||||
"xpack.apm.servicesTable.throughputColumnLabel": "スループット",
|
||||
"xpack.apm.servicesTable.tooltip.alertsCount": "アクティブなアラートの件数",
|
||||
|
@ -11887,21 +11866,6 @@
|
|||
"xpack.apm.servicesTable.tooltip.metricsExplanation": "サービスメトリックは、トランザクションタイプ(リクエストまたはページ読み込み)で集約されます。どちらも存在しない場合、メトリックは利用可能なトランザクションタイプの最上位で集約されます。",
|
||||
"xpack.apm.servicesTable.transactionColumnLabel": "トランザクションタイプ",
|
||||
"xpack.apm.servicesTable.transactionErrorRate": "失敗したトランザクション率",
|
||||
"xpack.apm.serviceTabEmptyState.defaultPrimaryActionLabel": "APM を追加",
|
||||
"xpack.apm.serviceTabEmptyState.dependenciesContent": "APMでインストルメントすることにより、内部サービスとサードパーティサービス両方に対するサービスの依存関係を確認できます。",
|
||||
"xpack.apm.serviceTabEmptyState.dependenciesTitle": "サービスの依存関係を把握",
|
||||
"xpack.apm.serviceTabEmptyState.errorGroupOverviewContent": "特定のトランザクションまでエラーを分析し、サービスの特定のエラーを正確に特定します。",
|
||||
"xpack.apm.serviceTabEmptyState.errorGroupOverviewTitle": "アプリケーションでトランザクションエラーを特定",
|
||||
"xpack.apm.serviceTabEmptyState.infrastructureContent": "サービスが実行されているインフラを把握することで、サービスの問題を解決します。",
|
||||
"xpack.apm.serviceTabEmptyState.infrastructureTitle": "サービスが実行されているインフラを把握",
|
||||
"xpack.apm.serviceTabEmptyState.metricsContent": "サービスのインスタンスのメトリックの傾向を把握し、ユーザーに影響を与えている可能性のあるパフォーマンスのボトルネックを特定します。",
|
||||
"xpack.apm.serviceTabEmptyState.metricsTitle": "アプリケーションのコアメトリックを表示",
|
||||
"xpack.apm.serviceTabEmptyState.overviewContent": "APMでのインストルメントにより、アプリケーションのパフォーマンス、関係、依存関係を把握します。",
|
||||
"xpack.apm.serviceTabEmptyState.overviewTitle": "アプリケーションを詳細まで可視化し、アプリケーションの問題をより迅速に検出して解決",
|
||||
"xpack.apm.serviceTabEmptyState.serviceMapContent": "サービスの依存関係を一目で確認し、サービスに影響を及ぼしている可能性のある依存関係を特定します。",
|
||||
"xpack.apm.serviceTabEmptyState.serviceMapTitle": "サービス間の依存関係を視覚化",
|
||||
"xpack.apm.serviceTabEmptyState.transactionsContent": "特定のトランザクションにまで遡ってレイテンシ、スループット、エラーを分析し、サービスのパフォーマンスの問題を解決します。",
|
||||
"xpack.apm.serviceTabEmptyState.transactionsTitle": "レイテンシ、スループット、エラーの問題を解決",
|
||||
"xpack.apm.settings.agentConfig": "エージェントの編集",
|
||||
"xpack.apm.settings.agentConfig.createConfigButton.tooltip": "エージェント構成を作成する権限がありません",
|
||||
"xpack.apm.settings.agentConfig.descriptionText": "APMアプリ内からエージェント構成を微調整してください。変更はAPMエージェントに自動的に伝達されるので、再デプロイする必要はありません。",
|
||||
|
@ -24280,56 +24244,6 @@
|
|||
"xpack.ingestPipelines.testPipelineFlyout.outputTab.verboseSwitchLabel": "冗長出力を表示",
|
||||
"xpack.ingestPipelines.testPipelineFlyout.successNotificationText": "パイプラインが実行されました",
|
||||
"xpack.ingestPipelines.testPipelineFlyout.title": "パイプラインをテスト",
|
||||
"xpack.inventory.add.apm.agent.button.": "データの追加",
|
||||
"xpack.inventory.addDataContextMenu.link": "データの追加",
|
||||
"xpack.inventory.apiCall.error.title": "リソースの取得中にエラーが発生しました",
|
||||
"xpack.inventory.appTitle": "インベントリ",
|
||||
"xpack.inventory.associate.service.logs.button": "既存のサービスログに関連付ける",
|
||||
"xpack.inventory.badgeFilterWithPopover.copyValueButtonEmptyLabel": "値をコピー",
|
||||
"xpack.inventory.badgeFilterWithPopover.filterForButtonEmptyLabel": "除外",
|
||||
"xpack.inventory.badgeFilterWithPopover.openPopoverBadgeLabel": "ポップオーバーを開く",
|
||||
"xpack.inventory.data_view.creation_failed": "データビューの作成中にエラーが発生しました",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.actionsLabel": "アクション",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.alertsLabel": "アラート",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.alertsTooltip": "アクティブなアラートの件数",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.entityNameLabel": "エンティティ名",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.entityNameTooltip": "エンティティの名前(entity.displayName)",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.headerLeft": "{total} {boldEntities}件中{currentItems}を表示しています",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.headerLeft.entities": "エンティティ",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.inventoryEntitiesGridLabel": "インベントリエンティティグリッド",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.lastSeen": "{date} @ {time}",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.lastSeenLabel": "前回の認識",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.lastSeenTooltip": "エンティティで最後に受信したデータのタイムスタンプ(entity.lastSeenTimestamp)",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.typeLabel": "型",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.typeTooltip": "エンティティのタイプ(entity.type)",
|
||||
"xpack.inventory.entityActions.euiButtonIcon.showActionsLabel": "アクションを表示",
|
||||
"xpack.inventory.entityActions.exploreInDiscoverLink": "Discoverで探索",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.empty": "タイプがありません",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.loading": "タイプを読み込み中",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.notFound": "タイプが見つかりません",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.placeholder": "フィルタータイプ",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.typeLabel": "エンティティタイプ",
|
||||
"xpack.inventory.entityTypesMultiSelect.typeFilterButtonLabel": "型",
|
||||
"xpack.inventory.featureRegistry.inventoryFeatureName": "インベントリ",
|
||||
"xpack.inventory.groupedInventoryPage.entitiesTotalLabel": "{total}個のエンティティ",
|
||||
"xpack.inventory.groupedInventoryPage.groupedByLabel": "{grouping}でエンティティをグループ化",
|
||||
"xpack.inventory.groupedInventoryPage.groupSelectorLabel": "グループ化を選択",
|
||||
"xpack.inventory.groupedInventoryPage.groupsTotalLabel": "{total}個のグループ",
|
||||
"xpack.inventory.groupedInventoryPage.typeLabel": "型",
|
||||
"xpack.inventory.home.serviceAlertsTable.tooltip.activeAlertsExplanation": "アクティブアラート",
|
||||
"xpack.inventory.inventoryGroupPanel.entitiesBadgeLabel": "エンティティ",
|
||||
"xpack.inventory.inventoryLinkTitle": "インベントリ",
|
||||
"xpack.inventory.inventoryPageHeaderLabel": "インベントリ",
|
||||
"xpack.inventory.noEntitiesEmptyState.actions.title": "エンティティの観測を開始:",
|
||||
"xpack.inventory.noEntitiesEmptyState.body.description": "いくつかのデータを収集することで、観測されたエンティティをすべて一元的に確認できます。",
|
||||
"xpack.inventory.noEntitiesEmptyState.callout.title": "初めて試す場合",
|
||||
"xpack.inventory.noEntitiesEmptyState.description": "エンティティが表示されるまで数分かかる場合があります。1〜2分後に更新してください。",
|
||||
"xpack.inventory.noEntitiesEmptyState.learnMore.link": "詳しくはこちら",
|
||||
"xpack.inventory.noEntitiesEmptyState.title": "エンティティがありません",
|
||||
"xpack.inventory.searchBar.placeholder": "エンティティを名前またはメタデータ(例:entity.type : service)で検索します。",
|
||||
"xpack.inventory.shareLink.shareButtonLabel": "共有",
|
||||
"xpack.inventory.shareLink.shareToastFailureLabel": "短縮URLをコピーできません。",
|
||||
"xpack.inventory.shareLink.shareToastSuccessLabel": "短縮URLがクリップボードにコピーされました!",
|
||||
"xpack.lens.action.exploreInDiscover": "Discoverで探索",
|
||||
"xpack.lens.AggBasedLabel": "集約に基づく可視化",
|
||||
"xpack.lens.app.addToLibrary": "ライブラリに保存",
|
||||
|
@ -31990,8 +31904,6 @@
|
|||
"xpack.observability.enableInspectEsQueriesExperimentName": "ESクエリーを調査",
|
||||
"xpack.observability.enableLegacyUptimeApp": "常にレガシーアップタイムアプリを表示",
|
||||
"xpack.observability.enableLegacyUptimeAppDescription": "デフォルトでは、1週間以上データがない場合、レガシーアップタイムアプリはインターフェースから表示されなくなります。このオプションを有効にすると、常に表示されます。",
|
||||
"xpack.observability.entityCentricExperience": "エンティティ中心のエクスペリエンス",
|
||||
"xpack.observability.entityCentricExperienceDescription": "{technicalPreviewLabel} ユーザーにエンティティ中心の体験を促進します。",
|
||||
"xpack.observability.experimentalBadgeDescription": "この機能はテクニカルプレビュー中であり、将来のリリースでは変更されたり完全に削除されたりする場合があります。Elasticはすべての問題の修正に努めますが、テクニカルプレビュー中の機能には正式なGA機能のサポートSLAが適用されません。",
|
||||
"xpack.observability.experimentalBadgeLabel": "テクニカルプレビュー",
|
||||
"xpack.observability.featureCatalogueDescription": "専用UIで、ログ、メトリック、アプリケーショントレース、システム可用性を連結します。",
|
||||
|
|
|
@ -10597,7 +10597,6 @@
|
|||
"xpack.apm.a.thresholdMet": "已达到阈值",
|
||||
"xpack.apm.add.apm.agent.button.": "添加 APM",
|
||||
"xpack.apm.addDataButtonLabel": "添加数据",
|
||||
"xpack.apm.addDataContextMenu.link": "添加数据",
|
||||
"xpack.apm.agent_explorer.error.missing_configuration": "要使用最新代理版本,必须设置 xpack.apm.latestAgentVersionsUrl。",
|
||||
"xpack.apm.agentConfig.allOptionLabel": "全部",
|
||||
"xpack.apm.agentConfig.apiRequestSize.description": "通过块编码(HTTP 流)发送到 APM Server 摄入 API 的请求正文最大压缩总大小。注意,有可能出现小幅的过冲。允许使用的字节单位包括 `b`、`kb` 和 `mb`。`1kb` 等于 `1024b`。",
|
||||
|
@ -11079,13 +11078,6 @@
|
|||
"xpack.apm.eemFeedback.title": "让我们知道您的想法!",
|
||||
"xpack.apm.emptyMessage.noDataFoundDescription": "尝试其他时间范围或重置搜索筛选。",
|
||||
"xpack.apm.emptyMessage.noDataFoundLabel": "未找到任何数据。",
|
||||
"xpack.apm.entitiesInventoryCallout.ariaLabel": "隐藏实体清单标注",
|
||||
"xpack.apm.entitiesInventoryCallout.linklabel": "试用我们的新库存!",
|
||||
"xpack.apm.entitiesInventoryCallout.linkTooltip": "隐藏此项",
|
||||
"xpack.apm.entityLink.eemGuide.description": "抱歉,由于 {limitationsLink},我们尚无法向您提供有关此服务的更多详情。",
|
||||
"xpack.apm.entityLink.eemGuide.description.link": "Elastic 实体模型存在的限制",
|
||||
"xpack.apm.entityLink.eemGuide.goBackButtonLabel": "返回",
|
||||
"xpack.apm.entityLink.eemGuide.title": "服务不受支持",
|
||||
"xpack.apm.environmentsSelectCustomOptionText": "将 '{searchValue}' 添加为新环境",
|
||||
"xpack.apm.environmentsSelectPlaceholder": "选择环境",
|
||||
"xpack.apm.error.prompt.body": "有关详情,请查看您的浏览器开发者控制台。",
|
||||
|
@ -11361,11 +11353,6 @@
|
|||
"xpack.apm.latencyCorrelations.licenseCheckText": "要使用延迟相关性,必须订阅 Elastic 白金级许可证。使用该功能,您将能够发现哪些字段与性能不佳存在关联。",
|
||||
"xpack.apm.license.button": "开始试用",
|
||||
"xpack.apm.license.title": "开始为期 30 天的免费试用",
|
||||
"xpack.apm.logErrorRate": "日志错误率",
|
||||
"xpack.apm.logErrorRate.tooltip.description": "对于给定 {serviceName},每分钟观察到的错误日志比率。",
|
||||
"xpack.apm.logRate": "日志速率",
|
||||
"xpack.apm.logs.chart.logRate": "日志速率",
|
||||
"xpack.apm.logs.chart.logsErrorRate": "日志错误率",
|
||||
"xpack.apm.managedTable.errorMessage": "无法提取",
|
||||
"xpack.apm.managedTable.loadingDescription": "正在加载……",
|
||||
"xpack.apm.metadata.help": "如何添加标签和其他数据",
|
||||
|
@ -11428,10 +11415,6 @@
|
|||
"xpack.apm.mobileServiceDetails.serviceMapTabLabel": "服务地图",
|
||||
"xpack.apm.mobileServiceDetails.transactionsTabLabel": "事务",
|
||||
"xpack.apm.mobileServices.breadcrumb.title": "服务",
|
||||
"xpack.apm.multiSignal.servicesTable.logErrorRate.tooltip.serviceNameLabel": "service.name",
|
||||
"xpack.apm.multiSignal.servicesTable.logRate.tooltip.description": "对于给定 {serviceName},每分钟观察到的日志比率。",
|
||||
"xpack.apm.multiSignal.servicesTable.logRate.tooltip.serviceNameLabel": "service.name",
|
||||
"xpack.apm.multiSignal.table.tooltip.formula": "公式计算:",
|
||||
"xpack.apm.navigation.apmSettingsTitle": "设置",
|
||||
"xpack.apm.navigation.apmStorageExplorerTitle": "Storage Explorer",
|
||||
"xpack.apm.navigation.apmTutorialTitle": "教程",
|
||||
|
@ -11701,8 +11684,6 @@
|
|||
"xpack.apm.serviceGroups.list.sort.ariaLabel": "按服务组排序",
|
||||
"xpack.apm.serviceGroups.list.sort.recentlyAdded": "最近添加",
|
||||
"xpack.apm.serviceGroups.listDescription": "显示的服务计数反映过去 24 小时的情况。",
|
||||
"xpack.apm.serviceGroups.onlyApm": "仅正在显示的服务 {link}",
|
||||
"xpack.apm.serviceGroups.onlyApmLink": "已使用 APM 检测。",
|
||||
"xpack.apm.serviceGroups.searchResults.error": "检索搜索结果时出错",
|
||||
"xpack.apm.serviceGroups.selectServicesForm.cancel": "取消",
|
||||
"xpack.apm.serviceGroups.selectServicesForm.editGroupDetails": "编辑组详情",
|
||||
|
@ -11873,8 +11854,6 @@
|
|||
"xpack.apm.servicesTable.latencyAvgColumnLabel": "延迟(平均值)",
|
||||
"xpack.apm.servicesTable.metricsExplanationLabel": "这些指标是什么?",
|
||||
"xpack.apm.servicesTable.nameColumnLabel": "名称",
|
||||
"xpack.apm.servicesTable.notAvailableApmMetrics.content": "通过使用 APM 检测您的服务,了解事务延迟、吞吐量和错误率等关键指标。",
|
||||
"xpack.apm.servicesTable.notAvailableApmMetrics.title": "想要查看更多内容?",
|
||||
"xpack.apm.servicesTable.notFoundLabel": "未找到任何服务",
|
||||
"xpack.apm.servicesTable.throughputColumnLabel": "吞吐量",
|
||||
"xpack.apm.servicesTable.tooltip.alertsCount": "活动告警计数",
|
||||
|
@ -11882,21 +11861,6 @@
|
|||
"xpack.apm.servicesTable.tooltip.metricsExplanation": "服务指标将基于其事务类型(可以为请求或页面加载)进行聚合。如果二者均不存在,指标将基于排名靠前的可用事务类型进行聚合。",
|
||||
"xpack.apm.servicesTable.transactionColumnLabel": "事务类型",
|
||||
"xpack.apm.servicesTable.transactionErrorRate": "失败事务率",
|
||||
"xpack.apm.serviceTabEmptyState.defaultPrimaryActionLabel": "添加 APM",
|
||||
"xpack.apm.serviceTabEmptyState.dependenciesContent": "通过使用 APM 进行检测,在内部和第三方服务上查看您服务的依赖项。",
|
||||
"xpack.apm.serviceTabEmptyState.dependenciesTitle": "了解您服务的依赖项",
|
||||
"xpack.apm.serviceTabEmptyState.errorGroupOverviewContent": "向下分析错误至特定事务,以查明您服务内部的特定错误。",
|
||||
"xpack.apm.serviceTabEmptyState.errorGroupOverviewTitle": "通过应用程序识别事务错误",
|
||||
"xpack.apm.serviceTabEmptyState.infrastructureContent": "通过检查运行您的服务的基础设施来排查服务问题。",
|
||||
"xpack.apm.serviceTabEmptyState.infrastructureTitle": "了解运行您的服务的设施",
|
||||
"xpack.apm.serviceTabEmptyState.metricsContent": "查看您的服务实例的指标趋势,以确定可能会影响用户的性能瓶颈。",
|
||||
"xpack.apm.serviceTabEmptyState.metricsTitle": "查看您应用程序的核心指标",
|
||||
"xpack.apm.serviceTabEmptyState.overviewContent": "通过使用 APM 进行检测,了解您的应用程序性能、关系和依赖项。",
|
||||
"xpack.apm.serviceTabEmptyState.overviewTitle": "通过深入了解您的应用程序来更快检测并解决问题",
|
||||
"xpack.apm.serviceTabEmptyState.serviceMapContent": "概括了解您的服务依赖项,以帮助确定可能会影响服务的依赖项。",
|
||||
"xpack.apm.serviceTabEmptyState.serviceMapTitle": "可视化您的服务之间的依赖项",
|
||||
"xpack.apm.serviceTabEmptyState.transactionsContent": "通过向下分析延迟、吞吐量和错误至特定事务,排查您服务的性能故障。",
|
||||
"xpack.apm.serviceTabEmptyState.transactionsTitle": "排查延迟、吞吐量故障和错误",
|
||||
"xpack.apm.settings.agentConfig": "代理配置",
|
||||
"xpack.apm.settings.agentConfig.createConfigButton.tooltip": "您无权创建代理配置",
|
||||
"xpack.apm.settings.agentConfig.descriptionText": "从 APM 应用中微调您的代理配置。更改将自动传播到 APM 代理,因此无需重新部署。",
|
||||
|
@ -24276,56 +24240,6 @@
|
|||
"xpack.ingestPipelines.testPipelineFlyout.outputTab.verboseSwitchLabel": "查看详细输出",
|
||||
"xpack.ingestPipelines.testPipelineFlyout.successNotificationText": "管道已执行",
|
||||
"xpack.ingestPipelines.testPipelineFlyout.title": "测试管道",
|
||||
"xpack.inventory.add.apm.agent.button.": "添加数据",
|
||||
"xpack.inventory.addDataContextMenu.link": "添加数据",
|
||||
"xpack.inventory.apiCall.error.title": "提取资源时出错",
|
||||
"xpack.inventory.appTitle": "库存",
|
||||
"xpack.inventory.associate.service.logs.button": "关联现有服务日志",
|
||||
"xpack.inventory.badgeFilterWithPopover.copyValueButtonEmptyLabel": "复制值",
|
||||
"xpack.inventory.badgeFilterWithPopover.filterForButtonEmptyLabel": "筛除",
|
||||
"xpack.inventory.badgeFilterWithPopover.openPopoverBadgeLabel": "打开弹出框",
|
||||
"xpack.inventory.data_view.creation_failed": "创建数据视图时出错",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.actionsLabel": "操作",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.alertsLabel": "告警",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.alertsTooltip": "活动告警计数",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.entityNameLabel": "实体名称",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.entityNameTooltip": "实体的名称 (entity.displayName)",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.headerLeft": "正在显示第 {currentItems} 个(共 {total} 个){boldEntities}",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.headerLeft.entities": "实体",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.inventoryEntitiesGridLabel": "库存实体网格",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.lastSeen": "{date} @ {time}",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.lastSeenLabel": "最后看到时间",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.lastSeenTooltip": "上次接收的实体数据的时间戳 (entity.lastSeenTimestamp)",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.typeLabel": "类型",
|
||||
"xpack.inventory.entitiesGrid.euiDataGrid.typeTooltip": "实体的类型 (entity.type)",
|
||||
"xpack.inventory.entityActions.euiButtonIcon.showActionsLabel": "显示操作",
|
||||
"xpack.inventory.entityActions.exploreInDiscoverLink": "在 Discover 中浏览",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.empty": "无可用类型",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.loading": "正在加载类型",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.notFound": "找不到任何类型",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.placeholder": "筛选类型",
|
||||
"xpack.inventory.entityTypesMultiSelect.euiSelectable.typeLabel": "实体类型",
|
||||
"xpack.inventory.entityTypesMultiSelect.typeFilterButtonLabel": "类型",
|
||||
"xpack.inventory.featureRegistry.inventoryFeatureName": "库存",
|
||||
"xpack.inventory.groupedInventoryPage.entitiesTotalLabel": "{total} 个实体",
|
||||
"xpack.inventory.groupedInventoryPage.groupedByLabel": "实体分组依据:{grouping}",
|
||||
"xpack.inventory.groupedInventoryPage.groupSelectorLabel": "选择分组",
|
||||
"xpack.inventory.groupedInventoryPage.groupsTotalLabel": "{total} 个组",
|
||||
"xpack.inventory.groupedInventoryPage.typeLabel": "类型",
|
||||
"xpack.inventory.home.serviceAlertsTable.tooltip.activeAlertsExplanation": "活动告警",
|
||||
"xpack.inventory.inventoryGroupPanel.entitiesBadgeLabel": "实体",
|
||||
"xpack.inventory.inventoryLinkTitle": "库存",
|
||||
"xpack.inventory.inventoryPageHeaderLabel": "库存",
|
||||
"xpack.inventory.noEntitiesEmptyState.actions.title": "开始观察您的实体:",
|
||||
"xpack.inventory.noEntitiesEmptyState.body.description": "通过收集某些数据,在一个位置查看您观察到的所有实体。",
|
||||
"xpack.inventory.noEntitiesEmptyState.callout.title": "第一次尝试?",
|
||||
"xpack.inventory.noEntitiesEmptyState.description": "您的实体可能需要数分钟才能显示。请尝试在一或两分钟后刷新。",
|
||||
"xpack.inventory.noEntitiesEmptyState.learnMore.link": "了解详情",
|
||||
"xpack.inventory.noEntitiesEmptyState.title": "无可用实体",
|
||||
"xpack.inventory.searchBar.placeholder": "按名称或其元数据(例如,entity.type:服务)搜索您的实体",
|
||||
"xpack.inventory.shareLink.shareButtonLabel": "共享",
|
||||
"xpack.inventory.shareLink.shareToastFailureLabel": "无法复制短 URL。",
|
||||
"xpack.inventory.shareLink.shareToastSuccessLabel": "短 URL 已复制到剪贴板!",
|
||||
"xpack.lens.action.exploreInDiscover": "在 Discover 中浏览",
|
||||
"xpack.lens.AggBasedLabel": "基于聚合的可视化",
|
||||
"xpack.lens.app.addToLibrary": "保存到库",
|
||||
|
@ -31975,8 +31889,6 @@
|
|||
"xpack.observability.enableInspectEsQueriesExperimentName": "检查 ES 查询",
|
||||
"xpack.observability.enableLegacyUptimeApp": "始终显示旧版 Uptime 应用",
|
||||
"xpack.observability.enableLegacyUptimeAppDescription": "默认情况下,如果超过一周未生成任何数据,将从界面中隐藏旧版 Uptime 应用。 启用此选项以始终显示该应用。",
|
||||
"xpack.observability.entityCentricExperience": "以实体为中心的体验",
|
||||
"xpack.observability.entityCentricExperienceDescription": "{technicalPreviewLabel} 提升以实体为中心的用户体验。",
|
||||
"xpack.observability.experimentalBadgeDescription": "此功能处于技术预览状态,在未来版本中可能会更改或完全移除。 Elastic 将努力修复任何问题,但处于技术预览状态的功能不受正式 GA 功能支持 SLA 的约束。",
|
||||
"xpack.observability.experimentalBadgeLabel": "技术预览",
|
||||
"xpack.observability.featureCatalogueDescription": "通过专用 UI 整合您的日志、指标、应用程序跟踪和系统可用性。",
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export function debug(...args: any[]) {
|
||||
if (process.env.NODE_ENV === 'production' || !process.env.DEBUG_LOGGER) {
|
||||
return;
|
||||
}
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('[DEBUG LOG]', ...args);
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
"plugin": {
|
||||
"id": "entityManager",
|
||||
"configPath": ["xpack", "entityManager"],
|
||||
"browser": true,
|
||||
"browser": false,
|
||||
"server": true,
|
||||
"requiredPlugins": [
|
||||
"security",
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { PluginInitializer, PluginInitializerContext } from '@kbn/core/public';
|
||||
import { Plugin } from './plugin';
|
||||
import { EntityManagerPublicPluginSetup, EntityManagerPublicPluginStart } from './types';
|
||||
|
||||
export const plugin: PluginInitializer<
|
||||
EntityManagerPublicPluginSetup | undefined,
|
||||
EntityManagerPublicPluginStart | undefined
|
||||
> = (context: PluginInitializerContext) => {
|
||||
return new Plugin(context);
|
||||
};
|
||||
|
||||
export { EntityClient } from './lib/entity_client';
|
||||
|
||||
export type { EntityManagerPublicPluginSetup, EntityManagerPublicPluginStart };
|
||||
export type EntityManagerAppId = 'entityManager';
|
||||
|
||||
export {
|
||||
ERROR_API_KEY_NOT_FOUND,
|
||||
ERROR_API_KEY_NOT_VALID,
|
||||
ERROR_API_KEY_SERVICE_DISABLED,
|
||||
ERROR_PARTIAL_BUILTIN_INSTALLATION,
|
||||
ERROR_DEFINITION_STOPPED,
|
||||
} from '../common/errors';
|
||||
|
||||
export { EntityManagerUnauthorizedError } from './lib/errors';
|
|
@ -1,133 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { EntityClient } from './entity_client';
|
||||
import { coreMock } from '@kbn/core/public/mocks';
|
||||
import type { EntityInstance } from '@kbn/entities-schema';
|
||||
|
||||
const commonEntityFields: EntityInstance = {
|
||||
entity: {
|
||||
last_seen_timestamp: '2023-10-09T00:00:00Z',
|
||||
id: '1',
|
||||
display_name: 'entity_name',
|
||||
definition_id: 'entity_definition_id',
|
||||
} as EntityInstance['entity'],
|
||||
};
|
||||
|
||||
type Entity = { [key: string]: any } & { entityIdentityFields: { [key: string]: string[] } };
|
||||
|
||||
describe('EntityClient', () => {
|
||||
let entityClient: EntityClient;
|
||||
|
||||
beforeEach(() => {
|
||||
entityClient = new EntityClient(coreMock.createStart());
|
||||
});
|
||||
|
||||
describe('asKqlFilter', () => {
|
||||
it('should return the kql filter', () => {
|
||||
const entity: Entity = {
|
||||
...commonEntityFields.entity,
|
||||
entityIdentityFields: { source1: ['service.name', 'service.environment'] },
|
||||
type: 'service',
|
||||
['service.name']: 'my-service',
|
||||
};
|
||||
|
||||
const result = entityClient.asKqlFilter({ entity });
|
||||
expect(result).toEqual('service.name: "my-service"');
|
||||
});
|
||||
|
||||
it('should return the kql filter when an identity field value contain special characters', () => {
|
||||
const entity: Entity = {
|
||||
...commonEntityFields.entity,
|
||||
entityIdentityFields: { source1: ['host.name', 'foo.bar'] },
|
||||
type: 'service',
|
||||
['host.name']: 'my-host:some-value:some-other-value',
|
||||
};
|
||||
|
||||
const result = entityClient.asKqlFilter({ entity });
|
||||
expect(result).toEqual('host.name: "my-host:some-value:some-other-value"');
|
||||
});
|
||||
|
||||
it('should return the kql filter when identity_fields is composed by multiple fields', () => {
|
||||
const entity: Entity = {
|
||||
...commonEntityFields.entity,
|
||||
entityIdentityFields: { source1: ['service.name', 'service.environment'] },
|
||||
type: 'service',
|
||||
['service.name']: 'my-service',
|
||||
['service.environment']: 'staging',
|
||||
};
|
||||
|
||||
const result = entityClient.asKqlFilter({ entity });
|
||||
expect(result).toEqual('(service.name: "my-service" AND service.environment: "staging")');
|
||||
});
|
||||
|
||||
it('should ignore fields that are not present in the entity', () => {
|
||||
const entity: Entity = {
|
||||
...commonEntityFields.entity,
|
||||
entityIdentityFields: { source1: ['host.name', 'foo.bar'] },
|
||||
['host.name']: 'my-host',
|
||||
};
|
||||
|
||||
const result = entityClient.asKqlFilter({ entity });
|
||||
expect(result).toEqual('host.name: "my-host"');
|
||||
});
|
||||
});
|
||||
|
||||
describe('getIdentityFieldsValue', () => {
|
||||
it('should return identity fields values', () => {
|
||||
const entity: Entity = {
|
||||
...commonEntityFields.entity,
|
||||
entityIdentityFields: { source1: ['service.name', 'service.environment'] },
|
||||
type: 'service',
|
||||
['service.name']: 'my-service',
|
||||
};
|
||||
|
||||
expect(entityClient.getIdentityFieldsValue({ entity })).toEqual({
|
||||
'service.name': 'my-service',
|
||||
});
|
||||
});
|
||||
|
||||
it('should return identity fields values when identity_fields is composed by multiple fields', () => {
|
||||
const entity: Entity = {
|
||||
...commonEntityFields.entity,
|
||||
entityIdentityFields: { source1: ['service.name', 'service.environment'] },
|
||||
type: 'service',
|
||||
['service.name']: 'my-service',
|
||||
['service.environment']: 'staging',
|
||||
};
|
||||
|
||||
expect(entityClient.getIdentityFieldsValue({ entity })).toEqual({
|
||||
'service.name': 'my-service',
|
||||
'service.environment': 'staging',
|
||||
});
|
||||
});
|
||||
|
||||
it('should return identity fields when field is in the root', () => {
|
||||
const entity: Entity = {
|
||||
...commonEntityFields.entity,
|
||||
entityIdentityFields: { source1: ['name'] },
|
||||
type: 'service',
|
||||
name: 'foo',
|
||||
};
|
||||
|
||||
expect(entityClient.getIdentityFieldsValue({ entity })).toEqual({
|
||||
name: 'foo',
|
||||
});
|
||||
});
|
||||
|
||||
it('should throw an error when identity fields are missing', () => {
|
||||
const entity: Entity = {
|
||||
...commonEntityFields.entity,
|
||||
entityIdentityFields: {},
|
||||
};
|
||||
|
||||
expect(() => entityClient.getIdentityFieldsValue({ entity })).toThrow(
|
||||
'Identity fields are missing'
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,145 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { CoreSetup, CoreStart } from '@kbn/core/public';
|
||||
import {
|
||||
ClientRequestParamsOf,
|
||||
RouteRepositoryClient,
|
||||
createRepositoryClient,
|
||||
isHttpFetchError,
|
||||
} from '@kbn/server-route-repository-client';
|
||||
import { type KueryNode, nodeTypes, toKqlExpression } from '@kbn/es-query';
|
||||
import type { EntityDefinition } from '@kbn/entities-schema';
|
||||
import type { EntityDefinitionWithState } from '../../server/lib/entities/types';
|
||||
import {
|
||||
DisableManagedEntityResponse,
|
||||
EnableManagedEntityResponse,
|
||||
ManagedEntityEnabledResponse,
|
||||
} from '../../common/types_api';
|
||||
import type { EntityManagerRouteRepository } from '../../server';
|
||||
import { EntityManagerUnauthorizedError } from './errors';
|
||||
|
||||
type EntityManagerRepositoryClient = RouteRepositoryClient<EntityManagerRouteRepository, {}>;
|
||||
|
||||
type QueryParamOf<T extends { params?: any }> = Exclude<T['params'], undefined>['query'];
|
||||
|
||||
type DeleteEntityDefinitionQuery = QueryParamOf<
|
||||
ClientRequestParamsOf<
|
||||
EntityManagerRouteRepository,
|
||||
'DELETE /internal/entities/managed/enablement'
|
||||
>
|
||||
>;
|
||||
|
||||
type CreateEntityDefinitionQuery = QueryParamOf<
|
||||
ClientRequestParamsOf<EntityManagerRouteRepository, 'PUT /internal/entities/managed/enablement'>
|
||||
>;
|
||||
|
||||
export class EntityClient {
|
||||
public readonly repositoryClient: EntityManagerRepositoryClient['fetch'];
|
||||
|
||||
constructor(core: CoreStart | CoreSetup) {
|
||||
this.repositoryClient = createRepositoryClient<EntityManagerRouteRepository>(core).fetch;
|
||||
}
|
||||
|
||||
async isManagedEntityDiscoveryEnabled(): Promise<ManagedEntityEnabledResponse> {
|
||||
return await this.repositoryClient('GET /internal/entities/managed/enablement');
|
||||
}
|
||||
|
||||
async enableManagedEntityDiscovery(
|
||||
query?: CreateEntityDefinitionQuery
|
||||
): Promise<EnableManagedEntityResponse> {
|
||||
try {
|
||||
return await this.repositoryClient('PUT /internal/entities/managed/enablement', {
|
||||
params: {
|
||||
query: {
|
||||
installOnly: query?.installOnly,
|
||||
},
|
||||
},
|
||||
});
|
||||
} catch (err) {
|
||||
if (isHttpFetchError(err) && err.body?.statusCode === 403) {
|
||||
throw new EntityManagerUnauthorizedError(err.body.message);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
async disableManagedEntityDiscovery(
|
||||
query?: DeleteEntityDefinitionQuery
|
||||
): Promise<DisableManagedEntityResponse> {
|
||||
try {
|
||||
return await this.repositoryClient('DELETE /internal/entities/managed/enablement', {
|
||||
params: {
|
||||
query: {
|
||||
deleteData: query?.deleteData,
|
||||
},
|
||||
},
|
||||
});
|
||||
} catch (err) {
|
||||
if (isHttpFetchError(err) && err.body?.statusCode === 403) {
|
||||
throw new EntityManagerUnauthorizedError(err.body.message);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
async getEntityDefinition(
|
||||
id: string
|
||||
): Promise<{ definitions: EntityDefinition[] | EntityDefinitionWithState[] }> {
|
||||
try {
|
||||
return await this.repositoryClient('GET /internal/entities/definition/{id?}', {
|
||||
params: {
|
||||
path: { id },
|
||||
query: { page: 1, perPage: 1 },
|
||||
},
|
||||
});
|
||||
} catch (err) {
|
||||
if (isHttpFetchError(err) && err.body?.statusCode === 403) {
|
||||
throw new EntityManagerUnauthorizedError(err.body.message);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
asKqlFilter({
|
||||
entity,
|
||||
}: {
|
||||
entity: { [key: string]: any } & { entityIdentityFields: { [key: string]: string[] } };
|
||||
}) {
|
||||
const identityFieldsValue = this.getIdentityFieldsValue({ entity });
|
||||
|
||||
const nodes: KueryNode[] = Object.entries(identityFieldsValue).map(([identityField, value]) => {
|
||||
return nodeTypes.function.buildNode('is', identityField, `"${value}"`);
|
||||
});
|
||||
|
||||
if (nodes.length === 0) return '';
|
||||
|
||||
const kqlExpression = nodes.length > 1 ? nodeTypes.function.buildNode('and', nodes) : nodes[0];
|
||||
|
||||
return toKqlExpression(kqlExpression);
|
||||
}
|
||||
|
||||
getIdentityFieldsValue({
|
||||
entity,
|
||||
}: {
|
||||
entity: { [key: string]: any } & { entityIdentityFields: { [key: string]: string[] } };
|
||||
}): Record<string, any> {
|
||||
const { entityIdentityFields: identityFields } = entity;
|
||||
if (!Object.keys(identityFields || {}).length) {
|
||||
throw new Error('Identity fields are missing');
|
||||
}
|
||||
|
||||
return Object.values(identityFields).reduce((acc: Record<string, any>, fields) => {
|
||||
fields.forEach((field) => {
|
||||
if (entity?.[field]) {
|
||||
acc[field] = entity[field];
|
||||
}
|
||||
});
|
||||
return acc;
|
||||
}, {} as Record<string, string>);
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export class EntityManagerUnauthorizedError extends Error {
|
||||
constructor(message: string) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { CoreSetup, CoreStart, PluginInitializerContext } from '@kbn/core/public';
|
||||
import { Logger } from '@kbn/logging';
|
||||
|
||||
import { EntityManagerPluginClass } from './types';
|
||||
import type { EntityManagerPublicConfig } from '../common/config';
|
||||
import { EntityClient } from './lib/entity_client';
|
||||
|
||||
export class Plugin implements EntityManagerPluginClass {
|
||||
public config: EntityManagerPublicConfig;
|
||||
public logger: Logger;
|
||||
|
||||
constructor(context: PluginInitializerContext<{}>) {
|
||||
this.config = context.config.get();
|
||||
this.logger = context.logger.get();
|
||||
}
|
||||
|
||||
setup(core: CoreSetup) {
|
||||
return {
|
||||
entityClient: new EntityClient(core),
|
||||
};
|
||||
}
|
||||
|
||||
start(core: CoreStart) {
|
||||
return {
|
||||
entityClient: new EntityClient(core),
|
||||
};
|
||||
}
|
||||
|
||||
stop() {}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import type { Plugin as PluginClass } from '@kbn/core/public';
|
||||
import type { EntityClient } from './lib/entity_client';
|
||||
|
||||
export interface EntityManagerPublicPluginSetup {
|
||||
entityClient: EntityClient;
|
||||
}
|
||||
export interface EntityManagerPublicPluginStart {
|
||||
entityClient: EntityClient;
|
||||
}
|
||||
|
||||
export type EntityManagerPluginClass = PluginClass<
|
||||
EntityManagerPublicPluginSetup,
|
||||
EntityManagerPublicPluginStart
|
||||
>;
|
|
@ -18,14 +18,6 @@ export type {
|
|||
};
|
||||
export { config };
|
||||
|
||||
export {
|
||||
CREATE_ENTITY_TYPE_DEFINITION_PRIVILEGE,
|
||||
CREATE_ENTITY_SOURCE_DEFINITION_PRIVILEGE,
|
||||
READ_ENTITY_TYPE_DEFINITION_PRIVILEGE,
|
||||
READ_ENTITY_SOURCE_DEFINITION_PRIVILEGE,
|
||||
READ_ENTITIES_PRIVILEGE,
|
||||
} from './lib/v2/constants';
|
||||
|
||||
export const plugin = async (context: PluginInitializerContext<EntityManagerConfig>) => {
|
||||
const { EntityManagerServerPlugin } = await import('./plugin');
|
||||
return new EntityManagerServerPlugin(context);
|
||||
|
|
|
@ -22,20 +22,15 @@ import { stopTransforms } from './entities/stop_transforms';
|
|||
import { deleteIndices } from './entities/delete_index';
|
||||
import { EntityDefinitionWithState } from './entities/types';
|
||||
import { EntityDefinitionUpdateConflict } from './entities/errors/entity_definition_update_conflict';
|
||||
import { EntityClient as EntityClient_v2 } from './v2/entity_client';
|
||||
|
||||
export class EntityClient {
|
||||
public v2: EntityClient_v2;
|
||||
|
||||
constructor(
|
||||
private options: {
|
||||
clusterClient: IScopedClusterClient;
|
||||
soClient: SavedObjectsClientContract;
|
||||
logger: Logger;
|
||||
}
|
||||
) {
|
||||
this.v2 = new EntityClient_v2(options);
|
||||
}
|
||||
) {}
|
||||
|
||||
async createEntityDefinition({
|
||||
definition,
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
// Definitions index
|
||||
|
||||
export const DEFINITIONS_ALIAS = '.kibana_entities-definitions';
|
||||
export const TEMPLATE_VERSION = 1;
|
||||
|
||||
// Privileges
|
||||
|
||||
export const CREATE_ENTITY_TYPE_DEFINITION_PRIVILEGE = 'create_entity_type_definition';
|
||||
export const CREATE_ENTITY_SOURCE_DEFINITION_PRIVILEGE = 'create_entity_source_definition';
|
||||
export const READ_ENTITY_TYPE_DEFINITION_PRIVILEGE = 'read_entity_type_definition';
|
||||
export const READ_ENTITY_SOURCE_DEFINITION_PRIVILEGE = 'read_entity_source_definition';
|
||||
export const READ_ENTITIES_PRIVILEGE = 'read_entities';
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export const BUILT_IN_ID_PREFIX = 'built_in_';
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BuiltInDefinition } from '../../types';
|
||||
import { BUILT_IN_ID_PREFIX } from './constants';
|
||||
|
||||
export const builtInContainersFromEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}containers_from_ecs_data`,
|
||||
display_name: 'Containers',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}containers_from_ecs_data_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}containers_from_ecs_data`,
|
||||
index_patterns: ['filebeat-*', 'logs-*', 'metrics-*', 'metricbeat-*'],
|
||||
identity_fields: ['container.id'],
|
||||
display_name: 'container.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from './constants';
|
||||
import { BuiltInDefinition } from '../../types';
|
||||
|
||||
export const builtInHostsFromEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}hosts_from_ecs_data`,
|
||||
display_name: 'Hosts',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}hosts_from_ecs_data_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}hosts_from_ecs_data`,
|
||||
index_patterns: ['filebeat-*', 'logs-*', 'metrics-*', 'metricbeat-*'],
|
||||
identity_fields: ['host.name'],
|
||||
display_name: 'host.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { builtInServicesFromEcsEntityDefinition } from './services_from_ecs_data';
|
||||
import { builtInHostsFromEcsEntityDefinition } from './hosts_from_ecs_data';
|
||||
import { builtInContainersFromEcsEntityDefinition } from './containers_from_ecs_data';
|
||||
import { BuiltInDefinition } from '../../types';
|
||||
|
||||
import * as kubernetes from './kubernetes';
|
||||
|
||||
export const builtInDefinitions: BuiltInDefinition[] = [
|
||||
builtInServicesFromEcsEntityDefinition,
|
||||
builtInHostsFromEcsEntityDefinition,
|
||||
builtInContainersFromEcsEntityDefinition,
|
||||
...Object.values(kubernetes),
|
||||
];
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonEcsIndexPatterns } from './ecs_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesClusterEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_cluster_ecs`,
|
||||
display_name: 'Kubernetes Clusters (ECS)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_cluster_ecs_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_cluster_ecs`,
|
||||
index_patterns: commonEcsIndexPatterns,
|
||||
identity_fields: ['orchestrator.cluster.name'],
|
||||
display_name: 'orchestrator.cluster.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['orchestrator.cluster.name: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonEcsIndexPatterns } from './ecs_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesCronJobEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_cron_job_ecs`,
|
||||
display_name: 'Kubernetes CronJobs (ECS)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_cron_job_ecs_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_cron_job_ecs`,
|
||||
index_patterns: commonEcsIndexPatterns,
|
||||
identity_fields: ['kubernetes.cronjob.name'],
|
||||
display_name: 'kubernetes.cronjob.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['kubernetes.cronjob.name: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonEcsIndexPatterns } from './ecs_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesDaemonSetEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_daemon_set_ecs`,
|
||||
display_name: 'Kubernetes DaemonSets (ECS)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_daemon_set_ecs_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_daemon_set_ecs`,
|
||||
index_patterns: commonEcsIndexPatterns,
|
||||
identity_fields: ['kubernetes.daemonset.name'],
|
||||
display_name: 'kubernetes.daemonset.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['kubernetes.daemonset.name: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonEcsIndexPatterns } from './ecs_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesDeploymentEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_deployment_ecs`,
|
||||
display_name: 'Kubernetes Deployments (ECS)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_deployment_ecs_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_deployment_ecs`,
|
||||
index_patterns: commonEcsIndexPatterns,
|
||||
identity_fields: ['kubernetes.deployment.name'],
|
||||
display_name: 'kubernetes.deployment.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['kubernetes.deployment.name: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export const commonEcsIndexPatterns = ['metrics-kubernetes*', 'logs-*'];
|
|
@ -1,17 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export { builtInKubernetesClusterEcsEntityDefinition } from './cluster';
|
||||
export { builtInKubernetesNodeEcsEntityDefinition } from './node';
|
||||
export { builtInKubernetesPodEcsEntityDefinition } from './pod';
|
||||
export { builtInKubernetesReplicaSetEcsEntityDefinition } from './replica_set';
|
||||
export { builtInKubernetesDeploymentEcsEntityDefinition } from './deployment';
|
||||
export { builtInKubernetesStatefulSetEcsEntityDefinition } from './stateful_set';
|
||||
export { builtInKubernetesDaemonSetEcsEntityDefinition } from './daemon_set';
|
||||
export { builtInKubernetesJobEcsEntityDefinition } from './job';
|
||||
export { builtInKubernetesCronJobEcsEntityDefinition } from './cron_job';
|
||||
export { builtInKubernetesServiceEcsEntityDefinition } from './service';
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonEcsIndexPatterns } from './ecs_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesJobEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_job_ecs`,
|
||||
display_name: 'Kubernetes Jobs (ECS)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_job_ecs_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_job_ecs`,
|
||||
index_patterns: commonEcsIndexPatterns,
|
||||
identity_fields: ['kubernetes.job.name'],
|
||||
display_name: 'kubernetes.job.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['kubernetes.job.name: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonEcsIndexPatterns } from './ecs_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesNodeEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_node_ecs`,
|
||||
display_name: 'Kubernetes Nodes (ECS)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_node_ecs_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_node_ecs`,
|
||||
index_patterns: commonEcsIndexPatterns,
|
||||
identity_fields: ['kubernetes.node.name'],
|
||||
display_name: 'kubernetes.node.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['kubernetes.node.name: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonEcsIndexPatterns } from './ecs_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesPodEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_pod_ecs`,
|
||||
display_name: 'Kubernetes Pods (ECS)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_pod_ecs_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_pod_ecs`,
|
||||
index_patterns: commonEcsIndexPatterns,
|
||||
identity_fields: ['kubernetes.pod.uid'],
|
||||
display_name: 'kubernetes.pod.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['kubernetes.pod.uid: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonEcsIndexPatterns } from './ecs_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesReplicaSetEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_replica_set_ecs`,
|
||||
display_name: 'Kubernetes ReplicaSets (ECS)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_replica_set_ecs_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_replica_set_ecs`,
|
||||
index_patterns: commonEcsIndexPatterns,
|
||||
identity_fields: ['kubernetes.replicaset.name'],
|
||||
display_name: 'kubernetes.replicaset.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['kubernetes.replicaset.name: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonEcsIndexPatterns } from './ecs_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesServiceEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_service_ecs`,
|
||||
display_name: 'Kubernetes Services (ECS)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_service_ecs_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_service_ecs`,
|
||||
index_patterns: commonEcsIndexPatterns,
|
||||
identity_fields: ['kubernetes.service.name'],
|
||||
display_name: 'kubernetes.service.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['kubernetes.service.name: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonEcsIndexPatterns } from './ecs_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesStatefulSetEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_stateful_set_ecs`,
|
||||
display_name: 'Kubernetes StatefulSets (ECS)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_stateful_set_ecs_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_stateful_set_ecs`,
|
||||
index_patterns: commonEcsIndexPatterns,
|
||||
identity_fields: ['kubernetes.statefulset.name'],
|
||||
display_name: 'kubernetes.statefulset.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['kubernetes.statefulset.name: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './ecs';
|
||||
export * from './semconv';
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonOtelIndexPatterns } from './otel_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesClusterSemConvEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_cluster_semconv`,
|
||||
display_name: 'Kubernetes Clusters (OTEL)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_cluster_semconv_semconv`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_cluster_semconv`,
|
||||
index_patterns: commonOtelIndexPatterns,
|
||||
identity_fields: ['k8s.cluster.uid'],
|
||||
display_name: 'k8s.cluster.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['k8s.cluster.uid: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonOtelIndexPatterns } from './otel_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesCronJobSemConvEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_cron_job_semconv`,
|
||||
display_name: 'Kubernetes CronJobs (OTEL)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_cron_job_semconv_semconv`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_cron_job_semconv`,
|
||||
index_patterns: commonOtelIndexPatterns,
|
||||
identity_fields: ['k8s.cronjob.uid'],
|
||||
display_name: 'k8s.cronjob.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['k8s.cronjob.uid: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonOtelIndexPatterns } from './otel_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesDaemonSetSemConvEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_daemon_set_semconv`,
|
||||
display_name: 'Kubernetes DaemonSets (OTEL)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_daemon_set_semconv_semconv`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_daemon_set_semconv`,
|
||||
index_patterns: commonOtelIndexPatterns,
|
||||
identity_fields: ['k8s.daemonset.uid'],
|
||||
display_name: 'k8s.daemonset.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['k8s.daemonset.uid: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonOtelIndexPatterns } from './otel_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesDeploymentSemConvEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_deployment_semconv`,
|
||||
display_name: 'Kubernetes Deployments (OTEL)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_deployment_semconv_semconv`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_deployment_semconv`,
|
||||
index_patterns: commonOtelIndexPatterns,
|
||||
identity_fields: ['k8s.deployment.uid'],
|
||||
display_name: 'k8s.deployment.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['k8s.deployment.uid: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,16 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export { builtInKubernetesClusterSemConvEntityDefinition } from './cluster';
|
||||
export { builtInKubernetesNodeSemConvEntityDefinition } from './node';
|
||||
export { builtInKubernetesPodSemConvEntityDefinition } from './pod';
|
||||
export { builtInKubernetesReplicaSetSemConvEntityDefinition } from './replica_set';
|
||||
export { builtInKubernetesDeploymentSemConvEntityDefinition } from './deployment';
|
||||
export { builtInKubernetesStatefulSetSemConvEntityDefinition } from './stateful_set';
|
||||
export { builtInKubernetesDaemonSetSemConvEntityDefinition } from './daemon_set';
|
||||
export { builtInKubernetesJobSemConvEntityDefinition } from './job';
|
||||
export { builtInKubernetesCronJobSemConvEntityDefinition } from './cron_job';
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonOtelIndexPatterns } from './otel_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesJobSemConvEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_job_semconv`,
|
||||
display_name: 'Kubernetes Jobs (OTEL)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_job_semconv_semconv`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_job_semconv`,
|
||||
index_patterns: commonOtelIndexPatterns,
|
||||
identity_fields: ['k8s.job.uid'],
|
||||
display_name: 'k8s.job.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['k8s.job.uid: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonOtelIndexPatterns } from './otel_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesNodeSemConvEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_node_semconv`,
|
||||
display_name: 'Kubernetes Nodes (OTEL)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_node_semconv_semconv`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_node_semconv`,
|
||||
index_patterns: commonOtelIndexPatterns,
|
||||
identity_fields: ['k8s.node.uid'],
|
||||
display_name: 'k8s.node.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['k8s.node.uid: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
export const commonOtelIndexPatterns = ['metrics-*otel*', 'logs-*'];
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonOtelIndexPatterns } from './otel_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesPodSemConvEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_pod_semconv`,
|
||||
display_name: 'Kubernetes Pods (OTEL)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_pod_semconv_semconv`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_pod_semconv`,
|
||||
index_patterns: commonOtelIndexPatterns,
|
||||
identity_fields: ['k8s.pod.uid'],
|
||||
display_name: 'k8s.pod.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['k8s.pod.uid: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonOtelIndexPatterns } from './otel_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesReplicaSetSemConvEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_replica_set_semconv`,
|
||||
display_name: 'Kubernetes ReplicaSets (OTEL)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_replica_set_semconv_semconv`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_replica_set_semconv`,
|
||||
index_patterns: commonOtelIndexPatterns,
|
||||
identity_fields: ['k8s.replicaset.uid'],
|
||||
display_name: 'k8s.replicaset.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['k8s.replicaset.uid: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BUILT_IN_ID_PREFIX } from '../../constants';
|
||||
import { commonOtelIndexPatterns } from './otel_index_patterns';
|
||||
import { BuiltInDefinition } from '../../../../types';
|
||||
|
||||
export const builtInKubernetesStatefulSetSemConvEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_stateful_set_semconv`,
|
||||
display_name: 'Kubernetes StatefulSets (OTEL)',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}kubernetes_stateful_set_semconv_semconv`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}kubernetes_stateful_set_semconv`,
|
||||
index_patterns: commonOtelIndexPatterns,
|
||||
identity_fields: ['k8s.statefulset.uid'],
|
||||
display_name: 'k8s.statefulset.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: ['k8s.statefulset.uid: *'],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { BuiltInDefinition } from '../../types';
|
||||
import { BUILT_IN_ID_PREFIX } from './constants';
|
||||
|
||||
export const builtInServicesFromEcsEntityDefinition: BuiltInDefinition = {
|
||||
type: {
|
||||
id: `${BUILT_IN_ID_PREFIX}services_from_ecs_data`,
|
||||
display_name: 'Services',
|
||||
},
|
||||
sources: [
|
||||
{
|
||||
id: `${BUILT_IN_ID_PREFIX}services_from_ecs_data_ecs`,
|
||||
type_id: `${BUILT_IN_ID_PREFIX}services_from_ecs_data`,
|
||||
index_patterns: ['logs-*', 'filebeat*', 'traces-*'],
|
||||
identity_fields: ['service.name'],
|
||||
display_name: 'service.name',
|
||||
timestamp_field: '@timestamp',
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -1,102 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { EntityV2 } from '@kbn/entities-schema';
|
||||
import { readSourceDefinitions } from './source_definition';
|
||||
import { loggerMock } from '@kbn/logging-mocks';
|
||||
import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks';
|
||||
import type { EntitySourceDefinition } from '../types';
|
||||
import { UnknownEntityType } from '../errors/unknown_entity_type';
|
||||
import { identityFieldsBySource } from './identity_fields_by_source';
|
||||
|
||||
const readSourceDefinitionsMock = readSourceDefinitions as jest.Mock;
|
||||
jest.mock('./source_definition', () => ({
|
||||
readSourceDefinitions: jest.fn(),
|
||||
}));
|
||||
const esClientMock = elasticsearchServiceMock.createClusterClient();
|
||||
const logger = loggerMock.create();
|
||||
|
||||
describe('identityFieldsBySource', () => {
|
||||
it('throws if no sources are found for the type', async () => {
|
||||
const instance: EntityV2 = {
|
||||
'entity.type': 'my_type',
|
||||
'entity.id': 'whatever',
|
||||
'entity.display_name': 'Whatever',
|
||||
};
|
||||
|
||||
const sources: EntitySourceDefinition[] = [];
|
||||
readSourceDefinitionsMock.mockResolvedValue(sources);
|
||||
|
||||
await expect(
|
||||
identityFieldsBySource(instance['entity.type'], esClientMock, logger)
|
||||
).rejects.toThrowError(UnknownEntityType);
|
||||
});
|
||||
|
||||
it('returns the correct identity fields with a single source', async () => {
|
||||
const instance: EntityV2 = {
|
||||
'entity.type': 'my_type',
|
||||
'entity.id': 'whatever',
|
||||
'entity.display_name': 'Whatever',
|
||||
'host.name': 'my_host',
|
||||
};
|
||||
|
||||
const sources: EntitySourceDefinition[] = [
|
||||
{
|
||||
id: 'my_source',
|
||||
type_id: 'my_type',
|
||||
identity_fields: ['host.name'],
|
||||
index_patterns: [],
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
];
|
||||
readSourceDefinitionsMock.mockResolvedValue(sources);
|
||||
|
||||
await expect(
|
||||
identityFieldsBySource(instance['entity.type'], esClientMock, logger)
|
||||
).resolves.toEqual({
|
||||
my_source: ['host.name'],
|
||||
});
|
||||
});
|
||||
|
||||
it('returns the correct identity fields with multiple sources', async () => {
|
||||
const instance: EntityV2 = {
|
||||
'entity.type': 'my_type',
|
||||
'entity.id': 'whatever',
|
||||
'entity.display_name': 'Whatever',
|
||||
'host.name': 'my_host',
|
||||
'host.os': 'my_os',
|
||||
};
|
||||
|
||||
const sources: EntitySourceDefinition[] = [
|
||||
{
|
||||
id: 'my_source_host',
|
||||
type_id: 'my_type',
|
||||
identity_fields: ['host.name'],
|
||||
index_patterns: [],
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
{
|
||||
id: 'my_source_os',
|
||||
type_id: 'my_type',
|
||||
identity_fields: ['host.os'],
|
||||
index_patterns: [],
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
];
|
||||
readSourceDefinitionsMock.mockResolvedValue(sources);
|
||||
|
||||
await expect(
|
||||
identityFieldsBySource(instance['entity.type'], esClientMock, logger)
|
||||
).resolves.toEqual({
|
||||
my_source_host: ['host.name'],
|
||||
my_source_os: ['host.os'],
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { EntityV2 } from '@kbn/entities-schema';
|
||||
import { Logger } from '@kbn/core/server';
|
||||
import { readSourceDefinitions } from './source_definition';
|
||||
import { InternalClusterClient } from '../types';
|
||||
import { UnknownEntityType } from '../errors/unknown_entity_type';
|
||||
|
||||
export async function identityFieldsBySource(
|
||||
type: EntityV2['entity.type'],
|
||||
clusterClient: InternalClusterClient,
|
||||
logger: Logger
|
||||
) {
|
||||
const sources = await readSourceDefinitions(clusterClient, logger, {
|
||||
type,
|
||||
});
|
||||
|
||||
if (sources.length === 0) {
|
||||
throw new UnknownEntityType(`No sources found for type ${type}`);
|
||||
}
|
||||
|
||||
const identityFields: { [key: string]: string[] } = {};
|
||||
|
||||
sources.forEach((source) => {
|
||||
const { id, identity_fields: fields } = source;
|
||||
|
||||
identityFields[id] = fields;
|
||||
});
|
||||
|
||||
return identityFields;
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { IClusterClient, Logger } from '@kbn/core/server';
|
||||
import { storeTypeDefinition } from './type_definition';
|
||||
import { storeSourceDefinition } from './source_definition';
|
||||
import { builtInDefinitions } from './built_in';
|
||||
import { EntitySourceDefinition, EntityTypeDefinition } from '../types';
|
||||
|
||||
export async function installBuiltInDefinitions(clusterClient: IClusterClient, logger: Logger) {
|
||||
logger.debug('Installing built in entity definitions');
|
||||
|
||||
const types: EntityTypeDefinition[] = [];
|
||||
const sources: EntitySourceDefinition[] = [];
|
||||
for (const definition of builtInDefinitions) {
|
||||
types.push(definition.type);
|
||||
sources.push(...definition.sources);
|
||||
}
|
||||
|
||||
const typeInstallations = await Promise.allSettled(
|
||||
types.map((type) => storeTypeDefinition({ type, clusterClient, logger, replace: true }))
|
||||
);
|
||||
|
||||
typeInstallations.forEach((installation) => {
|
||||
if (installation.status === 'rejected') {
|
||||
logger.error(installation.reason);
|
||||
}
|
||||
});
|
||||
|
||||
const sourceInstallations = await Promise.allSettled(
|
||||
sources.map((source) =>
|
||||
storeSourceDefinition({
|
||||
source,
|
||||
clusterClient,
|
||||
logger,
|
||||
replace: true,
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
// This may fail because the type installation failed and storeSourceDefinition verifies that the type exists first
|
||||
// It may also fail for other reasons but we continue in case there are more sources for the same type that might succeed
|
||||
sourceInstallations.forEach((installation) => {
|
||||
if (installation.status === 'rejected') {
|
||||
logger.error(installation.reason);
|
||||
}
|
||||
});
|
||||
}
|
|
@ -1,183 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { EntityV2 } from '@kbn/entities-schema';
|
||||
import { instanceAsFilter } from './instance_as_filter';
|
||||
import { readSourceDefinitions } from './source_definition';
|
||||
import { loggerMock } from '@kbn/logging-mocks';
|
||||
import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks';
|
||||
import { EntitySourceDefinition } from '../types';
|
||||
import { UnknownEntityType } from '../errors/unknown_entity_type';
|
||||
import { InvalidEntityInstance } from '../errors/invalid_entity_instance';
|
||||
|
||||
const readSourceDefinitionsMock = readSourceDefinitions as jest.Mock;
|
||||
jest.mock('./source_definition', () => ({
|
||||
readSourceDefinitions: jest.fn(),
|
||||
}));
|
||||
const esClientMock = elasticsearchServiceMock.createClusterClient();
|
||||
const logger = loggerMock.create();
|
||||
|
||||
describe('instanceAsFilter', () => {
|
||||
it('throws if no sources are found for the type', async () => {
|
||||
const instance: EntityV2 = {
|
||||
'entity.type': 'my_type',
|
||||
'entity.id': 'whatever',
|
||||
'entity.display_name': 'Whatever',
|
||||
};
|
||||
|
||||
const sources: EntitySourceDefinition[] = [];
|
||||
readSourceDefinitionsMock.mockResolvedValue(sources);
|
||||
|
||||
await expect(instanceAsFilter(instance, esClientMock, logger)).rejects.toThrowError(
|
||||
UnknownEntityType
|
||||
);
|
||||
});
|
||||
|
||||
it('throws if the instance cannot match any sources due to missing identity fields', async () => {
|
||||
const instance: EntityV2 = {
|
||||
'entity.type': 'my_type',
|
||||
'entity.id': 'whatever',
|
||||
'entity.display_name': 'Whatever',
|
||||
};
|
||||
|
||||
const sources: EntitySourceDefinition[] = [
|
||||
{
|
||||
id: 'my_source',
|
||||
type_id: 'my_type',
|
||||
identity_fields: ['host.name'],
|
||||
index_patterns: [],
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
];
|
||||
readSourceDefinitionsMock.mockResolvedValue(sources);
|
||||
|
||||
await expect(instanceAsFilter(instance, esClientMock, logger)).rejects.toThrowError(
|
||||
InvalidEntityInstance
|
||||
);
|
||||
});
|
||||
|
||||
it('creates a single source filter for a single identity field', async () => {
|
||||
const instance: EntityV2 = {
|
||||
'entity.type': 'my_type',
|
||||
'entity.id': 'whatever',
|
||||
'entity.display_name': 'Whatever',
|
||||
'host.name': 'my_host',
|
||||
};
|
||||
|
||||
const sources: EntitySourceDefinition[] = [
|
||||
{
|
||||
id: 'my_source',
|
||||
type_id: 'my_type',
|
||||
identity_fields: ['host.name'],
|
||||
index_patterns: [],
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
];
|
||||
readSourceDefinitionsMock.mockResolvedValue(sources);
|
||||
|
||||
await expect(instanceAsFilter(instance, esClientMock, logger)).resolves.toBe(
|
||||
'(host.name: "my_host")'
|
||||
);
|
||||
});
|
||||
|
||||
it('creates a single source filter for multiple identity field', async () => {
|
||||
const instance: EntityV2 = {
|
||||
'entity.type': 'my_type',
|
||||
'entity.id': 'whatever',
|
||||
'entity.display_name': 'Whatever',
|
||||
'host.name': 'my_host',
|
||||
'host.os': 'my_os',
|
||||
};
|
||||
|
||||
const sources: EntitySourceDefinition[] = [
|
||||
{
|
||||
id: 'my_source',
|
||||
type_id: 'my_type',
|
||||
identity_fields: ['host.name', 'host.os'],
|
||||
index_patterns: [],
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
];
|
||||
readSourceDefinitionsMock.mockResolvedValue(sources);
|
||||
|
||||
await expect(instanceAsFilter(instance, esClientMock, logger)).resolves.toBe(
|
||||
'(host.name: "my_host" AND host.os: "my_os")'
|
||||
);
|
||||
});
|
||||
|
||||
it('creates multiple source filters for a single identity field', async () => {
|
||||
const instance: EntityV2 = {
|
||||
'entity.type': 'my_type',
|
||||
'entity.id': 'whatever',
|
||||
'entity.display_name': 'Whatever',
|
||||
'host.name': 'my_host',
|
||||
'host.os': 'my_os',
|
||||
};
|
||||
|
||||
const sources: EntitySourceDefinition[] = [
|
||||
{
|
||||
id: 'my_source_host',
|
||||
type_id: 'my_type',
|
||||
identity_fields: ['host.name'],
|
||||
index_patterns: [],
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
{
|
||||
id: 'my_source_os',
|
||||
type_id: 'my_type',
|
||||
identity_fields: ['host.os'],
|
||||
index_patterns: [],
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
];
|
||||
readSourceDefinitionsMock.mockResolvedValue(sources);
|
||||
|
||||
await expect(instanceAsFilter(instance, esClientMock, logger)).resolves.toBe(
|
||||
'(host.name: "my_host") OR (host.os: "my_os")'
|
||||
);
|
||||
});
|
||||
|
||||
it('creates multiple source filters for multiple identity field', async () => {
|
||||
const instance: EntityV2 = {
|
||||
'entity.type': 'my_type',
|
||||
'entity.id': 'whatever',
|
||||
'entity.display_name': 'Whatever',
|
||||
'host.name': 'my_host',
|
||||
'host.os': 'my_os',
|
||||
'host.arch': 'my_arch',
|
||||
};
|
||||
|
||||
const sources: EntitySourceDefinition[] = [
|
||||
{
|
||||
id: 'my_source_host',
|
||||
type_id: 'my_type',
|
||||
identity_fields: ['host.name', 'host.arch'],
|
||||
index_patterns: [],
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
{
|
||||
id: 'my_source_os',
|
||||
type_id: 'my_type',
|
||||
identity_fields: ['host.os', 'host.arch'],
|
||||
index_patterns: [],
|
||||
metadata_fields: [],
|
||||
filters: [],
|
||||
},
|
||||
];
|
||||
readSourceDefinitionsMock.mockResolvedValue(sources);
|
||||
|
||||
await expect(instanceAsFilter(instance, esClientMock, logger)).resolves.toBe(
|
||||
'(host.name: "my_host" AND host.arch: "my_arch") OR (host.os: "my_os" AND host.arch: "my_arch")'
|
||||
);
|
||||
});
|
||||
});
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { EntityV2 } from '@kbn/entities-schema';
|
||||
import { Logger } from '@kbn/core/server';
|
||||
import { compact } from 'lodash';
|
||||
import { readSourceDefinitions } from './source_definition';
|
||||
import { InternalClusterClient } from '../types';
|
||||
import { UnknownEntityType } from '../errors/unknown_entity_type';
|
||||
import { InvalidEntityInstance } from '../errors/invalid_entity_instance';
|
||||
|
||||
export async function instanceAsFilter(
|
||||
instance: EntityV2,
|
||||
clusterClient: InternalClusterClient,
|
||||
logger: Logger
|
||||
) {
|
||||
const sources = await readSourceDefinitions(clusterClient, logger, {
|
||||
type: instance['entity.type'],
|
||||
});
|
||||
|
||||
if (sources.length === 0) {
|
||||
throw new UnknownEntityType(`No sources found for type ${instance['entity.type']}`);
|
||||
}
|
||||
|
||||
const sourceFilters = compact<string>(
|
||||
sources.map((source) => {
|
||||
const { identity_fields: identityFields } = source;
|
||||
|
||||
const instanceHasRequiredFields = identityFields.every((identityField) =>
|
||||
instance[identityField] ? true : false
|
||||
);
|
||||
|
||||
if (!instanceHasRequiredFields) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const fieldFilters = identityFields.map(
|
||||
(identityField) => `${identityField}: "${instance[identityField]}"`
|
||||
);
|
||||
|
||||
return `(${fieldFilters.join(' AND ')})`;
|
||||
})
|
||||
);
|
||||
|
||||
if (sourceFilters.length === 0) {
|
||||
throw new InvalidEntityInstance(
|
||||
`Entity ${instance['entity.id']} of type ${instance['entity.type']} is missing some identity fields, no sources could match`
|
||||
);
|
||||
}
|
||||
|
||||
return sourceFilters.join(' OR ');
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue