Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task Manager] Log at different levels based on the state #101751

Merged
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1382b1c
Log at different levels based on the state
chrisronline Jun 9, 2021
4ca7c80
Merge remote-tracking branch 'elastic/master' into alerting/tm_health…
chrisronline Jun 9, 2021
6d9ae91
Fix types and add tests
chrisronline Jun 10, 2021
3f54951
Remove unnecessary code
chrisronline Jun 10, 2021
c3109d4
Merge remote-tracking branch 'elastic/master' into alerting/tm_health…
chrisronline Jun 10, 2021
57219a4
Add more descriptive message
chrisronline Jun 11, 2021
b64356d
Merge remote-tracking branch 'elastic/master' into alerting/tm_health…
chrisronline Jun 14, 2021
1dc0519
Partially fix failing tests
chrisronline Jun 14, 2021
0ed7d0a
Move into separate function
chrisronline Jun 14, 2021
35d89d6
Get rid of customStatus in favor of moving the logging logic to a sep…
chrisronline Jun 15, 2021
a9a2a53
Remove debug logging
chrisronline Jun 15, 2021
6715146
Merge remote-tracking branch 'elastic/master' into alerting/tm_health…
chrisronline Jun 15, 2021
4ce5672
Merge remote-tracking branch 'elastic/master' into alerting/tm_health…
chrisronline Jun 15, 2021
a219c6f
Merge remote-tracking branch 'elastic/master' into alerting/tm_health…
chrisronline Jun 15, 2021
4567cce
Do not log as an error if the stats are empty
chrisronline Jun 15, 2021
069f7fa
PR feedback
chrisronline Jun 15, 2021
e4fc649
Add docker whitelist
chrisronline Jun 15, 2021
b85f83b
alpha order
chrisronline Jun 15, 2021
4df5433
English is hard
chrisronline Jun 15, 2021
24c8718
Removing extra newline
chrisronline Jun 15, 2021
30e13d7
PR feedback around ignoring capacity estimation
chrisronline Jun 16, 2021
28c6a75
Merge remote-tracking branch 'elastic/master' into alerting/tm_health…
chrisronline Jun 16, 2021
868f6be
Merge remote-tracking branch 'elastic/master' into alerting/tm_health…
chrisronline Jun 16, 2021
fb1ded5
Move json utils
chrisronline Jun 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions x-pack/plugins/task_manager/server/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe('config validation', () => {
"monitored_aggregated_stats_refresh_rate": 60000,
"monitored_stats_required_freshness": 4000,
"monitored_stats_running_average_window": 50,
"monitored_stats_warn_drift_in_seconds": 60,
"monitored_task_execution_thresholds": Object {
"custom": Object {},
"default": Object {
Expand Down Expand Up @@ -68,6 +69,7 @@ describe('config validation', () => {
"monitored_aggregated_stats_refresh_rate": 60000,
"monitored_stats_required_freshness": 4000,
"monitored_stats_running_average_window": 50,
"monitored_stats_warn_drift_in_seconds": 60,
"monitored_task_execution_thresholds": Object {
"custom": Object {},
"default": Object {
Expand Down Expand Up @@ -103,6 +105,7 @@ describe('config validation', () => {
"monitored_aggregated_stats_refresh_rate": 60000,
"monitored_stats_required_freshness": 4000,
"monitored_stats_running_average_window": 50,
"monitored_stats_warn_drift_in_seconds": 60,
"monitored_task_execution_thresholds": Object {
"custom": Object {
"alerting:always-fires": Object {
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/task_manager/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const DEFAULT_VERSION_CONFLICT_THRESHOLD = 80;
// Refresh aggregated monitored stats at a default rate of once a minute
export const DEFAULT_MONITORING_REFRESH_RATE = 60 * 1000;
export const DEFAULT_MONITORING_STATS_RUNNING_AVERGAE_WINDOW = 50;
export const DEFAULT_MONITORING_STATS_WARN_DRIFT_IN_SECONDS = 60;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a great sense for a good value here - presumably 60 seconds means it missed 20 (potential) poll requests, which seems like ... plenty to have a warning on. At the same time, it feels kinda short, like this could happen every now and again. I think I feel like 60 seconds is workable if it's warning not an error, and isn't super-scary if you see them every now and again, and obvious that something's wrong if you see it a lot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither do I. I feel we should attempt to be less conservative here, as the point of this change is to ensure these logs are available when there is an issue with TM/Alerting. As long as the messaging is clear on how to avoid the logs, we should be all set.


export const taskExecutionFailureThresholdSchema = schema.object(
{
Expand Down Expand Up @@ -109,6 +110,9 @@ export const configSchema = schema.object(
defaultValue: {},
}),
}),
monitored_stats_warn_drift_in_seconds: schema.number({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to doc this, here? https://www.elastic.co/guide/en/kibana/current/task-manager-settings-kb.html

I don't think we doc all the config options, but maybe this is one that we do?

Also implies that we need to add this to the cloud whitelist, and to the docker whitelist.

Also wondering if we want to add anything to the health monitor doc - https://www.elastic.co/guide/en/kibana/current/task-manager-health-monitoring.html - specifically, I wondering if users will be able to search the docs for the message this produces, to try to understand it. I feel like we need to define "drift", because we don't seem to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it there and also renamed it to avoid needing to define a new term for users! I'm not sure how to add things to the docker/cloud whitelist - is that a file in the Kibana repo?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the docker whitelist is in this repo, and is listed in the PR template (at least when I create new PRs) - https://github.com/elastic/kibana/blob/master/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker

the cloud whitelist is in a private repo; I'll DM you the info ...

defaultValue: DEFAULT_MONITORING_STATS_WARN_DRIFT_IN_SECONDS,
}),
},
{
validate: (config) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe('managed configuration', () => {
version_conflict_threshold: 80,
max_poll_inactivity_cycles: 10,
monitored_aggregated_stats_refresh_rate: 60000,
monitored_stats_warn_drift_in_seconds: 60,
monitored_stats_required_freshness: 4000,
monitored_stats_running_average_window: 50,
request_capacity: 1000,
Expand Down
207 changes: 207 additions & 0 deletions x-pack/plugins/task_manager/server/lib/log_health_metrics.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
/*
* 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 { merge } from 'lodash';
import { loggingSystemMock } from 'src/core/server/mocks';
import { configSchema, TaskManagerConfig } from '../config';
import { HealthStatus } from '../monitoring';
import { TaskPersistence } from '../monitoring/task_run_statistics';
import { MonitoredHealth } from '../routes/health';
import { logHealthMetrics } from './log_health_metrics';
import { Logger } from '../../../../../src/core/server';

describe('logHealthMetrics', () => {
it('should log as debug if there the status is OK', () => {
chrisronline marked this conversation as resolved.
Show resolved Hide resolved
const logger = loggingSystemMock.create().get();
const config = getTaskManagerConfig({
monitored_stats_warn_drift_in_seconds: 60,
});
const health = getMockMonitoredHealth();

logHealthMetrics(health, logger, config);

const firstDebug = JSON.parse(
(logger as jest.Mocked<Logger>).debug.mock.calls[0][0].replace('Latest Monitored Stats: ', '')
);
expect(firstDebug).toMatchObject(health);
});

it('should log as warn if there the status is Warn', () => {
const logger = loggingSystemMock.create().get();
const config = getTaskManagerConfig({
monitored_stats_warn_drift_in_seconds: 60,
});
const health = getMockMonitoredHealth({
status: HealthStatus.Warning,
});

logHealthMetrics(health, logger, config);

const logMessage = JSON.parse(
((logger as jest.Mocked<Logger>).warn.mock.calls[0][0] as string).replace(
'Latest Monitored Stats (warning status): ',
''
)
);
expect(logMessage).toMatchObject(health);
});

it('should log as error if there the status is Error', () => {
const logger = loggingSystemMock.create().get();
const config = getTaskManagerConfig({
monitored_stats_warn_drift_in_seconds: 60,
});
const health = getMockMonitoredHealth({
status: HealthStatus.Error,
});

logHealthMetrics(health, logger, config);

const logMessage = JSON.parse(
((logger as jest.Mocked<Logger>).error.mock.calls[0][0] as string).replace(
'Latest Monitored Stats (error status): ',
''
)
);
expect(logMessage).toMatchObject(health);
});

it('should log as warn if there the drift exceeds the threshold', () => {
const logger = loggingSystemMock.create().get();
const config = getTaskManagerConfig({
monitored_stats_warn_drift_in_seconds: 60,
});
const health = getMockMonitoredHealth({
stats: {
runtime: {
value: {
drift: {
p99: 60000,
},
},
},
},
});

logHealthMetrics(health, logger, config);

const logMessage = JSON.parse(
((logger as jest.Mocked<Logger>).warn.mock.calls[0][0] as string).replace(
`Latest Monitored Stats (Detected drift of 60s): `,
''
)
);
expect(logMessage).toMatchObject(health);
});
});

function getMockMonitoredHealth(overrides = {}): MonitoredHealth {
const stub: MonitoredHealth = {
id: '1',
status: HealthStatus.OK,
timestamp: new Date().toISOString(),
last_update: new Date().toISOString(),
stats: {
configuration: {
timestamp: new Date().toISOString(),
status: HealthStatus.OK,
value: {
max_workers: 10,
poll_interval: 3000,
max_poll_inactivity_cycles: 10,
request_capacity: 1000,
monitored_aggregated_stats_refresh_rate: 5000,
monitored_stats_running_average_window: 50,
monitored_task_execution_thresholds: {
default: {
error_threshold: 90,
warn_threshold: 80,
},
custom: {},
},
},
},
workload: {
timestamp: new Date().toISOString(),
status: HealthStatus.OK,
value: {
count: 4,
task_types: {
actions_telemetry: { count: 2, status: { idle: 2 } },
alerting_telemetry: { count: 1, status: { idle: 1 } },
session_cleanup: { count: 1, status: { idle: 1 } },
},
schedule: [],
overdue: 0,
overdue_non_recurring: 0,
estimatedScheduleDensity: [],
non_recurring: 20,
owner_ids: 2,
estimated_schedule_density: [],
capacity_requirments: {
per_minute: 150,
per_hour: 360,
per_day: 820,
},
},
},
runtime: {
timestamp: new Date().toISOString(),
status: HealthStatus.OK,
value: {
drift: {
p50: 1000,
p90: 2000,
p95: 2500,
p99: 3000,
},
drift_by_type: {},
load: {
p50: 1000,
p90: 2000,
p95: 2500,
p99: 3000,
},
execution: {
duration: {},
duration_by_persistence: {},
persistence: {
[TaskPersistence.Recurring]: 10,
[TaskPersistence.NonRecurring]: 10,
[TaskPersistence.Ephemeral]: 10,
},
result_frequency_percent_as_number: {},
},
polling: {
last_successful_poll: new Date().toISOString(),
duration: [500, 400, 3000],
claim_conflicts: [0, 100, 75],
claim_mismatches: [0, 100, 75],
result_frequency_percent_as_number: [
'NoTasksClaimed',
'NoTasksClaimed',
'NoTasksClaimed',
],
},
},
},
},
};
return (merge(stub, overrides) as unknown) as MonitoredHealth;
}

function getTaskManagerConfig(overrides: Partial<TaskManagerConfig> = {}) {
return configSchema.validate(
overrides.monitored_stats_required_freshness
? {
// use `monitored_stats_required_freshness` as poll interval otherwise we might
// fail validation as it must be greather than the poll interval
poll_interval: overrides.monitored_stats_required_freshness,
...overrides,
}
: overrides
);
}
44 changes: 44 additions & 0 deletions x-pack/plugins/task_manager/server/lib/log_health_metrics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* 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 { Logger } from '../../../../../src/core/server';
import { HealthStatus } from '../monitoring';
import { TaskManagerConfig } from '../config';
import { MonitoredHealth } from '../routes/health';

export function logHealthMetrics(
monitoredHealth: MonitoredHealth,
logger: Logger,
config: TaskManagerConfig
) {
let contextMessage;

let logAsWarn = monitoredHealth.status === HealthStatus.Warning;
const logAsError = monitoredHealth.status === HealthStatus.Error;
const driftInSeconds = (monitoredHealth.stats.runtime?.value.drift.p99 ?? 0) / 1000;

if (driftInSeconds >= config.monitored_stats_warn_drift_in_seconds) {
contextMessage = `Detected drift of ${driftInSeconds}s`;
chrisronline marked this conversation as resolved.
Show resolved Hide resolved
logAsWarn = true;
}

if (logAsError) {
logger.error(
`Latest Monitored Stats (${contextMessage ?? `error status`}): ${JSON.stringify(
monitoredHealth
)}`
);
} else if (logAsWarn) {
logger.warn(
`Latest Monitored Stats (${contextMessage ?? `warning status`}): ${JSON.stringify(
monitoredHealth
)}`
);
Copy link
Contributor

@mikecote mikecote Jun 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When testing locally, I started a fresh Kibana and got this "warning status" log message right away. After investigating, I found out the capacity estimation caused the health status to be "warning" (see below).

It sounds like a bug in the capacity estimation API? and exposed more severely in this PR?

The second log I saw was "error status" while all the sub-elements being "OK" 🤔

These don't seem related to this PR but definitely expose a couple of potential bugs. cc @gmmorris

Health output on start-up
{"id":"5b2de169-2785-441b-ae8c-186a1936b17d","timestamp":"2021-06-15T18:46:24.663Z","status":"warn","last_update":"2021-06-15T18:46:24.663Z","stats":{"configuration":{"timestamp":"2021-06-15T18:46:19.871Z","value":{"request_capacity":1000,"max_poll_inactivity_cycles":10,"monitored_aggregated_stats_refresh_rate":60000,"monitored_stats_running_average_window":50,"monitored_task_execution_thresholds":{"default":{"error_threshold":90,"warn_threshold":80},"custom":{}},"poll_interval":3000,"max_workers":10},"status":"OK"},"runtime":{"timestamp":"2021-06-15T18:46:19.872Z","value":{"polling":{"claim_duration":{"p50":null,"p90":null,"p95":null,"p99":null},"duration":{"p50":null,"p90":null,"p95":null,"p99":null},"claim_conflicts":{"p50":null,"p90":null,"p95":null,"p99":null},"claim_mismatches":{"p50":null,"p90":null,"p95":null,"p99":null},"result_frequency_percent_as_number":{"Failed":0,"NoAvailableWorkers":0,"NoTasksClaimed":0,"RanOutOfCapacity":0,"RunningAtCapacity":0,"PoolFilled":0}},"drift":{"p50":null,"p90":null,"p95":null,"p99":null},"drift_by_type":{},"load":{"p50":null,"p90":null,"p95":null,"p99":null},"execution":{"duration":{},"duration_by_persistence":{"recurring":{"p50":null,"p90":null,"p95":null,"p99":null},"non_recurring":{"p50":null,"p90":null,"p95":null,"p99":null},"ephemeral":{"p50":null,"p90":null,"p95":null,"p99":null}},"persistence":{"recurring":0,"non_recurring":0,"ephemeral":0},"result_frequency_percent_as_number":{}}},"status":"OK"},"workload":{"timestamp":"2021-06-15T18:46:24.663Z","value":{"count":0,"task_types":{},"non_recurring":0,"owner_ids":0,"schedule":[],"overdue":0,"overdue_non_recurring":0,"estimated_schedule_density":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"capacity_requirments":{"per_minute":0,"per_hour":0,"per_day":0}},"status":"OK"},"capacity_estimation":{"status":"warn","timestamp":"2021-06-15T18:46:24.664Z","value":{"observed":{"observed_kibana_instances":1,"max_throughput_per_minute_per_kibana":200,"max_throughput_per_minute":200,"minutes_to_drain_overdue":null,"avg_recurring_required_throughput_per_minute":0,"avg_recurring_required_throughput_per_minute_per_kibana":0,"avg_required_throughput_per_minute":null,"avg_required_throughput_per_minute_per_kibana":null},"proposed":{"provisioned_kibana":null,"min_required_kibana":0,"avg_recurring_required_throughput_per_minute_per_kibana":null,"avg_required_throughput_per_minute_per_kibana":null}}}}}
Second health log
{"id":"5b2de169-2785-441b-ae8c-186a1936b17d","timestamp":"2021-06-15T18:46:33.787Z","status":"error","last_update":"2021-06-15T18:46:33.787Z","stats":{"configuration":{"timestamp":"2021-06-15T18:46:19.871Z","value":{"request_capacity":1000,"max_poll_inactivity_cycles":10,"monitored_aggregated_stats_refresh_rate":60000,"monitored_stats_running_average_window":50,"monitored_task_execution_thresholds":{"default":{"error_threshold":90,"warn_threshold":80},"custom":{}},"poll_interval":3000,"max_workers":10},"status":"OK"},"runtime":{"timestamp":"2021-06-15T18:46:33.787Z","value":{"polling":{"last_successful_poll":"2021-06-15T18:46:29.725Z","last_polling_delay":"2021-06-15T18:46:23.697Z","claim_duration":{"p50":9,"p90":1087,"p95":1087,"p99":1087},"duration":{"p50":54,"p90":91,"p95":91,"p99":91},"claim_conflicts":{"p50":0,"p90":0,"p95":0,"p99":0},"claim_mismatches":{"p50":0,"p90":0,"p95":0,"p99":0},"result_frequency_percent_as_number":{"Failed":0,"NoAvailableWorkers":0,"NoTasksClaimed":100,"RanOutOfCapacity":0,"RunningAtCapacity":0,"PoolFilled":0}},"drift":{"p50":null,"p90":null,"p95":null,"p99":null},"drift_by_type":{},"load":{"p50":0,"p90":0,"p95":0,"p99":0},"execution":{"duration":{},"duration_by_persistence":{"recurring":{"p50":null,"p90":null,"p95":null,"p99":null},"non_recurring":{"p50":null,"p90":null,"p95":null,"p99":null},"ephemeral":{"p50":null,"p90":null,"p95":null,"p99":null}},"persistence":{"recurring":0,"non_recurring":0,"ephemeral":0},"result_frequency_percent_as_number":{}}},"status":"OK"},"workload":{"timestamp":"2021-06-15T18:46:24.663Z","value":{"count":0,"task_types":{},"non_recurring":0,"owner_ids":0,"schedule":[],"overdue":0,"overdue_non_recurring":0,"estimated_schedule_density":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"capacity_requirments":{"per_minute":0,"per_hour":0,"per_day":0}},"status":"OK"},"capacity_estimation":{"status":"OK","timestamp":"2021-06-15T18:46:33.787Z","value":{"observed":{"observed_kibana_instances":1,"max_throughput_per_minute_per_kibana":200,"max_throughput_per_minute":200,"minutes_to_drain_overdue":null,"avg_recurring_required_throughput_per_minute":0,"avg_recurring_required_throughput_per_minute_per_kibana":0,"avg_required_throughput_per_minute":0,"avg_required_throughput_per_minute_per_kibana":0},"proposed":{"provisioned_kibana":0,"min_required_kibana":0,"avg_recurring_required_throughput_per_minute_per_kibana":null,"avg_required_throughput_per_minute_per_kibana":null}}}}}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikecote I'm not sure. Perhaps we don't consider capacity estimation as a factor for the logging here? I'm assuming capacity estimation is more of a planning reference rather than "I need to know these metrics when something isn't working right"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a fresh ES/Kibana launch, I saw this on startup:

server    log   [15:27:30.000] [error][plugins][taskManager] Latest Monitored Stats (error status): \
{
  "id": "5b2de169-2785-441b-ae8c-186a1936b17d",
  "timestamp": "2021-06-15T19:27:29.995Z",
  "status": "error",
  "last_update": "2021-06-15T19:27:29.994Z",
  "stats": {}
}

After adding an alert with actions and getting everything firing, then killing Kibana and restarting, saw the exact same message. Nothing like Mike's ^^^ though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second log I saw was "error status" while all the sub-elements being "OK" 🤔

My guess here is the stats are stale which triggers a warning/error state.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we don't consider capacity estimation as a factor for the logging here? I'm assuming capacity estimation is more of a planning reference rather than "I need to know these metrics when something isn't working right"?

You're totally right, and like this PR states, it should only log when runtime, configuration, and workload are not "ok". But, seems to still log when everything is "ok" except capacity estimation. It may be because this code here looks at the overall status? but should look within runtime, configuration, and workload individually?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, makes sense. I think, in a future PR, we should consider changing this logic and this logic so they are represented in the overall status for the workload and runtime buckets respectably.

If I change this code to just look at the overall status for each bucket, then we'll need to move around the freshness checks to ensure those are properly accounted for when determining overall status

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikecote I just pushed up some changes around this. LMK

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I ran it locally and the startup error logs no longer showed. 👍

} else {
logger.debug(`Latest Monitored Stats: ${JSON.stringify(monitoredHealth)}`);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('Configuration Statistics Aggregator', () => {
max_poll_inactivity_cycles: 10,
request_capacity: 1000,
monitored_aggregated_stats_refresh_rate: 5000,
monitored_stats_warn_drift_in_seconds: 60,
monitored_stats_running_average_window: 50,
monitored_task_execution_thresholds: {
default: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('createMonitoringStatsStream', () => {
max_poll_inactivity_cycles: 10,
request_capacity: 1000,
monitored_aggregated_stats_refresh_rate: 5000,
monitored_stats_warn_drift_in_seconds: 60,
monitored_stats_running_average_window: 50,
monitored_task_execution_thresholds: {
default: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ interface MonitoredStat<T> {
timestamp: string;
value: T;
}

export type RawMonitoredStat<T extends JsonObject> = MonitoredStat<T> & {
status: HealthStatus;
};
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/task_manager/server/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe('TaskManagerPlugin', () => {
max_poll_inactivity_cycles: 10,
request_capacity: 1000,
monitored_aggregated_stats_refresh_rate: 5000,
monitored_stats_warn_drift_in_seconds: 60,
monitored_stats_required_freshness: 5000,
monitored_stats_running_average_window: 50,
monitored_task_execution_thresholds: {
Expand Down Expand Up @@ -55,6 +56,7 @@ describe('TaskManagerPlugin', () => {
max_poll_inactivity_cycles: 10,
request_capacity: 1000,
monitored_aggregated_stats_refresh_rate: 5000,
monitored_stats_warn_drift_in_seconds: 60,
monitored_stats_required_freshness: 5000,
monitored_stats_running_average_window: 50,
monitored_task_execution_thresholds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('TaskPollingLifecycle', () => {
max_poll_inactivity_cycles: 10,
request_capacity: 1000,
monitored_aggregated_stats_refresh_rate: 5000,
monitored_stats_warn_drift_in_seconds: 60,
monitored_stats_required_freshness: 5000,
monitored_stats_running_average_window: 50,
monitored_task_execution_thresholds: {
Expand Down
Loading