Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix/query_suggestions
Browse files Browse the repository at this point in the history
kibanamachine authored Oct 22, 2020
2 parents 9ad9334 + 62f34f2 commit 51f5bd6
Showing 177 changed files with 5,578 additions and 1,811 deletions.
2 changes: 1 addition & 1 deletion docs/discover/kuery.asciidoc
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ KQL supports `>`, `>=`, `<`, and `<=`. For example:

[source,yaml]
-------------------
account_number:>=100 and items_sold:<=200
account_number >= 100 and items_sold <= 200
-------------------

[discrete]
3 changes: 3 additions & 0 deletions docs/settings/monitoring-settings.asciidoc
Original file line number Diff line number Diff line change
@@ -76,6 +76,9 @@ a|`monitoring.cluster_alerts.`
health checks. By default, it matches the <<elasticsearch-pingTimeout, `elasticsearch.pingTimeout`>> setting,
which has a default value of `30000`.

| `monitoring.ui.elasticsearch.ssl`
| Shares the same configuration as <<elasticsearch-ssl-cert-key, `elasticsearch.ssl`>>. These settings configure encrypted communication between {kib} and the monitoring cluster.

|===

[float]
5 changes: 2 additions & 3 deletions docs/user/dashboard/dashboard-drilldown.asciidoc
Original file line number Diff line number Diff line change
@@ -57,8 +57,8 @@ TIP: If you don’t see data for a panel, try changing the time range.
. Set a search and filter.
+
[%hardbreaks]
Search: `extension.keyword:( “gz” or css or deb)`
Filter: `geo.src : CN`
Search: `extension.keyword: ("gz" or "css" or "deb")`
Filter: `geo.src: CN`


*Create the drilldown*
@@ -94,4 +94,3 @@ image::images/drilldown_on_panel.png[Drilldown on pie chart that navigates to an
+
You are navigated to your destination dashboard. Verify that the search query, filters,
and time range are carried over.

27 changes: 27 additions & 0 deletions docs/user/monitoring/kibana-alerts.asciidoc
Original file line number Diff line number Diff line change
@@ -31,6 +31,33 @@ default, the trigger condition is set at 85% or more averaged over the last 5
minutes. The alert is grouped across all the nodes of the cluster by running
checks on a schedule time of 1 minute with a re-notify internal of 1 day.

[discrete]
[[kibana-alerts-disk-usage-threshold]]
== Disk usage threshold

This alert is triggered when a node is nearly at disk capacity. By
default, the trigger condition is set at 80% or more averaged over the last 5
minutes. The alert is grouped across all the nodes of the cluster by running
checks on a schedule time of 1 minute with a re-notify internal of 1 day.

[discrete]
[[kibana-alerts-jvm-memory-threshold]]
== JVM memory threshold

This alert is triggered when a node runs a consistently high JVM memory usage. By
default, the trigger condition is set at 85% or more averaged over the last 5
minutes. The alert is grouped across all the nodes of the cluster by running
checks on a schedule time of 1 minute with a re-notify internal of 1 day.

[discrete]
[[kibana-alerts-missing-monitoring-data]]
== Missing monitoring data

This alert is triggered when any stack products nodes or instances stop sending
monitoring data. By default, the trigger condition is set to missing for 15 minutes
looking back 1 day. The alert is grouped across all the nodes of the cluster by running
checks on a schedule time of 1 minute with a re-notify internal of 6 hours.

NOTE: Some action types are subscription features, while others are free.
For a comparison of the Elastic subscription levels, see the alerting section of
the {subscriptions}[Subscriptions page].
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -116,26 +116,27 @@
},
"dependencies": {
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "7.9.1",
"@elastic/elasticsearch": "7.10.0-rc.1",
"@elastic/eui": "29.5.0",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "^2.5.0",
"@elastic/request-crypto": "1.1.4",
"@elastic/safer-lodash-set": "0.0.0",
"@hapi/good-squeeze": "5.2.1",
"@hapi/wreck": "^15.0.2",
"@kbn/ace": "1.0.0",
"@kbn/analytics": "1.0.0",
"@kbn/apm-config-loader": "1.0.0",
"@kbn/config": "1.0.0",
"@kbn/config-schema": "1.0.0",
"@kbn/i18n": "1.0.0",
"@kbn/interpreter": "1.0.0",
"@kbn/logging": "1.0.0",
"@kbn/monaco": "1.0.0",
"@kbn/std": "1.0.0",
"@kbn/ui-framework": "1.0.0",
"@kbn/ace": "1.0.0",
"@kbn/monaco": "1.0.0",
"@kbn/ui-shared-deps": "1.0.0",
"@types/pdfmake": "^0.1.15",
"@types/yauzl": "^2.9.1",
"JSONStream": "1.3.5",
"abortcontroller-polyfill": "^1.4.0",
2 changes: 1 addition & 1 deletion packages/kbn-es/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
"kbn:watch": "node scripts/build --watch"
},
"dependencies": {
"@elastic/elasticsearch": "7.9.1",
"@elastic/elasticsearch": "7.10.0-rc.1",
"@kbn/dev-utils": "1.0.0",
"abort-controller": "^3.0.0",
"chalk": "^4.1.0",
3 changes: 3 additions & 0 deletions packages/kbn-plugin-helpers/package.json
Original file line number Diff line number Diff line change
@@ -4,6 +4,9 @@
"private": true,
"description": "Just some helpers for kibana plugin devs.",
"license": "Apache-2.0",
"kibana": {
"devOnly": true
},
"main": "target/index.js",
"bin": {
"plugin-helpers": "bin/plugin-helpers.js"
3 changes: 3 additions & 0 deletions packages/kbn-spec-to-console/package.json
Original file line number Diff line number Diff line change
@@ -12,6 +12,9 @@
},
"author": "",
"license": "Apache-2.0",
"kibana": {
"devOnly": true
},
"bugs": {
"url": "https://github.com/jbudz/spec-to-console/issues"
},
7 changes: 1 addition & 6 deletions packages/kbn-storybook/lib/default_config.ts
Original file line number Diff line number Diff line change
@@ -20,12 +20,7 @@
import { StorybookConfig } from '@storybook/core/types';

export const defaultConfig: StorybookConfig = {
addons: [
'@kbn/storybook/preset',
'@storybook/addon-a11y',
'@storybook/addon-knobs',
'@storybook/addon-essentials',
],
addons: ['@kbn/storybook/preset', '@storybook/addon-a11y', '@storybook/addon-essentials'],
stories: ['../**/*.stories.tsx'],
typescript: {
reactDocgen: false,
Original file line number Diff line number Diff line change
@@ -24,13 +24,13 @@ import { readFileSync } from 'fs';
import del from 'del';
import execa from 'execa';
import xml2js from 'xml2js';
import { makeJunitReportPath } from '@kbn/test';
import { getUniqueJunitReportPath } from '@kbn/test';
import { REPO_ROOT } from '@kbn/utils';

const MINUTE = 1000 * 60;
const FIXTURE_DIR = resolve(__dirname, '__fixtures__');
const TARGET_DIR = resolve(FIXTURE_DIR, 'target');
const XML_PATH = makeJunitReportPath(FIXTURE_DIR, 'JUnit Reporter Integration Test');
const XML_PATH = getUniqueJunitReportPath(FIXTURE_DIR, 'JUnit Reporter Integration Test');

afterAll(async () => {
await del(TARGET_DIR);
4 changes: 2 additions & 2 deletions packages/kbn-test/src/jest/junit_reporter.ts
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ import type { Config } from '@jest/types';
import { AggregatedResult, Test, BaseReporter } from '@jest/reporters';

import { escapeCdata } from '../mocha/xml';
import { makeJunitReportPath } from './report_path';
import { getUniqueJunitReportPath } from './report_path';

interface ReporterOptions {
reportName?: string;
@@ -115,7 +115,7 @@ export default class JestJUnitReporter extends BaseReporter {
});
});

const reportPath = makeJunitReportPath(rootDirectory, reportName);
const reportPath = getUniqueJunitReportPath(rootDirectory, reportName);
const reportXML = root.end();
mkdirSync(dirname(reportPath), { recursive: true });
writeFileSync(reportPath, reportXML, 'utf8');
18 changes: 14 additions & 4 deletions packages/kbn-test/src/jest/report_path.ts
Original file line number Diff line number Diff line change
@@ -17,14 +17,24 @@
* under the License.
*/

import { resolve } from 'path';
import Fs from 'fs';
import Path from 'path';

import { CI_PARALLEL_PROCESS_PREFIX } from '../ci_parallel_process_prefix';

export function makeJunitReportPath(rootDirectory: string, reportName: string) {
return resolve(
export function getUniqueJunitReportPath(
rootDirectory: string,
reportName: string,
counter?: number
): string {
const path = Path.resolve(
rootDirectory,
'target/junit',
process.env.JOB || '.',
`TEST-${CI_PARALLEL_PROCESS_PREFIX}${reportName}.xml`
`TEST-${CI_PARALLEL_PROCESS_PREFIX}${reportName}${counter ? `-${counter}` : ''}.xml`
);

return Fs.existsSync(path)
? getUniqueJunitReportPath(rootDirectory, reportName, (counter ?? 0) + 1)
: path;
}
Original file line number Diff line number Diff line change
@@ -25,13 +25,14 @@ import { parseString } from 'xml2js';
import del from 'del';
import Mocha from 'mocha';
import expect from '@kbn/expect';
import { makeJunitReportPath } from '@kbn/test';
import { getUniqueJunitReportPath } from '@kbn/test';

import { setupJUnitReportGeneration } from '../junit_report_generation';

const PROJECT_DIR = resolve(__dirname, 'fixtures/project');
const DURATION_REGEX = /^\d+\.\d{3}$/;
const ISO_DATE_SEC_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/;
const XML_PATH = getUniqueJunitReportPath(PROJECT_DIR, 'test');

describe('dev/mocha/junit report generation', () => {
afterEach(() => {
@@ -50,9 +51,7 @@ describe('dev/mocha/junit report generation', () => {

mocha.addFile(resolve(PROJECT_DIR, 'test.js'));
await new Promise((resolve) => mocha.run(resolve));
const report = await fcb((cb) =>
parseString(readFileSync(makeJunitReportPath(PROJECT_DIR, 'test')), cb)
);
const report = await fcb((cb) => parseString(readFileSync(XML_PATH), cb));

// test case results are wrapped in <testsuites></testsuites>
expect(report).to.eql({
4 changes: 2 additions & 2 deletions packages/kbn-test/src/mocha/junit_report_generation.js
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ import { writeFileSync, mkdirSync } from 'fs';
import { inspect } from 'util';

import xmlBuilder from 'xmlbuilder';
import { makeJunitReportPath } from '@kbn/test';
import { getUniqueJunitReportPath } from '@kbn/test';

import { getSnapshotOfRunnableLogs } from './log_cache';
import { escapeCdata } from '../';
@@ -140,7 +140,7 @@ export function setupJUnitReportGeneration(runner, options = {}) {
}
});

const reportPath = makeJunitReportPath(rootDirectory, reportName);
const reportPath = getUniqueJunitReportPath(rootDirectory, reportName);
const reportXML = builder.end();
mkdirSync(dirname(reportPath), { recursive: true });
writeFileSync(reportPath, reportXML, 'utf8');
Original file line number Diff line number Diff line change
@@ -53,9 +53,15 @@ RUN for iter in {1..10}; do \
(exit $exit_code)

# Add an init process, check the checksum to make sure it's a match
RUN curl -L -o /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
RUN echo "37f2c1f0372a45554f1b89924fbb134fc24c3756efaedf11e07f599494e0eff9 /usr/local/bin/dumb-init" | sha256sum -c -
RUN chmod +x /usr/local/bin/dumb-init
RUN set -e ; \
TINI_VERSION='v0.19.0' ; \
TINI_BIN='tini-amd64' ; \
curl --retry 8 -S -L -O "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/${TINI_BIN}" ; \
curl --retry 8 -S -L -O "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/${TINI_BIN}.sha256sum" ; \
sha256sum -c "${TINI_BIN}.sha256sum" ; \
rm "${TINI_BIN}.sha256sum" ; \
mv "${TINI_BIN}" /bin/tini ; \
chmod +x /bin/tini

RUN mkdir /usr/share/fonts/local
RUN curl -L -o /usr/share/fonts/local/NotoSansCJK-Regular.ttc https://github.com/googlefonts/noto-cjk/raw/NotoSansV2.001/NotoSansCJK-Regular.ttc
@@ -125,6 +131,6 @@ RUN mkdir /licenses && \

USER kibana

ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
ENTRYPOINT ["/bin/tini", "--"]

CMD ["/usr/local/bin/kibana-docker"]
Original file line number Diff line number Diff line change
@@ -44,7 +44,6 @@ function create(id: string) {

return new IndexPattern({
spec: { id, type, version, timeFieldName, fields, title },
savedObjectsClient: {} as any,
fieldFormats: fieldFormatsMock,
shortDotsEnable: false,
metaFields: [],
@@ -214,7 +213,6 @@ describe('IndexPattern', () => {
const spec = indexPattern.toSpec();
const restoredPattern = new IndexPattern({
spec,
savedObjectsClient: {} as any,
fieldFormats: fieldFormatsMock,
shortDotsEnable: false,
metaFields: [],
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@
*/

import _, { each, reject } from 'lodash';
import { SavedObjectsClientCommon } from '../..';
import { DuplicateField } from '../../../../kibana_utils/common';

import { ES_FIELD_TYPES, KBN_FIELD_TYPES, IIndexPattern, IFieldType } from '../../../common';
@@ -31,10 +30,9 @@ import { SerializedFieldFormat } from '../../../../expressions/common';

interface IndexPatternDeps {
spec?: IndexPatternSpec;
savedObjectsClient: SavedObjectsClientCommon;
fieldFormats: FieldFormatsStartCommon;
shortDotsEnable: boolean;
metaFields: string[];
shortDotsEnable?: boolean;
metaFields?: string[];
}

interface SavedObjectBody {
Original file line number Diff line number Diff line change
@@ -435,7 +435,6 @@ export class IndexPatternsService {

const indexPattern = new IndexPattern({
spec,
savedObjectsClient: this.savedObjectsClient,
fieldFormats: this.fieldFormats,
shortDotsEnable,
metaFields,
Loading

0 comments on commit 51f5bd6

Please sign in to comment.