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

[7.x] Fix alert defaults (#81207) #81379

Merged
merged 1 commit into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('DiskUsageAlert', () => {
expect(alert.type).toBe(ALERT_DISK_USAGE);
expect(alert.label).toBe('Disk Usage');
expect(alert.defaultThrottle).toBe('1d');
expect(alert.defaultParams).toStrictEqual({ threshold: 90, duration: '5m' });
expect(alert.defaultParams).toStrictEqual({ threshold: 80, duration: '5m' });
expect(alert.actionVariables).toStrictEqual([
{ name: 'nodes', description: 'The list of nodes reporting high disk usage.' },
{ name: 'count', description: 'The number of nodes reporting high disk usage.' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class DiskUsageAlert extends BaseAlert {
public label = DiskUsageAlert.LABEL;

protected defaultParams = {
threshold: 90,
threshold: 80,
duration: '5m',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ describe('MissingMonitoringDataAlert', () => {
const alert = new MissingMonitoringDataAlert();
expect(alert.type).toBe(ALERT_MISSING_MONITORING_DATA);
expect(alert.label).toBe('Missing monitoring data');
expect(alert.defaultThrottle).toBe('1d');
expect(alert.defaultThrottle).toBe('6h');
// @ts-ignore
expect(alert.defaultParams).toStrictEqual({ limit: '1d', duration: '5m' });
expect(alert.defaultParams).toStrictEqual({ limit: '1d', duration: '15m' });
// @ts-ignore
expect(alert.actionVariables).toStrictEqual([
{ name: 'stackProducts', description: 'The stack products missing monitoring data.' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const FIRING = i18n.translate('xpack.monitoring.alerts.missingData.firing', {
defaultMessage: 'firing',
});

const DEFAULT_DURATION = '5m';
const DEFAULT_DURATION = '15m';
const DEFAULT_LIMIT = '1d';

// Go a bit farther back because we need to detect the difference between seeing the monitoring data versus just not looking far enough back
Expand All @@ -77,6 +77,8 @@ export class MissingMonitoringDataAlert extends BaseAlert {
} as CommonAlertParamDetail,
};

public defaultThrottle: string = '6h';

public type = ALERT_MISSING_MONITORING_DATA;
public label = i18n.translate('xpack.monitoring.alerts.missingData.label', {
defaultMessage: 'Missing monitoring data',
Expand Down