Skip to content
18 changes: 18 additions & 0 deletions explore-analyze/alerting/alerts/alerting-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,21 @@ stack: ga
```

If you want to use alerting rules with {{ccs}}, you must configure privileges for {{ccs-init}} and {{kib}}. Refer to [Remote clusters](../../../deploy-manage/remote-clusters.md).


## {{cps-cap}} [kibana-alerting-cps]

```{applies_to}
serverless: preview
stack: unavailable
```

When [{{cps}}](/explore-analyze/cross-project-search.md) is enabled and you have [linked projects](/explore-analyze/cross-project-search/cross-project-search-link-projects.md), alerting rules query data across linked projects based on the **space-level {{cps}} scope**. You cannot set a {{cps}} scope on individual rules.

When you open a rule to create or edit it, the [{{cps-init}} scope selector](/deploy-manage/cross-project-search-config/cps-config-access-and-scope.md#cps-search-scope) in the header shows the current {{cps}} scope but is read-only. To change which projects rules query, update the [{{cps}} scope configured for the space](/deploy-manage/cross-project-search-config/cps-config-access-and-scope.md#cps-default-search-scope).

For {{esql}} rules, you can use [`SET project_routing`](/explore-analyze/cross-project-search/cross-project-search-project-routing.md#cps-project-routing) in the rule query to target specific linked projects, overriding the space-level scope. For non-{{esql}} rules that use index patterns, you can use [qualified index expressions](/explore-analyze/cross-project-search/cross-project-search-search.md#search-expressions) to scope the rule to specific projects.

:::{note}
{{ml-cap}} rules don't support {{cps}}. {{ml-cap}} rules search data in the origin project only.
:::
2 changes: 1 addition & 1 deletion explore-analyze/alerting/alerts/create-manage-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ When you open a rule to create or edit it, the [{{cps-init}} scope selector](/de
For {{esql}} rules, you can use [`SET project_routing`](/explore-analyze/cross-project-search/cross-project-search-project-routing.md) in the rule query to target specific linked projects, overriding the space-level scope. For non-{{esql}} rules that use index patterns, you can use [qualified index expressions](/explore-analyze/cross-project-search/cross-project-search-search.md#search-expressions) to scope the rule to specific projects.

:::{note}
{{ml}} rules don't support {{cps}}. {{ml}} rules search data in the origin project only.
{{ml-cap}} rules don't support {{cps}}; they search data in the origin project only. Other features also have limited or no {{cps}} support. For details, refer to [{{cps-cap}} availability by app](/explore-analyze/cross-project-search/cross-project-search-manage-scope.md#cps-availability).
:::

## Create and edit rules [create-edit-rules]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ type: overview
products:
- id: cloud-serverless
- id: kibana
navigation_title: "CPS scope in project apps"
navigation_title: "CPS scope in project apps"
description: Learn how to manage cross-project search scope from your project apps using the scope selector, query-level overrides, and space defaults.
---

# Managing {{cps}} scope in your project apps [cps-manage-scope]

When [{{cps}} ({{cps-init}})](/explore-analyze/cross-project-search.md) is enabled and projects are linked, searches initiated from your project's apps run across all linked projects by default. {{kib}} provides several ways to narrow or change this scope:

* **Space default**: Admins [configure a default scope for each space](/deploy-manage/cross-project-search-config/cps-config-access-and-scope.md#cps-default-search-scope), which applies when you start a new session.
* **Space default**: Admins [configure a default scope for each space](/deploy-manage/cross-project-search-config/cps-config-access-and-scope.md#cps-default-search-scope), which applies when you start a new session.
* **Session scope**: Use the [{{cps-init}} scope selector](#cps-in-kibana) in the project's header to change which projects are searched during your session.
* **Query-level override**: Use project routing or qualified index expressions in individual queries to target specific projects.

## {{cps-cap}} scope selector [cps-in-kibana]

The **{{cps-cap}} ({{cps-init}}) scope** selector ({icon}`cross_project_search`) in your project's header lets you control which linked projects your searches include.
The **{{cps-cap}} ({{cps-init}}) scope** selector ({icon}`cross_project_search`) in your project's header lets you control which linked projects your searches include.

With the {{cps-init}} scope selector, you can select:

Expand Down Expand Up @@ -62,7 +62,7 @@ Not all apps support {{cps}}. The following table shows which apps support the {
| **Dashboards** | Editable | Per-panel overrides using ES\|QL visualizations or Maps layer routing. Dashboards can also [store a {{cps}} scope](/explore-analyze/dashboards/using.md#dashboard-cps-scope). |
| **Dev Tools / Console** | Not available | Full {{cps-init}} through raw API requests, including ES\|QL. The [{{product.painless}} execute API](/explore-analyze/cross-project-search.md#cps-painless-scripting) resolves index names differently. |
| **Discover** | Editable | ES\|QL |
| **Lens visualizations** | Editable | ES\|QL visualizations[^cps-badge] |
| **Lens visualizations** | Editable | ES\|QL visualizations[^cps-badge] |
| **Maps** | Editable | Layer-level [project routing](/explore-analyze/cross-project-search/cross-project-search-project-routing.md) for vector layers and joins |
| **{{ml-app}} Data Visualizer** | Not available | ES\|QL |
| **{{rules-ui}} and alerts** | Read-only | ES\|QL rules support `SET project_routing`. For non-{{esql}} rules that use index patterns, you can use [qualified index expressions](/explore-analyze/cross-project-search/cross-project-search-search.md#search-expressions) to scope the rule to specific projects.|
Expand All @@ -73,6 +73,10 @@ The header's {{cps-init}} scope selector is not available in other apps, includi

[^cps-badge]: When a visualization panel uses a query-level override, it displays a **Custom CPS scope** badge on dashboards to indicate that it uses a different scope than the {{cps-init}} scope selector.

### {{cps-cap}} availability in {{elastic-sec}} apps [cps-availability-security]

{{elastic-sec}} apps have limited {{cps-init}} support. Within Timeline, only the **{{esql}}** tab supports `SET project_routing`; all other Timeline tabs search the local project only. Other Security features. including the **Explore** page, threat-hunting workflows, the alert details flyout, and entity store, also remain scoped to the local project.

## Related pages

* [{{cps-cap}} overview](/explore-analyze/cross-project-search.md)
Expand Down
9 changes: 9 additions & 0 deletions solutions/_snippets/cps-sec-obs-rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
When [{{cps}}](/explore-analyze/cross-project-search.md) is enabled and you have [linked projects](/deploy-manage/cross-project-search-config/cps-config-link-and-manage.md), rules query data across linked projects based on the **space-level {{cps}} scope**. You cannot set a {{cps}} scope on individual rules.

When you open a rule to create or edit it, the [{{cps-init}} scope selector](/deploy-manage/cross-project-search-config/cps-config-access-and-scope.md#cps-search-scope) in the header shows the current {{cps}} scope but is read-only. To change which projects rules query, update the [{{cps}} scope configured for the space](/deploy-manage/cross-project-search-config/cps-config-access-and-scope.md#cps-default-search-scope).

For {{esql}} rules, you can use [`SET project_routing`](/explore-analyze/cross-project-search/cross-project-search-project-routing.md) in the rule query to target specific linked projects, overriding the space-level scope. For non-{{esql}} rules that use index patterns, you can use [qualified index expressions](/explore-analyze/cross-project-search/cross-project-search-search.md#search-expressions) to scope the rule to specific projects.

:::{note}
{{ml-cap}} rules don't support {{cps}}. {{ml-cap}} rules search data in the origin project only.
:::
29 changes: 11 additions & 18 deletions solutions/observability/incident-management/create-manage-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,6 @@ navigation_title: Create and manage rules

Alerting enables you to define *rules*, which detect complex conditions within different apps and trigger actions when those conditions are met. Alerting provides a set of built-in connectors and rules for you to use.


## {{cps-cap}} scope for rules [observability-cps-scope-for-rules]
```{applies_to}
serverless: preview
stack: unavailable
```

When [{{cps}}](/explore-analyze/cross-project-search.md) is enabled and you have [linked projects](/deploy-manage/cross-project-search-config/cps-config-link-and-manage.md), alerting rules query data across linked projects based on the **space-level {{cps}} scope**. You cannot set a {{cps}} scope on individual rules.

When you open a rule to create or edit it, the [{{cps-init}} scope selector](/deploy-manage/cross-project-search-config/cps-config-access-and-scope.md#cps-search-scope) in the header shows the current {{cps}} scope but is read-only. To change which projects rules query, update the [{{cps}} scope configured for the space](/deploy-manage/cross-project-search-config/cps-config-access-and-scope.md#cps-default-search-scope).

For {{esql}} rules, you can use [`SET project_routing`](/explore-analyze/cross-project-search/cross-project-search-project-routing.md) in the rule query to target specific linked projects, overriding the space-level scope. For non-{{esql}} rules that use index patterns, you can use [qualified index expressions](/explore-analyze/cross-project-search/cross-project-search-search.md#search-expressions) to scope the rule to specific projects.

:::{note}
{{ml-cap}} rules don't support {{cps}}. {{ml-cap}} rules search data in the origin project only.
:::

## Observability rules [observability-create-manage-rules-observability-rules]

Learn more about Observability rules and how to create them:
Expand Down Expand Up @@ -142,4 +125,14 @@ You can modify the criteria for changing an alert's status to [flapping state](v

{applies_to}`stack: ga 9.3+` You can modify the flapping settings for a specific rule while creating or editing it. You can also modify the flapping settings for all rules in your {{kib}} space or {{serverless-short}} project. To do this, go to the **Rules** page (find the **Rules** management page using the navigation menu or the [global search field](/explore-analyze/find-and-organize/find-apps-and-objects.md)), click **Settings**, then go to the **Alert flapping detection** settings.

{applies_to}`stack: ga 9.0-9.2` You can only modify global flapping settings for your entire {{kib}} space or {{serverless-short}} project.
{applies_to}`stack: ga 9.0-9.2` You can only modify global flapping settings for your entire {{kib}} space or {{serverless-short}} project.

## {{cps-cap}} scope for rules [observability-cps-scope-for-rules]

```{applies_to}
serverless: preview
stack: unavailable
```

:::{include} /solutions/_snippets/cps-sec-obs-rules.md
:::
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ products:
description: Learn how detection rules work with cross-project search to query data across linked projects.
---

# {{cps-cap}} and detection rules [rules-cross-project-search]
# {{cps-cap}} and detection rules [sec-rules-cross-project-search]

When [{{cps}}](/explore-analyze/cross-project-search.md) is enabled and you have [linked projects](/deploy-manage/cross-project-search-config/cps-config-link-and-manage.md), detection rules query data across linked projects based on the **space-level {{cps}} scope**. You cannot set a {{cps}} scope on individual rules.

When you open a rule to create or edit it, the [{{cps-init}} scope selector](/deploy-manage/cross-project-search-config/cps-config-access-and-scope.md#cps-search-scope) in the header shows the current {{cps}} scope but is read-only. To change which projects rules query, update the [{{cps}} scope configured for the space](/deploy-manage/cross-project-search-config/cps-config-access-and-scope.md#cps-default-search-scope).

For {{esql}} rules, you can use [`SET project_routing`](/explore-analyze/cross-project-search/cross-project-search-project-routing.md) in the rule query to target specific linked projects, overriding the space-level scope. For non-{{esql}} rules that use index patterns, you can use [qualified index expressions](/explore-analyze/cross-project-search/cross-project-search-search.md#search-expressions) to scope the rule to specific projects.

:::{note}
{{ml-cap}} rules don't support {{cps}}. {{ml-cap}} rules search data in the origin project only.
:::
:::{include} /solutions/_snippets/cps-sec-obs-rules.md
:::
Loading