Skip to content

Commit

Permalink
[Synthetics,Heartbeat] Change index pattern to 'heartbeat-*' (elastic…
Browse files Browse the repository at this point in the history
…#167811)

Co-authored-by: Dzmitry Lemechko <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
3 people authored Oct 12, 2023
1 parent e6925cf commit 6825483
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/synthetics/server/constants/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ describe('getNetworkEvents', () => {
"size": 1000,
"track_total_hits": true,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
Expand Down
6 changes: 3 additions & 3 deletions x-pack/plugins/synthetics/server/lib.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('UptimeEsClient', () => {

expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*',
index: 'heartbeat-*',
...mockSearchParams,
},
{ meta: true }
Expand Down Expand Up @@ -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 }
Expand All @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/uptime/server/constants/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down
16 changes: 8 additions & 8 deletions x-pack/plugins/uptime/server/legacy_uptime/lib/lib.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('UptimeEsClient', () => {

expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*',
index: 'heartbeat-*',
...mockSearchParams,
},
{ meta: true }
Expand Down Expand Up @@ -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 }
Expand All @@ -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: {
Expand Down Expand Up @@ -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,
},
});
Expand All @@ -167,7 +167,7 @@ describe('UptimeEsClient', () => {

expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*,synthetics-*',
index: 'heartbeat-*,synthetics-*',
...mockSearchParams,
},
{ meta: true }
Expand Down Expand Up @@ -200,7 +200,7 @@ describe('UptimeEsClient', () => {

expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*,synthetics-*',
index: 'heartbeat-*,synthetics-*',
...mockSearchParams,
},
{ meta: true }
Expand All @@ -227,7 +227,7 @@ describe('UptimeEsClient', () => {

expect(esClient.search).toHaveBeenCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*',
index: 'heartbeat-*',
body: {
query: {
match_all: {},
Expand All @@ -251,7 +251,7 @@ describe('UptimeEsClient', () => {

expect(esClient.search).toHaveBeenLastCalledWith(
{
index: 'heartbeat-8*,heartbeat-7*',
index: 'heartbeat-*',
body: {
query: {
match_all: {},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ describe('getCerts', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ describe('monitor availability', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});
Expand Down Expand Up @@ -415,7 +415,7 @@ describe('monitor availability', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);

Expand Down Expand Up @@ -750,7 +750,7 @@ describe('monitor availability', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);

Expand Down Expand Up @@ -862,7 +862,7 @@ describe('monitor availability', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
Expand Down Expand Up @@ -1009,7 +1009,7 @@ describe('monitor availability', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ describe('getMonitorStatus', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});
Expand Down Expand Up @@ -353,7 +353,7 @@ describe('getMonitorStatus', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});
Expand Down Expand Up @@ -573,7 +573,7 @@ describe('getMonitorStatus', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});
Expand Down Expand Up @@ -713,7 +713,7 @@ describe('getMonitorStatus', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
});
Expand Down Expand Up @@ -859,7 +859,7 @@ describe('getMonitorStatus', () => {
},
"size": 0,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
}
`);
expect(result.length).toBe(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ describe('getNetworkEvents', () => {
"size": 1000,
"track_total_hits": true,
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ describe('getAll', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
Expand Down Expand Up @@ -225,7 +225,7 @@ describe('getAll', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
Expand Down Expand Up @@ -287,7 +287,7 @@ describe('getAll', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
Expand Down Expand Up @@ -354,7 +354,7 @@ describe('getAll', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
Expand Down Expand Up @@ -462,7 +462,7 @@ describe('getAll', () => {
},
],
},
"index": "heartbeat-8*,heartbeat-7*",
"index": "heartbeat-*",
},
Object {
"meta": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-*',
});
});
});
Expand Down

0 comments on commit 6825483

Please sign in to comment.