[Synthetics,Heartbeat] Change index pattern to 'heartbeat-*' (#167811)

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Craig Rodrigues 2023-10-12 02:11:17 -07:00 committed by GitHub
parent e6925cf24e
commit 6825483f1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 39 additions and 39 deletions

View file

@ -8,7 +8,7 @@
import { DynamicSettings } from '../runtime_types';
export const DYNAMIC_SETTINGS_DEFAULTS: DynamicSettings = {
heartbeatIndices: 'heartbeat-8*,heartbeat-7*',
heartbeatIndices: 'heartbeat-*',
certAgeThreshold: 730,
certExpirationThreshold: 30,
defaultConnectors: [],

View file

@ -8,7 +8,7 @@
import { DynamicSettingsAttributes } from '../runtime_types/settings';
export const DYNAMIC_SETTINGS_DEFAULTS: DynamicSettingsAttributes = {
heartbeatIndices: 'heartbeat-8*,heartbeat-7*',
heartbeatIndices: 'heartbeat-*',
certAgeThreshold: 730,
certExpirationThreshold: 30,
defaultConnectors: [],

View file

@ -213,7 +213,7 @@ describe('getNetworkEvents', () => {
"size": 1000,
"track_total_hits": true,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,

View file

@ -42,7 +42,7 @@ describe('UptimeEsClient', () => {
expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*',
index: 'heartbeat-*',
...mockSearchParams,
},
{ meta: true }
@ -72,7 +72,7 @@ describe('UptimeEsClient', () => {
await expect(uptimeEsClient.search(mockSearchParams)).rejects.toThrow(mockError);
expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*',
index: 'heartbeat-*',
...mockSearchParams,
},
{ meta: true }
@ -90,7 +90,7 @@ describe('UptimeEsClient', () => {
expect(esClient.count).toHaveBeenCalledWith(mockCountParams, { meta: true });
expect(result).toEqual({
indices: 'heartbeat-8*,heartbeat-7*',
indices: 'heartbeat-*',
result: {
body: {},
headers: {

View file

@ -8,7 +8,7 @@
import { DynamicSettings } from '../runtime_types';
export const DYNAMIC_SETTINGS_DEFAULTS: DynamicSettings = {
heartbeatIndices: 'heartbeat-8*,heartbeat-7*',
heartbeatIndices: 'heartbeat-*',
certAgeThreshold: 730,
certExpirationThreshold: 30,
defaultConnectors: [],

View file

@ -8,7 +8,7 @@
import { DynamicSettingsAttributes } from '../runtime_types/settings';
export const DYNAMIC_SETTINGS_DEFAULTS: DynamicSettingsAttributes = {
heartbeatIndices: 'heartbeat-8*,heartbeat-7*',
heartbeatIndices: 'heartbeat-*',
certAgeThreshold: 730,
certExpirationThreshold: 30,
defaultConnectors: [],

View file

@ -44,7 +44,7 @@ describe('UptimeEsClient', () => {
expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*',
index: 'heartbeat-*',
...mockSearchParams,
},
{ meta: true }
@ -74,7 +74,7 @@ describe('UptimeEsClient', () => {
await expect(uptimeEsClient.search(mockSearchParams)).rejects.toThrow(mockError);
expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*',
index: 'heartbeat-*',
...mockSearchParams,
},
{ meta: true }
@ -92,7 +92,7 @@ describe('UptimeEsClient', () => {
expect(esClient.count).toHaveBeenCalledWith(mockCountParams, { meta: true });
expect(result).toEqual({
indices: 'heartbeat-8*,heartbeat-7*',
indices: 'heartbeat-*',
result: {
body: {},
headers: {
@ -143,7 +143,7 @@ describe('UptimeEsClient', () => {
it('appends synthetics-* in index for legacy alerts', async () => {
savedObjectsClient.get = jest.fn().mockResolvedValue({
attributes: {
heartbeatIndices: 'heartbeat-8*,heartbeat-7*',
heartbeatIndices: 'heartbeat-*',
syntheticsIndexRemoved: true,
},
});
@ -167,7 +167,7 @@ describe('UptimeEsClient', () => {
expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*,synthetics-*',
index: 'heartbeat-*,synthetics-*',
...mockSearchParams,
},
{ meta: true }
@ -200,7 +200,7 @@ describe('UptimeEsClient', () => {
expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*,synthetics-*',
index: 'heartbeat-*,synthetics-*',
...mockSearchParams,
},
{ meta: true }
@ -227,7 +227,7 @@ describe('UptimeEsClient', () => {
expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*',
index: 'heartbeat-*',
body: {
query: {
match_all: {},
@ -251,7 +251,7 @@ describe('UptimeEsClient', () => {
expect(esClient.search).toHaveBeenLastCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*',
index: 'heartbeat-*',
body: {
query: {
match_all: {},

View file

@ -55,7 +55,7 @@ Array [
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
@ -106,7 +106,7 @@ Array [
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,

View file

@ -69,7 +69,7 @@ Array [
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,

View file

@ -253,7 +253,7 @@ describe('getCerts', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,

View file

@ -255,7 +255,7 @@ describe('monitor availability', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});
@ -415,7 +415,7 @@ describe('monitor availability', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
@ -750,7 +750,7 @@ describe('monitor availability', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
@ -862,7 +862,7 @@ describe('monitor availability', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
@ -1009,7 +1009,7 @@ describe('monitor availability', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});

View file

@ -218,7 +218,7 @@ describe('getMonitorStatus', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});
@ -353,7 +353,7 @@ describe('getMonitorStatus', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});
@ -573,7 +573,7 @@ describe('getMonitorStatus', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});
@ -713,7 +713,7 @@ describe('getMonitorStatus', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});
@ -859,7 +859,7 @@ describe('getMonitorStatus', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
expect(result.length).toBe(3);

View file

@ -213,7 +213,7 @@ describe('getNetworkEvents', () => {
"size": 1000,
"track_total_hits": true,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,

View file

@ -163,7 +163,7 @@ describe('getAll', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
@ -225,7 +225,7 @@ describe('getAll', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
@ -287,7 +287,7 @@ describe('getAll', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
@ -354,7 +354,7 @@ describe('getAll', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
@ -462,7 +462,7 @@ describe('getAll', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,

View file

@ -39,7 +39,7 @@ export default function ({ getService }: FtrProviderContext) {
.post(SYNTHETICS_API_URLS.DYNAMIC_SETTINGS)
.set('kbn-xsrf', 'true')
.send({
heartbeatIndices: 'heartbeat-8*,heartbeat-7*',
heartbeatIndices: 'heartbeat-*',
certExpirationThreshold: 30,
certAgeThreshold: 730,
defaultConnectors: testActions.slice(0, 2),
@ -79,7 +79,7 @@ export default function ({ getService }: FtrProviderContext) {
.post(SYNTHETICS_API_URLS.DYNAMIC_SETTINGS)
.set('kbn-xsrf', 'true')
.send({
heartbeatIndices: 'heartbeat-8*,heartbeat-7*',
heartbeatIndices: 'heartbeat-*',
certExpirationThreshold: 30,
certAgeThreshold: 730,
defaultConnectors: testActions,

View file

@ -18,7 +18,7 @@ export default function ({ getService }: FtrProviderContext) {
const data = apiResponse.body;
expect(data).to.eql({
indexExists: true,
indices: 'heartbeat-8*,heartbeat-7*',
indices: 'heartbeat-*',
});
});
});