Skip to content

Commit

Permalink
[plugin/apm-data]Fallback to ILM for non-dsl-only mode if DSL unavail…
Browse files Browse the repository at this point in the history
…able
  • Loading branch information
lahsivjar committed Sep 11, 2024
1 parent 4ce661c commit 317d57f
Show file tree
Hide file tree
Showing 44 changed files with 394 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,17 @@ public static ClusterService createClusterService(ThreadPool threadPool, Cluster

public static ClusterService createClusterService(ThreadPool threadPool, DiscoveryNode localNode, ClusterSettings clusterSettings) {
Settings settings = Settings.builder().put("node.name", "test").put("cluster.name", "ClusterServiceTests").build();
return createClusterService(threadPool, localNode, settings, clusterSettings);
}

public static ClusterService createClusterService(
ThreadPool threadPool, DiscoveryNode localNode, Settings nodeSettings, ClusterSettings clusterSettings
) {
ClusterService clusterService = new ClusterService(
settings,
nodeSettings,
clusterSettings,
threadPool,
new TaskManager(settings, threadPool, Collections.emptySet(), Tracer.NOOP)
new TaskManager(nodeSettings, threadPool, Collections.emptySet(), Tracer.NOOP)
);
clusterService.setNodeConnectionsService(createNoOpNodeConnectionsService());
ClusterState initialClusterState = ClusterState.builder(new ClusterName(ClusterServiceUtils.class.getSimpleName()))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for logs-apm.app if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: logs-apm.app_logs-default_policy
prefer_ilm: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for logs-apm.error if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: logs-apm.error_logs-default_policy
prefer_ilm: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.app if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.app_metrics-default_policy
prefer_ilm: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.internal if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.internal_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions .../main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.service_destination.10m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.service_destination_10m_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions ...c/main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.service_destination.1m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.service_destination_1m_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions .../main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.service_destination.60m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.service_destination_60m_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions .../src/main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.service_summary.10m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.service_summary_10m_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions ...a/src/main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.service_summary.1m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.service_summary_1m_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions .../src/main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.service_summary.60m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.service_summary_60m_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions .../main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.service_transaction.10m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.service_transaction_10m_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions ...c/main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.service_transaction.1m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.service_transaction_1m_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions .../main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.service_transaction.60m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.service_transaction_60m_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions ...data/src/main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.transaction.10m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.transaction_10m_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions ...-data/src/main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.transaction.1m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.transaction_1m_metrics-default_policy
prefer_ilm: false
11 changes: 11 additions & 0 deletions ...data/src/main/resources/component-templates/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for metrics-apm.transaction.60m if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: metrics-apm.transaction_60m_metrics-default_policy
prefer_ilm: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for traces-apm if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: traces-apm.traces-default_policy
prefer_ilm: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for traces-apm.rum if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: traces-apm.rum_traces-default_policy
prefer_ilm: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: ${xpack.apmdata.template.version}
_meta:
description: Fallback to ILM policy for traces-apm.sampled if DSL not defined
managed: true
template:
settings:
index:
lifecycle:
name: traces-apm.sampled_traces-default_policy
prefer_ilm: false
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ composed_of:
- apm@settings
- apm-10d@lifecycle
- logs-apm@settings
- logs-apm.app-fallback@ilm
- logs@custom
- logs-apm.app@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ composed_of:
- apm-10d@lifecycle
- logs-apm@settings
- logs-apm.error@mappings
- logs-apm.error-fallback@ilm
- logs@custom
- logs-apm.error@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ composed_of:
- apm-90d@lifecycle
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.app-fallback@ilm
- metrics@custom
- metrics-apm.app@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ composed_of:
- apm-90d@lifecycle
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.internal-fallback@ilm
- metrics@custom
- metrics-apm.internal@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.service_destination@mappings
- metrics-apm.service_destination.10m-fallback@ilm
- metrics@custom
- metrics-apm.service_destination.10m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.service_destination@mappings
- metrics-apm.service_destination.1m-fallback@ilm
- metrics@custom
- metrics-apm.service_destination.1m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.service_destination@mappings
- metrics-apm.service_destination.60m-fallback@ilm
- metrics@custom
- metrics-apm.service_destination.60m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.service_summary@mappings
- metrics-apm.service_summary.10m-fallback@ilm
- metrics@custom
- metrics-apm.service_summary.10m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.service_summary@mappings
- metrics-apm.service_summary.1m-fallback@ilm
- metrics@custom
- metrics-apm.service_summary.1m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.service_summary@mappings
- metrics-apm.service_summary.60m-fallback@ilm
- metrics@custom
- metrics-apm.service_summary.60m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.service_transaction@mappings
- metrics-apm.service_transaction.10m-fallback@ilm
- metrics@custom
- metrics-apm.service_transaction.10m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.service_transaction@mappings
- metrics-apm.service_transaction.1m-fallback@ilm
- metrics@custom
- metrics-apm.service_transaction.1m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.service_transaction@mappings
- metrics-apm.service_transaction.60m-fallback@ilm
- metrics@custom
- metrics-apm.service_transaction.60m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.transaction@mappings
- metrics-apm.transaction.10m-fallback@ilm
- metrics@custom
- metrics-apm.transaction.10m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.transaction@mappings
- metrics-apm.transaction.1m-fallback@ilm
- metrics@custom
- metrics-apm.transaction.1m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ composed_of:
- metrics-apm@mappings
- metrics-apm@settings
- metrics-apm.transaction@mappings
- metrics-apm.transaction.60m-fallback@ilm
- metrics@custom
- metrics-apm.transaction.60m@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ composed_of:
- apm-90d@lifecycle
- traces-apm@mappings
- traces-apm.rum@mappings
- traces-apm.rum-fallback@ilm
- traces@custom
- traces-apm.rum@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ composed_of:
- traces@mappings
- apm@mappings
- apm@settings
- traces-apm.sampled-fallback@ilm
- traces@custom
- traces-apm.sampled@custom
- ecs@mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ composed_of:
- apm@settings
- apm-10d@lifecycle
- traces-apm@mappings
- traces-apm-fallback@ilm
- traces@custom
- traces-apm@custom
- ecs@mappings
Expand Down
Loading

0 comments on commit 317d57f

Please sign in to comment.