Skip to content

Commit

Permalink
Merge branch 'geo_point_csv_upload' of github.com:nreese/kibana into …
Browse files Browse the repository at this point in the history
…geo_point_csv_upload
  • Loading branch information
nreese committed Sep 18, 2020
2 parents f40f4c1 + 98723df commit 335122e
Show file tree
Hide file tree
Showing 94 changed files with 1,618 additions and 900 deletions.
12 changes: 6 additions & 6 deletions .ci/Jenkinsfile_baseline_capture
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ kibanaPipeline(timeoutMinutes: 120) {
'CI_PARALLEL_PROCESS_NUMBER=1'
]) {
parallel([
'oss-visualRegression': {
workers.ci(name: 'oss-visualRegression', size: 's-highmem', ramDisk: true) {
kibanaPipeline.functionalTestProcess('oss-visualRegression', './test/scripts/jenkins_visual_regression.sh')()
'oss-baseline': {
workers.ci(name: 'oss-baseline', size: 's-highmem', ramDisk: true, runErrorReporter: false) {
kibanaPipeline.functionalTestProcess('oss-baseline', './test/scripts/jenkins_baseline.sh')()
}
},
'xpack-visualRegression': {
workers.ci(name: 'xpack-visualRegression', size: 's-highmem', ramDisk: true) {
kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')()
'xpack-baseline': {
workers.ci(name: 'xpack-baseline', size: 's-highmem', ramDisk: true, runErrorReporter: false) {
kibanaPipeline.functionalTestProcess('xpack-baseline', './test/scripts/jenkins_xpack_baseline.sh')()
}
},
])
Expand Down
54 changes: 26 additions & 28 deletions docs/settings/reporting-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,14 @@ security is enabled, `xpack.security.encryptionKey`.
[cols="2*<"]
|===
| `xpack.reporting.queue.pollInterval`
| Specifies the number of milliseconds that the reporting poller waits between polling the
index for any pending Reporting jobs. Defaults to `3000` (3 seconds).
| Specify the {ref}/common-options.html#time-units[time] that the reporting poller waits between polling the index for any
pending Reporting jobs. Can be specified as number of milliseconds. Defaults to `3s`.

| [[xpack-reporting-q-timeout]] `xpack.reporting.queue.timeout` {ess-icon}
| How long each worker has to produce a report. If your machine is slow or under
heavy load, you might need to increase this timeout. Specified in milliseconds.
If a Reporting job execution time goes over this time limit, the job will be
marked as a failure and there will not be a download available.
Defaults to `120000` (two minutes).
| {ref}/common-options.html#time-units[How long] each worker has to produce a report. If your machine is slow or under heavy
load, you might need to increase this timeout. If a Reporting job execution goes over this time limit, the job is marked as a
failure and no download will be available. Can be specified as number of milliseconds.
Defaults to `2m`.

|===

Expand All @@ -127,24 +126,24 @@ control the capturing process.
|===
a| `xpack.reporting.capture.timeouts`
`.openUrl` {ess-icon}
| Specify how long to allow the Reporting browser to wait for the "Loading..." screen
to dismiss and find the initial data for the Kibana page. If the time is
exceeded, a page screenshot is captured showing the current state, and the download link shows a warning message.
Defaults to `60000` (1 minute).
| Specify the {ref}/common-options.html#time-units[time] to allow the Reporting browser to wait for the "Loading..." screen
to dismiss and find the initial data for the page. If the time is exceeded, a screenshot is captured showing the current
page, and the download link shows a warning message. Can be specified as number of milliseconds.
Defaults to `1m`.

a| `xpack.reporting.capture.timeouts`
`.waitForElements` {ess-icon}
| Specify how long to allow the Reporting browser to wait for all visualization
panels to load on the Kibana page. If the time is exceeded, a page screenshot
is captured showing the current state, and the download link shows a warning message. Defaults to `30000` (30
seconds).
| Specify the {ref}/common-options.html#time-units[time] to allow the Reporting browser to wait for all visualization panels
to load on the page. If the time is exceeded, a screenshot is captured showing the current page, and the download link shows
a warning message. Can be specified as number of milliseconds.
Defaults to `30s`.

a| `xpack.reporting.capture.timeouts`
`.renderComplete` {ess-icon}
| Specify how long to allow the Reporting browser to wait for all visualizations to
fetch and render the data. If the time is exceeded, a
page screenshot is captured showing the current state, and the download link shows a warning message. Defaults to
`30000` (30 seconds).
| Specify the {ref}/common-options.html#time-units[time] to allow the Reporting browser to wait for all visualizations to
fetch and render the data. If the time is exceeded, a screenshot is captured showing the current page, and the download link shows a
warning message. Can be specified as number of milliseconds.
Defaults to `30s`.

|===

Expand All @@ -163,11 +162,10 @@ available, but there will likely be errors in the visualizations in the report.
job, as many times as this setting. Defaults to `3`.

| `xpack.reporting.capture.loadDelay`
| When visualizations are not evented, this is the amount of time before
taking a screenshot. All visualizations that ship with {kib} are evented, so this
setting should not have much effect. If you are seeing empty images instead of
visualizations, try increasing this value.
Defaults to `3000` (3 seconds).
| Specify the {ref}/common-options.html#time-units[amount of time] before taking a screenshot when visualizations are not evented.
All visualizations that ship with {kib} are evented, so this setting should not have much effect. If you are seeing empty images
instead of visualizations, try increasing this value.
Defaults to `3s`.

| [[xpack-reporting-browser]] `xpack.reporting.capture.browser.type` {ess-icon}
| Specifies the browser to use to capture screenshots. This setting exists for
Expand Down Expand Up @@ -213,17 +211,17 @@ a| `xpack.reporting.capture.browser`
[cols="2*<"]
|===
| [[xpack-reporting-csv]] `xpack.reporting.csv.maxSizeBytes` {ess-icon}
| The maximum size of a CSV file before being truncated. This setting exists to prevent
large exports from causing performance and storage issues.
Defaults to `10485760` (10mB).
| The maximum {ref}/common-options.html#byte-units[byte size] of a CSV file before being truncated. This setting exists to
prevent large exports from causing performance and storage issues. Can be specified as number of bytes.
Defaults to `10mb`.

| `xpack.reporting.csv.scroll.size`
| Number of documents retrieved from {es} for each scroll iteration during a CSV
export.
Defaults to `500`.

| `xpack.reporting.csv.scroll.duration`
| Amount of time allowed before {kib} cleans the scroll context during a CSV export.
| Amount of {ref}/common-options.html#time-units[time] allowed before {kib} cleans the scroll context during a CSV export.
Defaults to `30s`.

| `xpack.reporting.csv.checkForFormulas`
Expand Down
2 changes: 1 addition & 1 deletion docs/user/alerting/action-types/server-log.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[[server-log-action-type]]
=== Server log action

This action type writes and entry to the {kib} server log.
This action type writes an entry to the {kib} server log.

[float]
[[server-log-connector-configuration]]
Expand Down
2 changes: 1 addition & 1 deletion src/dev/build/tasks/os_packages/docker_generator/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function runDockerGenerator(
ubi: boolean = false
) {
// UBI var config
const baseOSImage = ubi ? 'registry.access.redhat.com/ubi8/ubi-minimal:latest' : 'centos:8';
const baseOSImage = ubi ? 'docker.elastic.co/ubi8/ubi-minimal:latest' : 'centos:8';
const ubiVersionTag = 'ubi8';
const ubiImageFlavor = ubi ? `-${ubiVersionTag}` : '';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,3 @@ linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
installDir="$PARENT_DIR/install/kibana"
mkdir -p "$installDir"
tar -xzf "$linuxBuild" -C "$installDir" --strip=1

echo " -> running visual regression tests from kibana directory"
yarn percy exec -t 10000 -- -- \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$installDir" \
--config test/visual_regression/config.ts;
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,5 @@ tar -xzf "$linuxBuild" -C "$installDir" --strip=1
mkdir -p "$WORKSPACE/kibana-build-xpack"
cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/

# cd "$KIBANA_DIR"
# source "test/scripts/jenkins_xpack_page_load_metrics.sh"

cd "$KIBANA_DIR"
source "test/scripts/jenkins_xpack_saved_objects_field_metrics.sh"

echo " -> running visual regression tests from x-pack directory"
cd "$XPACK_DIR"
yarn percy exec -t 10000 -- -- \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$installDir" \
--config test/visual_regression/config.ts;
8 changes: 5 additions & 3 deletions vars/kibanaPipeline.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def withPostBuildReporting(Closure closure) {
def withPostBuildReporting(Map params, Closure closure) {
try {
closure()
} finally {
Expand All @@ -9,8 +9,10 @@ def withPostBuildReporting(Closure closure) {
print ex
}

catchErrors {
runErrorReporter([pwd()] + parallelWorkspaces)
if (params.runErrorReporter) {
catchErrors {
runErrorReporter([pwd()] + parallelWorkspaces)
}
}

catchErrors {
Expand Down
4 changes: 2 additions & 2 deletions vars/workers.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ def base(Map params, Closure closure) {

// Worker for ci processes. Extends the base worker and adds GCS artifact upload, error reporting, junit processing
def ci(Map params, Closure closure) {
def config = [ramDisk: true, bootstrapped: true] + params
def config = [ramDisk: true, bootstrapped: true, runErrorReporter: true] + params

return base(config) {
kibanaPipeline.withGcsArtifactUpload(config.name) {
kibanaPipeline.withPostBuildReporting {
kibanaPipeline.withPostBuildReporting(config) {
closure()
}
}
Expand Down
86 changes: 31 additions & 55 deletions x-pack/plugins/apm/common/alert_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,82 +7,58 @@
import { i18n } from '@kbn/i18n';

export enum AlertType {
ErrorRate = 'apm.error_rate',
ErrorCount = 'apm.error_rate', // ErrorRate was renamed to ErrorCount but the key is kept as `error_rate` for backwards-compat.
TransactionErrorRate = 'apm.transaction_error_rate',
TransactionDuration = 'apm.transaction_duration',
TransactionDurationAnomaly = 'apm.transaction_duration_anomaly',
}

const THRESHOLD_MET_GROUP = {
id: 'threshold_met',
name: i18n.translate('xpack.apm.a.thresholdMet', {
defaultMessage: 'Threshold met',
}),
};

export const ALERT_TYPES_CONFIG = {
[AlertType.ErrorRate]: {
name: i18n.translate('xpack.apm.errorRateAlert.name', {
defaultMessage: 'Error rate',
[AlertType.ErrorCount]: {
name: i18n.translate('xpack.apm.errorCountAlert.name', {
defaultMessage: 'Error count threshold',
}),
actionGroups: [
{
id: 'threshold_met',
name: i18n.translate('xpack.apm.errorRateAlert.thresholdMet', {
defaultMessage: 'Threshold met',
}),
},
],
actionGroups: [THRESHOLD_MET_GROUP],
defaultActionGroupId: 'threshold_met',
producer: 'apm',
},
[AlertType.TransactionDuration]: {
name: i18n.translate('xpack.apm.transactionDurationAlert.name', {
defaultMessage: 'Transaction duration',
defaultMessage: 'Transaction duration threshold',
}),
actionGroups: [
{
id: 'threshold_met',
name: i18n.translate(
'xpack.apm.transactionDurationAlert.thresholdMet',
{
defaultMessage: 'Threshold met',
}
),
},
],
actionGroups: [THRESHOLD_MET_GROUP],
defaultActionGroupId: 'threshold_met',
producer: 'apm',
},
[AlertType.TransactionDurationAnomaly]: {
name: i18n.translate('xpack.apm.transactionDurationAnomalyAlert.name', {
defaultMessage: 'Transaction duration anomaly',
}),
actionGroups: [
{
id: 'threshold_met',
name: i18n.translate(
'xpack.apm.transactionDurationAlert.thresholdMet',
{
defaultMessage: 'Threshold met',
}
),
},
],
actionGroups: [THRESHOLD_MET_GROUP],
defaultActionGroupId: 'threshold_met',
producer: 'apm',
},
[AlertType.TransactionErrorRate]: {
name: i18n.translate('xpack.apm.transactionErrorRateAlert.name', {
defaultMessage: 'Transaction error rate threshold',
}),
actionGroups: [THRESHOLD_MET_GROUP],
defaultActionGroupId: 'threshold_met',
producer: 'apm',
},
};

export const TRANSACTION_ALERT_AGGREGATION_TYPES = {
avg: i18n.translate(
'xpack.apm.transactionDurationAlert.aggregationType.avg',
{
defaultMessage: 'Average',
}
),
'95th': i18n.translate(
'xpack.apm.transactionDurationAlert.aggregationType.95th',
{
defaultMessage: '95th percentile',
}
),
'99th': i18n.translate(
'xpack.apm.transactionDurationAlert.aggregationType.99th',
{
defaultMessage: '99th percentile',
}
),
};
// Server side registrations
// x-pack/plugins/apm/server/lib/alerts/<alert>.ts
// x-pack/plugins/apm/server/lib/alerts/register_apm_alerts.ts

// Client side registrations:
// x-pack/plugins/apm/public/components/alerting/<alert>/index.tsx
// x-pack/plugins/apm/public/components/alerting/register_apm_alerts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

import { storiesOf } from '@storybook/react';
import React from 'react';
import { ErrorRateAlertTrigger } from '.';
import { ErrorCountAlertTrigger } from '.';
import { ApmPluginContextValue } from '../../../context/ApmPluginContext';
import {
mockApmPluginContextValue,
MockApmPluginContextWrapper,
} from '../../../context/ApmPluginContext/MockApmPluginContext';

storiesOf('app/ErrorRateAlertTrigger', module).add(
storiesOf('app/ErrorCountAlertTrigger', module).add(
'example',
() => {
const params = {
Expand All @@ -26,7 +26,7 @@ storiesOf('app/ErrorRateAlertTrigger', module).add(
value={(mockApmPluginContextValue as unknown) as ApmPluginContextValue}
>
<div style={{ width: 400 }}>
<ErrorRateAlertTrigger
<ErrorCountAlertTrigger
alertParams={params as any}
setAlertParams={() => undefined}
setAlertProperty={() => undefined}
Expand All @@ -37,7 +37,7 @@ storiesOf('app/ErrorRateAlertTrigger', module).add(
},
{
info: {
propTablesExclude: [ErrorRateAlertTrigger, MockApmPluginContextWrapper],
propTablesExclude: [ErrorCountAlertTrigger, MockApmPluginContextWrapper],
source: false,
},
}
Expand Down
Loading

0 comments on commit 335122e

Please sign in to comment.