Skip to content

Commit

Permalink
Merge branch 'main' into ml-field-stats-esql-discover
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jun 3, 2024
2 parents 48f91cd + 4c1daca commit 6eb7c03
Show file tree
Hide file tree
Showing 46 changed files with 1,210 additions and 347 deletions.
35 changes: 29 additions & 6 deletions docs/user/monitoring/elasticsearch-details.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,39 @@ model, the number of forecasts, and the node that runs the job.
== CCR

To view {ccr} metrics, click **CCR**. For each follower index on the cluster, it
shows information such as the leader index, an indication of how much the
follower index is lagging behind the leader index, the last fetch time, the
number of operations synced, and error messages. If you select a follower index,
you can view the same information for each shard.
shows the following information:

- **Index**: The name of the follower index.
- **Follows**: The name of the leader index.
- **Alerts**: Any read exceptions that have been triggered for the index or its
shards.
- **Sync Lag (ops)**: How many operations the follower index is lagging behind the
leader index.
+
This is calculated by finding the difference between the minimum and maximum operation
sequence number on the leader (`leader_max_seq_no`) and the difference between the minimum
and maximum global sequence number checkpoint on the follower (`follower_global_checkpoint`)
for each shard over the selected time period. The difference in `follower_global_checkpoint`
is subtracted from the difference in `leader_max_seq_no` for each shard, and the highest result
across all shards is displayed.
- **Last fetch time**: The time elapsed since the last successful fetch from the leader index.
Represents the longest time elapsed across all of the shards in the follower index.
- **Ops synced**: The number of operations indexed (replicated) into the follower index from
the leader index in the selected time period.
+
This metric is a sum of the number of operations indexed across all shards over the selected
time period.
- **Error**: Any exceptions returned for the most recent document in the selected time period.

If you select a follower index, you can view the same information for each shard.
For more information on the properties used to calculate these metrics, refer to the
{ref}/ccr-get-follow-stats.html[get follower stats API] documentation.

If you select a shard, you can see graphs for the fetch and operation delays.
You can also see advanced information, which contains the results from the
You can also see advanced information, which contains additional stats from the
{ref}/ccr-get-follow-stats.html[get follower stats API].

For more information, refer to {ref}/xpack-ccr.html[{ccr-cap}].
Learn more about {ref}/xpack-ccr.html[{ccr-cap}].

[float]
[[logs-monitor-page]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ import { EuiButtonTo, EuiLinkTo } from '../../../shared/react_router_helpers';
import { GenerateConnectorApiKeyApiLogic } from '../../api/connector/generate_connector_api_key_api_logic';
import { CONNECTOR_DETAIL_TAB_PATH } from '../../routes';
import { isAdvancedSyncRuleSnippetEmpty } from '../../utils/sync_rules_helpers';
import { SyncsContextMenu } from '../search_index/components/header_actions/syncs_context_menu';
import { ApiKeyConfig } from '../search_index/connector/api_key_configuration';

import { getConnectorTemplate } from '../search_index/connector/constants';

import { ConnectorFilteringLogic } from '../search_index/connector/sync_rules/connector_filtering_logic';
import { SyncsContextMenu } from '../shared/header_actions/syncs_context_menu';

import { AttachIndexBox } from './attach_index_box';
import { ConnectorDetailTabId } from './connector_detail';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import { CONNECTOR_DETAIL_TAB_PATH } from '../../routes';
import { connectorsBreadcrumbs } from '../connectors/connectors';
import { EnterpriseSearchContentPageTemplate } from '../layout/page_template';

import { getHeaderActions } from '../search_index/components/header_actions/header_actions';
import { ConnectorScheduling } from '../search_index/connector/connector_scheduling';
import { ConnectorSyncRules } from '../search_index/connector/sync_rules/connector_rules';
import { SearchIndexDocuments } from '../search_index/documents';
import { SearchIndexIndexMappings } from '../search_index/index_mappings';
import { SearchIndexPipelines } from '../search_index/pipelines/pipelines';
import { getHeaderActions } from '../shared/header_actions/header_actions';

import { ConnectorConfiguration } from './connector_configuration';
import { ConnectorNameAndDescription } from './connector_name_and_description';
Expand Down Expand Up @@ -137,7 +137,7 @@ export const ConnectorDetail: React.FC = () => {
? [
{
content: <ConnectorSyncRules />,
disabled: !connector?.index_name,
disabled: !index,
id: ConnectorDetailTabId.SYNC_RULES,
isSelected: tabId === ConnectorDetailTabId.SYNC_RULES,
label: i18n.translate(
Expand Down Expand Up @@ -200,7 +200,7 @@ export const ConnectorDetail: React.FC = () => {

const PIPELINES_TAB = {
content: <SearchIndexPipelines />,
disabled: !connector?.index_name,
disabled: !index,
id: ConnectorDetailTabId.PIPELINES,
isSelected: tabId === ConnectorDetailTabId.PIPELINES,
label: i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
FeatureName,
IngestPipelineParams,
IngestionMethod,
IngestionStatus,
} from '@kbn/search-connectors';

import { Status } from '../../../../../common/types/api';
Expand All @@ -30,6 +29,11 @@ import {
import { FetchIndexActions, FetchIndexApiLogic } from '../../api/index/fetch_index_api_logic';
import { ElasticsearchViewIndex } from '../../types';

import {
hasDocumentLevelSecurityFeature,
hasIncrementalSyncFeature,
} from '../../utils/connector_helpers';

import {
ConnectorNameAndDescriptionLogic,
ConnectorNameAndDescriptionActions,
Expand Down Expand Up @@ -71,7 +75,6 @@ export interface ConnectorViewValues {
index: ElasticsearchViewIndex | undefined;
indexName: string;
ingestionMethod: IngestionMethod;
ingestionStatus: IngestionStatus;
isCanceling: boolean;
isHiddenIndex: boolean;
isLoading: boolean;
Expand Down Expand Up @@ -142,6 +145,11 @@ export const ConnectorViewLogic = kea<MakeLogicType<ConnectorViewValues, Connect
actions.fetchConnector({ connectorId: values.connectorId });
}
},
fetchConnectorApiSuccess: ({ connector }) => {
if (!values.index && connector?.index_name) {
actions.fetchIndex({ indexName: connector.index_name });
}
},
}),
path: ['enterprise_search', 'content', 'connector_view_logic'],
selectors: ({ selectors }) => ({
Expand Down Expand Up @@ -188,17 +196,15 @@ export const ConnectorViewLogic = kea<MakeLogicType<ConnectorViewValues, Connect
],
hasDocumentLevelSecurityFeature: [
() => [selectors.connector],
(connector?: Connector) =>
connector?.features?.[FeatureName.DOCUMENT_LEVEL_SECURITY]?.enabled || false,
(connector?: Connector) => hasDocumentLevelSecurityFeature(connector),
],
hasFilteringFeature: [
() => [selectors.hasAdvancedFilteringFeature, selectors.hasBasicFilteringFeature],
(advancedFeature: boolean, basicFeature: boolean) => advancedFeature || basicFeature,
],
hasIncrementalSyncFeature: [
() => [selectors.connector],
(connector?: Connector) =>
connector?.features?.[FeatureName.INCREMENTAL_SYNC]?.enabled || false,
(connector?: Connector) => hasIncrementalSyncFeature(connector),
],
htmlExtraction: [
() => [selectors.connector],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ import { GenerateConnectorApiKeyApiLogic } from '../../api/connector/generate_co
import { CONNECTOR_DETAIL_TAB_PATH } from '../../routes';
import { hasConfiguredConfiguration } from '../../utils/has_configured_configuration';

import { SyncsContextMenu } from '../search_index/components/header_actions/syncs_context_menu';
import { ApiKeyConfig } from '../search_index/connector/api_key_configuration';
import { ConvertConnector } from '../search_index/connector/native_connector_configuration/convert_connector';
import { NativeConnectorConfigurationConfig } from '../search_index/connector/native_connector_configuration/native_connector_configuration_config';
import { ResearchConfiguration } from '../search_index/connector/native_connector_configuration/research_configuration';
import { SyncsContextMenu } from '../shared/header_actions/syncs_context_menu';

import { AttachIndexBox } from './attach_index_box';
import { ConnectorDetailTabId } from './connector_detail';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,7 @@ export const ConnectorDetailOverview: React.FC = () => {
{connector && connector.service_type !== ENTERPRISE_SEARCH_CONNECTOR_CRAWLER_SERVICE_TYPE && (
<>
<EuiSpacer />
<SyncJobs
errorOnAccessSync={Boolean(connector.last_access_control_sync_error)}
errorOnContentSync={Boolean(connector.last_sync_error)}
/>
<SyncJobs connector={connector} />
</>
)}
</>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { generateEncodedPath } from '../../../../../shared/encode_path_params';
import { EuiButtonTo } from '../../../../../shared/react_router_helpers';

import { SEARCH_INDEX_TAB_PATH } from '../../../../routes';
import { SyncsContextMenu } from '../../components/header_actions/syncs_context_menu';
import { SyncsContextMenu } from '../../../shared/header_actions/syncs_context_menu';
import { IndexNameLogic } from '../../index_name_logic';
import { SearchIndexTabId } from '../../search_index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ import {

import { FetchIndexApiResponse } from '../../api/index/fetch_index_api_logic';
import { ElasticsearchViewIndex } from '../../types';
import {
hasDocumentLevelSecurityFeature,
hasIncrementalSyncFeature,
} from '../../utils/connector_helpers';
import {
getIngestionMethod,
getIngestionStatus,
Expand Down Expand Up @@ -288,17 +292,15 @@ export const IndexViewLogic = kea<MakeLogicType<IndexViewValues, IndexViewAction
],
hasDocumentLevelSecurityFeature: [
() => [selectors.connector],
(connector?: Connector) =>
connector?.features?.[FeatureName.DOCUMENT_LEVEL_SECURITY]?.enabled || false,
(connector?: Connector) => hasDocumentLevelSecurityFeature(connector),
],
hasFilteringFeature: [
() => [selectors.hasAdvancedFilteringFeature, selectors.hasBasicFilteringFeature],
(advancedFeature: boolean, basicFeature: boolean) => advancedFeature || basicFeature,
],
hasIncrementalSyncFeature: [
() => [selectors.connector],
(connector?: Connector) =>
connector?.features?.[FeatureName.INCREMENTAL_SYNC]?.enabled || false,
(connector?: Connector) => hasIncrementalSyncFeature(connector),
],
htmlExtraction: [
() => [selectors.connector],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ export const SearchIndexOverview: React.FC = () => {
{isConnectorIndex(indexData) && (
<>
<EuiSpacer />
<SyncJobs
errorOnAccessSync={Boolean(indexData.connector.last_access_control_sync_error)}
errorOnContentSync={Boolean(indexData.connector.last_sync_error)}
/>
<SyncJobs connector={indexData.connector} />
</>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import { EnterpriseSearchContentPageTemplate } from '../layout/page_template';

import { baseBreadcrumbs } from '../search_indices';

import { getHeaderActions } from './components/header_actions/header_actions';
import { getHeaderActions } from '../shared/header_actions/header_actions';

import { ConnectorScheduling } from './connector/connector_scheduling';
import { ConnectorSyncRules } from './connector/sync_rules/connector_rules';
import { AutomaticCrawlScheduler } from './crawler/automatic_crawl_scheduler/automatic_crawl_scheduler';
Expand Down
Loading

0 comments on commit 6eb7c03

Please sign in to comment.