Skip to content

Commit

Permalink
Fix alert defaults (#81207)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
chrisronline and kibanamachine committed Oct 21, 2020
1 parent 6b6084b commit de89541
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
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

0 comments on commit de89541

Please sign in to comment.