[7.x] [Archive Migration] Swap es archiver for kbn archiver - Canvas app (#102533) (#107504)

* [Archive Migration] Swap es archiver for kbn archiver - Canvas app (#102533)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* Backport saved object info svc, as it is in master.

Signed-off-by: Tre' Seymour <wayne.seymour@elastic.co>

Co-authored-by: Tre <wayne.seymour@elastic.co>
This commit is contained in:
Kibana Machine 2021-08-10 10:54:11 -04:00 committed by GitHub
parent 0b215dcdab
commit 6834ac8ba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 608 additions and 3098 deletions

View file

@ -14,7 +14,7 @@ import { RetryService } from './retry';
import { RandomnessService } from './randomness';
import { SecurityServiceProvider } from './security';
import { EsDeleteAllIndicesProvider } from './es_delete_all_indices';
import { SavedObjectInfoProvider } from './saved_object_info';
import { SavedObjectInfoService } from './saved_object_info';
export const services = {
deployment: DeploymentService,
@ -25,5 +25,5 @@ export const services = {
randomness: RandomnessService,
security: SecurityServiceProvider,
esDeleteAllIndices: EsDeleteAllIndicesProvider,
savedObjectInfo: SavedObjectInfoProvider,
savedObjectInfo: SavedObjectInfoService,
};

View file

@ -6,48 +6,58 @@
* Side Public License, v 1.
*/
import { Client } from '@elastic/elasticsearch';
import url from 'url';
import { Either, fromNullable, chain, getOrElse } from 'fp-ts/Either';
import { flow } from 'fp-ts/function';
import { FtrProviderContext } from '../ftr_provider_context';
import { inspect } from 'util';
const pluck = (key: string) => (obj: any): Either<Error, string> =>
fromNullable(new Error(`Missing ${key}`))(obj[key]);
import type { estypes } from '@elastic/elasticsearch';
const types = (node: string) => async (index: string = '.kibana') => {
let res: unknown;
try {
const { body } = await new Client({ node }).search({
index,
body: {
aggs: {
savedobjs: {
terms: {
field: 'type',
import { ToolingLog } from '@kbn/dev-utils';
import { FtrService } from '../ftr_provider_context';
export class SavedObjectInfoService extends FtrService {
private readonly es = this.ctx.getService('es');
public async logSoTypes(log: ToolingLog, msg: string | null = null) {
const types = await this.getTypes();
log.debug(
`\n### Saved Object Types ${msg || 'Count: ' + types.length}\n${inspect(types, {
compact: false,
depth: 99,
breakLength: 80,
sorted: true,
})}`
);
}
public async getTypes(index = '.kibana') {
try {
const { body } = await this.es.search({
index,
size: 0,
body: {
aggs: {
savedobjs: {
terms: {
field: 'type',
},
},
},
},
},
});
});
res = flow(
pluck('aggregations'),
chain(pluck('savedobjs')),
chain(pluck('buckets')),
getOrElse((err) => `${err.message}`)
)(body);
} catch (err) {
throw new Error(`Error while searching for saved object types: ${err}`);
const agg = body.aggregations?.savedobjs as
| estypes.AggregationsTermsAggregate<{ key: string; doc_count: number }>
| undefined;
if (!agg?.buckets) {
throw new Error(
`expected es to return buckets of saved object types: ${inspect(body, { depth: 100 })}`
);
}
return agg.buckets;
} catch (error) {
throw new Error(`Error while searching for saved object types: ${error}`);
}
}
return res;
};
export const SavedObjectInfoProvider: any = ({ getService }: FtrProviderContext) => {
const config = getService('config');
return {
types: types(url.format(config.get('servers.elasticsearch'))),
};
};
}

View file

@ -11,7 +11,6 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const savedObjectInfo = getService('savedObjectInfo');
const browser = getService('browser');
const log = getService('log');
const retry = getService('retry');
@ -31,9 +30,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
log.debug('load kibana index with default index pattern');
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json');
log.info(
`\n### SAVED OBJECT TYPES IN index: [.kibana]: \n\t${await savedObjectInfo.types()}`
);
// and load a set of makelogs data
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional');

View file

@ -18,13 +18,14 @@ export default function canvasCustomElementTest({
const retry = getService('retry');
const PageObjects = getPageObjects(['canvas', 'common']);
const find = getService('find');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const archive = 'x-pack/test/functional/fixtures/kbn_archiver/canvas/default';
describe('custom elements', function () {
this.tags('skipFirefox');
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/canvas/default');
await kibanaServer.importExport.load(archive);
// open canvas home
await PageObjects.common.navigateToApp('canvas');
// load test workpad
@ -33,6 +34,10 @@ export default function canvasCustomElementTest({
});
});
after(async () => {
await kibanaServer.importExport.unload(archive);
});
it('creates a custom element from an element when prompted', async () => {
// find the first workpad element (a markdown element) and click it to select it
await testSubjects.click('canvasWorkpadPage > canvasWorkpadPageElementContent', 20000);

View file

@ -14,20 +14,26 @@ export default function canvasExpressionTest({ getService, getPageObjects }: Ftr
const retry = getService('retry');
const PageObjects = getPageObjects(['canvas', 'common']);
const find = getService('find');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const archive = 'x-pack/test/functional/fixtures/kbn_archiver/canvas/default';
describe('expression editor', function () {
// there is an issue with FF not properly clicking on workpad elements
this.tags('skipFirefox');
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/canvas/default');
await kibanaServer.importExport.load(archive);
// load test workpad
await PageObjects.common.navigateToApp('canvas', {
hash: '/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1',
});
});
after(async () => {
await kibanaServer.importExport.unload(archive);
});
it('updates when element is changed via side bar', async () => {
// wait for all our elements to load up
await retry.try(async () => {

View file

@ -9,22 +9,20 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'canvas', 'error', 'security', 'spaceSelector']);
const appsMenu = getService('appsMenu');
const globalNav = getService('globalNav');
const testSubjects = getService('testSubjects');
const kibanaServer = getService('kibanaServer');
const archive = 'x-pack/test/functional/fixtures/kbn_archiver/canvas/default';
describe('security feature controls', function () {
this.tags(['skipFirefox']);
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/canvas/default');
});
after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/canvas/default');
});
before(async () => await kibanaServer.importExport.load(archive));
after(async () => await kibanaServer.importExport.unload(archive));
describe('global canvas all privileges', () => {
before(async () => {

View file

@ -14,18 +14,29 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'canvas', 'security', 'spaceSelector']);
const appsMenu = getService('appsMenu');
const testSubjects = getService('testSubjects');
const kibanaServer = getService('kibanaServer');
const soInfo = getService('savedObjectInfo');
const log = getService('log');
describe('spaces feature controls', function () {
this.tags(['skipFirefox']);
before(async () => {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
});
after(async () => {
await kibanaServer.savedObjects.clean({ types: ['canvas-workpad'] });
await soInfo.logSoTypes(log);
});
describe('space with no features disabled', () => {
const canvasDefaultArchive = 'x-pack/test/functional/fixtures/kbn_archiver/canvas/default';
before(async () => {
// we need to load the following in every situation as deleting
// a space deletes all of the associated saved objects
await esArchiver.load('x-pack/test/functional/es_archives/canvas/default');
await kibanaServer.importExport.load(canvasDefaultArchive);
await spacesService.create({
id: 'custom_space',
@ -36,7 +47,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload('x-pack/test/functional/es_archives/canvas/default');
await kibanaServer.importExport.unload(canvasDefaultArchive);
});
it('shows canvas navlink', async () => {
@ -81,10 +92,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
describe('space with Canvas disabled', () => {
const spaceWithCanvasDisabledArchive =
'x-pack/test/functional/fixtures/kbn_archiver/spaces/disabled_features';
before(async () => {
// we need to load the following in every situation as deleting
// a space deletes all of the associated saved objects
await esArchiver.load('x-pack/test/functional/es_archives/spaces/disabled_features');
await kibanaServer.importExport.load(spaceWithCanvasDisabledArchive);
await spacesService.create({
id: 'custom_space',
name: 'custom_space',
@ -94,7 +108,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload('x-pack/test/functional/es_archives/spaces/disabled_features');
await kibanaServer.importExport.unload(spaceWithCanvasDisabledArchive);
});
it(`doesn't show canvas navlink`, async () => {

View file

@ -14,20 +14,24 @@ export default function canvasFiltersTest({ getService, getPageObjects }: FtrPro
const retry = getService('retry');
const PageObjects = getPageObjects(['canvas', 'common']);
const find = getService('find');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const archive = 'x-pack/test/functional/fixtures/kbn_archiver/canvas/filter';
describe('filters', function () {
// there is an issue with FF not properly clicking on workpad elements
this.tags('skipFirefox');
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/canvas/filter');
await kibanaServer.importExport.load(archive);
// load test workpad
await PageObjects.common.navigateToApp('canvas', {
hash: '/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1',
});
});
after(async () => {
await kibanaServer.importExport.unload(archive);
});
it('filter updates when dropdown is changed', async () => {
// wait for all our elements to load up
await retry.try(async () => {

View file

@ -10,10 +10,16 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function canvasLensTest({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['canvas', 'common', 'header', 'lens']);
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const archives = {
es: 'x-pack/test/functional/es_archives/canvas/logstash_lens',
kbn: 'x-pack/test/functional/fixtures/kbn_archiver/canvas/lens',
};
describe('lens in canvas', function () {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/canvas/lens');
await esArchiver.load(archives.es);
await kibanaServer.importExport.load(archives.kbn);
// open canvas home
await PageObjects.common.navigateToApp('canvas');
// load test workpad
@ -23,7 +29,8 @@ export default function canvasLensTest({ getService, getPageObjects }: FtrProvid
});
after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/canvas/lens');
await esArchiver.unload(archives.es);
await kibanaServer.importExport.unload(archives.kbn);
});
it('renders lens visualization', async () => {

View file

@ -11,11 +11,12 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const es = getService('es');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const browser = getService('browser');
const log = getService('log');
const security = getService('security');
const PageObjects = getPageObjects(['reporting', 'common', 'canvas']);
const archive = 'x-pack/test/functional/fixtures/kbn_archiver/canvas/reports';
describe('Canvas PDF Report Generation', () => {
before('initialize tests', async () => {
@ -31,11 +32,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
],
});
await security.testUser.setRoles(['kibana_admin', 'test_reporting_user']);
await esArchiver.load('x-pack/test/functional/es_archives/canvas/reports');
await kibanaServer.importExport.load(archive);
await browser.setWindowSize(1600, 850);
});
after('clean up archives', async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/canvas/reports');
await kibanaServer.importExport.unload(archive);
await es.deleteByQuery({
index: '.reporting-*',
refresh: true,

View file

@ -12,7 +12,8 @@ export default function canvasSmokeTest({ getService, getPageObjects }) {
const browser = getService('browser');
const retry = getService('retry');
const PageObjects = getPageObjects(['common']);
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const archive = 'x-pack/test/functional/fixtures/kbn_archiver/canvas/default';
describe('smoke test', function () {
this.tags('includeFirefox');
@ -20,10 +21,14 @@ export default function canvasSmokeTest({ getService, getPageObjects }) {
const testWorkpadId = 'workpad-1705f884-6224-47de-ba49-ca224fe6ec31';
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/canvas/default');
await kibanaServer.importExport.load(archive);
await PageObjects.common.navigateToApp('canvas');
});
after(async () => {
await kibanaServer.importExport.unload(archive);
});
it('loads workpad list', async () => {
await retry.try(async () => {
const workpadRows = await testSubjects.findAll(workpadListSelector);

File diff suppressed because it is too large Load diff

View file

@ -1,190 +0,0 @@
{
"type": "doc",
"value": {
"id": "space:default",
"index": ".kibana_1",
"source": {
"space": {
"_reserved": true,
"color": "#00bfb3",
"description": "This is your default space!",
"name": "Default"
},
"type": "space",
"updated_at": "2018-11-06T18:20:26.703Z"
}
}
}
{
"type": "doc",
"value": {
"id": "canvas-workpad:workpad-1705f884-6224-47de-ba49-ca224fe6ec31",
"index": ".kibana_1",
"source": {
"canvas-workpad": {
"@created": "2018-11-19T19:17:12.646Z",
"@timestamp": "2018-11-19T19:36:28.499Z",
"assets": {
},
"colors": [
"#37988d",
"#c19628",
"#b83c6f",
"#3f9939",
"#1785b0",
"#ca5f35",
"#45bdb0",
"#f2bc33",
"#e74b8b",
"#4fbf48",
"#1ea6dc",
"#fd7643",
"#72cec3",
"#f5cc5d",
"#ec77a8",
"#7acf74",
"#4cbce4",
"#fd986f",
"#a1ded7",
"#f8dd91",
"#f2a4c5",
"#a6dfa2",
"#86d2ed",
"#fdba9f",
"#000000",
"#444444",
"#777777",
"#BBBBBB",
"#FFFFFF",
"rgba(255,255,255,0)"
],
"height": 920,
"id": "workpad-1705f884-6224-47de-ba49-ca224fe6ec31",
"isWriteable": true,
"name": "Test Workpad",
"page": 0,
"pages": [
{
"elements": [
{
"expression": "savedLens id=\"my-lens-vis\" timerange={timerange from=\"2014-01-01\" to=\"2018-01-01\"}",
"id": "element-8f64a10a-01f3-4a71-a682-5b627cbe4d0e",
"position": {
"angle": 0,
"height": 238,
"left": 33.5,
"top": 20,
"width": 338
}
}
],
"id": "page-c38cd459-10fe-45f9-847b-2cbd7ec74319",
"style": {
"background": "#fff"
},
"transition": {
}
}
],
"width": 840
},
"type": "canvas-workpad",
"updated_at": "2018-11-19T19:36:28.511Z"
}
}
}
{
"type": "doc",
"value": {
"id": "lens:my-lens-vis",
"index": ".kibana_1",
"source": {
"lens": {
"expression": "",
"state": {
"datasourceMetaData": {
"filterableIndexPatterns": [
{
"id": "logstash-lens",
"title": "logstash-lens"
}
]
},
"datasourceStates": {
"indexpattern": {
"currentIndexPatternId": "logstash-lens",
"layers": {
"c61a8afb-a185-4fae-a064-fb3846f6c451": {
"columnOrder": [
"2cd09808-3915-49f4-b3b0-82767eba23f7"
],
"columns": {
"2cd09808-3915-49f4-b3b0-82767eba23f7": {
"dataType": "number",
"isBucketed": false,
"label": "Maximum of bytes",
"operationType": "max",
"scale": "ratio",
"sourceField": "bytes"
}
},
"indexPatternId": "logstash-lens"
}
}
}
},
"filters": [],
"query": {
"language": "kuery",
"query": ""
},
"visualization": {
"accessor": "2cd09808-3915-49f4-b3b0-82767eba23f7",
"layerId": "c61a8afb-a185-4fae-a064-fb3846f6c451"
}
},
"title": "Artistpreviouslyknownaslens",
"visualizationType": "lnsMetric"
},
"references": [],
"type": "lens",
"updated_at": "2019-10-16T00:28:08.979Z"
}
}
}
{
"type": "doc",
"value": {
"index": "logstash-lens",
"id": "1",
"source": {
"@timestamp": "2015-09-20T02:00:00.000Z",
"bytes": 16788
}
}
}
{
"type": "doc",
"value": {
"id": "index-pattern:logstash-lens",
"index": ".kibana_1",
"source": {
"index-pattern" : {
"title" : "logstash-lens",
"timeFieldName" : "@timestamp",
"fields" : "[]"
},
"type" : "index-pattern",
"references" : [ ],
"migrationVersion" : {
"index-pattern" : "7.6.0"
},
"updated_at" : "2020-08-19T08:39:09.998Z"
},
"type": "_doc"
}
}

View file

@ -1,409 +0,0 @@
{
"type": "index",
"value": {
"aliases": {
".kibana": {
}
},
"index": ".kibana_1",
"mappings": {
"dynamic": "strict",
"properties": {
"canvas-workpad": {
"dynamic": "false",
"properties": {
"@created": {
"type": "date"
},
"@timestamp": {
"type": "date"
},
"id": {
"index": false,
"type": "text"
},
"name": {
"fields": {
"keyword": {
"type": "keyword"
}
},
"type": "text"
}
}
},
"config": {
"dynamic": "true",
"properties": {
"buildNum": {
"type": "keyword"
}
}
},
"references": {
"properties": {
"id": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"type": {
"type": "keyword"
}
},
"type": "nested"
},
"dashboard": {
"properties": {
"description": {
"type": "text"
},
"hits": {
"type": "integer"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"optionsJSON": {
"type": "text"
},
"panelsJSON": {
"type": "text"
},
"refreshInterval": {
"properties": {
"display": {
"type": "keyword"
},
"pause": {
"type": "boolean"
},
"section": {
"type": "integer"
},
"value": {
"type": "integer"
}
}
},
"timeFrom": {
"type": "keyword"
},
"timeRestore": {
"type": "boolean"
},
"timeTo": {
"type": "keyword"
},
"title": {
"type": "text"
},
"uiStateJSON": {
"type": "text"
},
"version": {
"type": "integer"
}
}
},
"graph-workspace": {
"properties": {
"description": {
"type": "text"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"numLinks": {
"type": "integer"
},
"numVertices": {
"type": "integer"
},
"title": {
"type": "text"
},
"version": {
"type": "integer"
},
"wsState": {
"type": "text"
}
}
},
"index-pattern": {
"properties": {
"fieldFormatMap": {
"type": "text"
},
"fields": {
"type": "text"
},
"intervalName": {
"type": "keyword"
},
"notExpandable": {
"type": "boolean"
},
"sourceFilters": {
"type": "text"
},
"timeFieldName": {
"type": "keyword"
},
"title": {
"type": "text"
},
"type": {
"type": "keyword"
},
"typeMeta": {
"type": "keyword"
}
}
},
"lens": {
"properties": {
"expression": {
"index": false,
"type": "keyword"
},
"state": {
"type": "flattened"
},
"title": {
"type": "text"
},
"visualizationType": {
"type": "keyword"
}
}
},
"kql-telemetry": {
"properties": {
"optInCount": {
"type": "long"
},
"optOutCount": {
"type": "long"
}
}
},
"migrationVersion": {
"dynamic": "true",
"type": "object"
},
"namespace": {
"type": "keyword"
},
"search": {
"properties": {
"columns": {
"type": "keyword"
},
"description": {
"type": "text"
},
"hits": {
"type": "integer"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"sort": {
"type": "keyword"
},
"title": {
"type": "text"
},
"version": {
"type": "integer"
}
}
},
"server": {
"properties": {
"uuid": {
"type": "keyword"
}
}
},
"space": {
"properties": {
"_reserved": {
"type": "boolean"
},
"color": {
"type": "keyword"
},
"description": {
"type": "text"
},
"initials": {
"type": "keyword"
},
"disabledFeatures": {
"type": "keyword"
},
"name": {
"fields": {
"keyword": {
"ignore_above": 2048,
"type": "keyword"
}
},
"type": "text"
}
}
},
"telemetry": {
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"timelion-sheet": {
"properties": {
"description": {
"type": "text"
},
"hits": {
"type": "integer"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"timelion_chart_height": {
"type": "integer"
},
"timelion_columns": {
"type": "integer"
},
"timelion_interval": {
"type": "keyword"
},
"timelion_other_interval": {
"type": "keyword"
},
"timelion_rows": {
"type": "integer"
},
"timelion_sheet": {
"type": "text"
},
"title": {
"type": "text"
},
"version": {
"type": "integer"
}
}
},
"type": {
"type": "keyword"
},
"updated_at": {
"type": "date"
},
"url": {
"properties": {
"accessCount": {
"type": "long"
},
"accessDate": {
"type": "date"
},
"createDate": {
"type": "date"
},
"url": {
"fields": {
"keyword": {
"ignore_above": 2048,
"type": "keyword"
}
},
"type": "text"
}
}
},
"visualization": {
"properties": {
"description": {
"type": "text"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"savedSearchId": {
"type": "keyword"
},
"title": {
"type": "text"
},
"uiStateJSON": {
"type": "text"
},
"version": {
"type": "integer"
},
"visState": {
"type": "text"
}
}
}
}
},
"settings": {
"index": {
"number_of_replicas": "1",
"number_of_shards": "1"
}
}
}
}
{
"type": "index",
"value": {
"index": "logstash-lens",
"mappings": {
"properties": {
"@timestamp": {
"type": "date"
},
"bytes": {
"type": "float"
}
}
},
"settings": {
"index": {
"number_of_shards": "1",
"number_of_replicas": "0"
}
}
}
}

View file

@ -0,0 +1,11 @@
{
"type": "doc",
"value": {
"id": "1",
"index": "logstash-lens",
"source": {
"@timestamp": "2015-09-20T02:00:00.000Z",
"bytes": 16788
}
}
}

View file

@ -0,0 +1,24 @@
{
"type": "index",
"value": {
"aliases": {
},
"index": "logstash-lens",
"mappings": {
"properties": {
"@timestamp": {
"type": "date"
},
"bytes": {
"type": "float"
}
}
},
"settings": {
"index": {
"number_of_replicas": "0",
"number_of_shards": "1"
}
}
}
}

View file

@ -0,0 +1,108 @@
{
"attributes": {
"@created": "2018-11-19T19:17:12.646Z",
"@timestamp": "2018-11-19T19:36:28.499Z",
"assets": {},
"colors": [
"#37988d",
"#c19628",
"#b83c6f",
"#3f9939",
"#1785b0",
"#ca5f35",
"#45bdb0",
"#f2bc33",
"#e74b8b",
"#4fbf48",
"#1ea6dc",
"#fd7643",
"#72cec3",
"#f5cc5d",
"#ec77a8",
"#7acf74",
"#4cbce4",
"#fd986f",
"#a1ded7",
"#f8dd91",
"#f2a4c5",
"#a6dfa2",
"#86d2ed",
"#fdba9f",
"#000000",
"#444444",
"#777777",
"#BBBBBB",
"#FFFFFF",
"rgba(255,255,255,0)"
],
"height": 920,
"isWriteable": true,
"name": "Test Workpad",
"page": 0,
"pages": [
{
"elements": [
{
"expression": "markdown \n \"### Welcome to Canvas\n\nEnjoy your stay!\n\n- Green: Markdown, Browser function\n- Blue: SQL, Server function\n- Pink: CSV, Common function\n- Orange: Timelion, Server function\"\n| render \n containerStyle={containerStyle padding=\"8px\" opacity=\"1\" backgroundColor=\"#7acf74\"}",
"id": "element-8f64a10a-01f3-4a71-a682-5b627cbe4d0e",
"position": {
"angle": 0,
"height": 238,
"left": 33.5,
"top": 20,
"width": 338
}
},
{
"expression": "filters\n| essql query=\"SELECT extension,bytes FROM \\\"logstash*\\\" LIMIT 10\"\n| table\n| render \n containerStyle={containerStyle padding=\"4px\" opacity=\"0.7\" backgroundColor=\"#4cbce4\"}",
"id": "element-d3bf91e2-7e8c-4884-942e-d4e9006aef09",
"position": {
"angle": 0,
"height": 345,
"left": 439,
"top": 20,
"width": 367
}
},
{
"expression": "csv \"desc,price\nred fish,100\nblue fish,200\"\n| render \n containerStyle={containerStyle backgroundColor=\"#ec77a8\" padding=\"4px\" opacity=\"0.7\"}",
"id": "element-223fe2b3-ffb4-4070-ae61-3e06b8052abb",
"position": {
"angle": 0,
"height": 132,
"left": 25,
"top": 390,
"width": 207
}
},
{
"expression": "filters\n| timelion query=\".es(index=logstash*,q=extension:jpg)\" interval=\"1M\" from=\"2017-01-01\" to=\"2017-12-31\"\n| table perPage=200\n| render containerStyle={containerStyle backgroundColor=\"#fd986f\" opacity=\"0.7\"}",
"id": "element-3c905696-8258-4e9c-ab58-89018681f79f",
"position": {
"angle": 0,
"height": 397,
"left": 263.5,
"top": 390,
"width": 533
}
}
],
"id": "page-c38cd459-10fe-45f9-847b-2cbd7ec74319",
"style": {
"background": "#fff"
},
"transition": {}
}
],
"width": 840
},
"coreMigrationVersion": "7.15.0",
"id": "workpad-1705f884-6224-47de-ba49-ca224fe6ec31",
"migrationVersion": {
"canvas-workpad": "7.0.0"
},
"references": [],
"type": "canvas-workpad",
"updated_at": "2018-11-19T19:36:28.511Z",
"version": "WzUsMl0="
}

View file

@ -0,0 +1,105 @@
{
"attributes": {
"@created": "2020-10-28T17:58:54.801Z",
"@timestamp": "2020-10-28T17:59:56.747Z",
"assets": {},
"colors": [
"#37988d",
"#c19628",
"#b83c6f",
"#3f9939",
"#1785b0",
"#ca5f35",
"#45bdb0",
"#f2bc33",
"#e74b8b",
"#4fbf48",
"#1ea6dc",
"#fd7643",
"#72cec3",
"#f5cc5d",
"#ec77a8",
"#7acf74",
"#4cbce4",
"#fd986f",
"#a1ded7",
"#f8dd91",
"#f2a4c5",
"#a6dfa2",
"#86d2ed",
"#fdba9f",
"#000000",
"#444444",
"#777777",
"#BBBBBB",
"#FFFFFF",
"rgba(255,255,255,0)"
],
"css": ".canvasPage {\n\n}",
"height": 720,
"isWriteable": true,
"name": "Filter Debug Workpad",
"page": 0,
"pages": [
{
"elements": [
{
"expression": "timefilterControl compact=true column=@timestamp\n| render",
"filter": "timefilter from=\"2020-10-18T17:59:51.260Z\" to=2020-10-24T17:59:54.412Z column=@timestamp",
"id": "element-1a9e6a1e-3231-4752-acdd-20fff6afd9ee",
"position": {
"angle": 0,
"height": 50,
"left": 20,
"parent": null,
"top": 20,
"width": 500
}
},
{
"expression": "filters\n| render as=debug",
"id": "element-d5687399-fd3e-4923-9280-ba1e8af578d1",
"position": {
"angle": 0,
"height": 526,
"left": 559,
"parent": null,
"top": 21,
"width": 500
}
},
{
"expression": "demodata\n| dropdownControl valueColumn=project filterColumn=project | render",
"filter": "exactly value=\"apm\" column=\"project\"",
"id": "element-61165541-a4cb-4638-b911-cf7eacc31c44",
"position": {
"angle": 0,
"height": 50,
"left": 20,
"parent": null,
"top": 128,
"width": 500
}
}
],
"groups": [],
"id": "page-2276b5d0-9b3d-4a95-9e57-ea6c040c447d",
"style": {
"background": "#FFF"
},
"transition": {}
}
],
"variables": [],
"width": 1080
},
"coreMigrationVersion": "7.15.0",
"id": "workpad-b5618217-56d2-47fa-b756-1be2306cda68",
"migrationVersion": {
"canvas-workpad": "7.0.0"
},
"references": [],
"type": "canvas-workpad",
"updated_at": "2020-10-28T17:59:56.753Z",
"version": "WzEsMl0="
}

View file

@ -0,0 +1,151 @@
{
"attributes": {
"fields": "[]",
"timeFieldName": "@timestamp",
"title": "logstash-lens"
},
"coreMigrationVersion": "7.15.0",
"id": "logstash-lens",
"migrationVersion": {
"index-pattern": "7.11.0"
},
"references": [],
"type": "index-pattern",
"updated_at": "2020-08-19T08:39:09.998Z",
"version": "WzcsMl0="
}
{
"attributes": {
"state": {
"datasourceStates": {
"indexpattern": {
"layers": {
"c61a8afb-a185-4fae-a064-fb3846f6c451": {
"columnOrder": [
"2cd09808-3915-49f4-b3b0-82767eba23f7"
],
"columns": {
"2cd09808-3915-49f4-b3b0-82767eba23f7": {
"dataType": "number",
"isBucketed": false,
"label": "Maximum of bytes",
"operationType": "max",
"scale": "ratio",
"sourceField": "bytes"
}
}
}
}
}
},
"filters": [],
"query": {
"language": "kuery",
"query": ""
},
"visualization": {
"accessor": "2cd09808-3915-49f4-b3b0-82767eba23f7",
"layerId": "c61a8afb-a185-4fae-a064-fb3846f6c451"
}
},
"title": "Artistpreviouslyknownaslens",
"visualizationType": "lnsMetric"
},
"coreMigrationVersion": "7.15.0",
"id": "my-lens-vis",
"migrationVersion": {
"lens": "7.14.0"
},
"references": [
{
"id": "logstash-lens",
"name": "indexpattern-datasource-current-indexpattern",
"type": "index-pattern"
},
{
"id": "logstash-lens",
"name": "indexpattern-datasource-layer-c61a8afb-a185-4fae-a064-fb3846f6c451",
"type": "index-pattern"
}
],
"type": "lens",
"updated_at": "2019-10-16T00:28:08.979Z",
"version": "WzYsMl0="
}
{
"attributes": {
"@created": "2018-11-19T19:17:12.646Z",
"@timestamp": "2018-11-19T19:36:28.499Z",
"assets": {},
"colors": [
"#37988d",
"#c19628",
"#b83c6f",
"#3f9939",
"#1785b0",
"#ca5f35",
"#45bdb0",
"#f2bc33",
"#e74b8b",
"#4fbf48",
"#1ea6dc",
"#fd7643",
"#72cec3",
"#f5cc5d",
"#ec77a8",
"#7acf74",
"#4cbce4",
"#fd986f",
"#a1ded7",
"#f8dd91",
"#f2a4c5",
"#a6dfa2",
"#86d2ed",
"#fdba9f",
"#000000",
"#444444",
"#777777",
"#BBBBBB",
"#FFFFFF",
"rgba(255,255,255,0)"
],
"height": 920,
"isWriteable": true,
"name": "Test Workpad",
"page": 0,
"pages": [
{
"elements": [
{
"expression": "savedLens id=\"my-lens-vis\" timerange={timerange from=\"2014-01-01\" to=\"2018-01-01\"}",
"id": "element-8f64a10a-01f3-4a71-a682-5b627cbe4d0e",
"position": {
"angle": 0,
"height": 238,
"left": 33.5,
"top": 20,
"width": 338
}
}
],
"id": "page-c38cd459-10fe-45f9-847b-2cbd7ec74319",
"style": {
"background": "#fff"
},
"transition": {}
}
],
"width": 840
},
"coreMigrationVersion": "7.15.0",
"id": "workpad-1705f884-6224-47de-ba49-ca224fe6ec31",
"migrationVersion": {
"canvas-workpad": "7.0.0"
},
"references": [],
"type": "canvas-workpad",
"updated_at": "2018-11-19T19:36:28.511Z",
"version": "WzUsMl0="
}

View file

@ -0,0 +1,79 @@
{
"attributes": {
"@created": "2020-10-21T23:50:26.466Z",
"@timestamp": "2020-10-22T23:44:48.387Z",
"assets": {},
"colors": [
"#37988d",
"#c19628",
"#b83c6f",
"#3f9939",
"#1785b0",
"#ca5f35",
"#45bdb0",
"#f2bc33",
"#e74b8b",
"#4fbf48",
"#1ea6dc",
"#fd7643",
"#72cec3",
"#f5cc5d",
"#ec77a8",
"#7acf74",
"#4cbce4",
"#fd986f",
"#a1ded7",
"#f8dd91",
"#f2a4c5",
"#a6dfa2",
"#86d2ed",
"#fdba9f",
"#000000",
"#444444",
"#777777",
"#BBBBBB",
"#FFFFFF",
"rgba(255,255,255,0)"
],
"css": ".canvasPage {\n\n}",
"height": 8,
"isWriteable": true,
"name": "The Very Cool Workpad for PDF Tests",
"page": 0,
"pages": [
{
"elements": [
{
"expression": "shape \"square\" fill=\"#4cbce4\" border=\"rgba(255,255,255,0)\" borderWidth=0 maintainAspect=false | render",
"id": "element-e05237c6-0fda-49e7-84fc-b8573739b515",
"position": {
"angle": 0,
"height": 18,
"left": -1,
"parent": null,
"top": -1,
"width": 15.5
}
}
],
"groups": [],
"id": "page-c0e601aa-1c72-4d4a-b73f-8fb72a9d8d3a",
"style": {
"background": "#FFF"
},
"transition": {}
}
],
"variables": [],
"width": 8
},
"coreMigrationVersion": "7.15.0",
"id": "workpad-c13808dc-e690-4bab-be06-2073ba071754",
"migrationVersion": {
"canvas-workpad": "7.0.0"
},
"references": [],
"type": "canvas-workpad",
"updated_at": "2020-10-22T23:44:48.392Z",
"version": "WzgsMl0="
}

File diff suppressed because one or more lines are too long