Skip to content

Commit

Permalink
Merge branch 'main' into rule-schema-discriminated-union
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallmain authored Nov 27, 2023
2 parents f980f45 + 2cfc722 commit fd64136
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions x-pack/plugins/fleet/server/services/agents/agent_metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import type { Agent } from '../../types';
import { appContextService } from '../app_context';
import { DATA_TIERS } from '../../../common/constants';

const AGGREGATION_MAX_SIZE = 1000;

export async function fetchAndAssignAgentMetrics(esClient: ElasticsearchClient, agents: Agent[]) {
try {
return await _fetchAndAssignAgentMetrics(esClient, agents);
Expand Down Expand Up @@ -112,6 +114,7 @@ const aggregationQueryBuilder = (agentIds: string[]) => ({
agents: {
terms: {
field: 'elastic_agent.id',
size: AGGREGATION_MAX_SIZE,
},
aggs: {
sum_memory_size: {
Expand All @@ -127,6 +130,7 @@ const aggregationQueryBuilder = (agentIds: string[]) => ({
processes: {
terms: {
field: 'elastic_agent.process',
size: AGGREGATION_MAX_SIZE,
order: {
_count: 'desc',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ describe('Timeline search and filters', { tags: ['@ess', '@serverless'] }, () =>
});
});

describe('Update kqlMode for timeline', () => {
// FLAKY: https://github.com/elastic/kibana/issues/169882
describe.skip('Update kqlMode for timeline', () => {
beforeEach(() => {
login();
visit(TIMELINES_URL);
Expand Down

0 comments on commit fd64136

Please sign in to comment.