Skip to content

Commit

Permalink
Merge branch 'master' into alerting/management-feature-privileges
Browse files Browse the repository at this point in the history
* master:
  [Maps] 7.9 documenation updates (elastic#71893)
  docs: ✏️ add "Explore underlying data" user docs (elastic#70807)
  [Security Solution][Exceptions] - Remove initial add exception item button in builder (elastic#72215)
  Fix indentation level in code exploration doc (elastic#72274)
  register graph usage (elastic#72041)
  [Monitoring] Added a case for Alerting if security/ssl is disabled (elastic#71846)
  • Loading branch information
gmmorris committed Jul 17, 2020
2 parents efbc59a + 679209b commit e284ccf
Show file tree
Hide file tree
Showing 30 changed files with 799 additions and 339 deletions.
8 changes: 4 additions & 4 deletions docs/developer/architecture/code-exploration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NOTE:
////
[[code-exploration]]
=== Exploring Kibana code
== Exploring Kibana code
The goals of our folder heirarchy are:
Expand All @@ -28,10 +28,10 @@ To that aim, we strive to:
[discrete]
[[kibana-services-applications]]
==== Services and Applications
=== Services and Applications
[discrete]
===== src/plugins
==== src/plugins
- {kib-repo}blob/{branch}/src/plugins/advanced_settings[advancedSettings]
Expand Down Expand Up @@ -283,7 +283,7 @@ WARNING: Missing README.
[discrete]
===== x-pack/plugins
==== x-pack/plugins
- {kib-repo}blob/{branch}/x-pack/plugins/actions/README.md[actions]
Expand Down
41 changes: 41 additions & 0 deletions docs/drilldowns/explore-underlying-data.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[[explore-underlying-data]]
== Explore the underlying data for a visualization

++++
<titleabbrev>Explore the underlying data</titleabbrev>
++++

Dashboard panels have an *Explore underlying data* action that navigates you to *Discover*,
where you can narrow your documents to the ones you'll most likely use in a visualization.
This action is available for visualizations backed by a single index pattern.

You can access *Explore underlying data* in two ways: from the panel context
menu or from the menu that appears when you interact with the chart.

[float]
[[explore-data-from-panel-context-menu]]
=== Explore data from panel context menu

The *Explore underlying data* action in the panel menu navigates you to Discover,
carrying over the index pattern, filters, query, and time range for the visualization.

[role="screenshot"]
image::images/explore_data_context_menu.png[Explore underlying data from panel context menu]

[float]
[[explore-data-from-chart]]
=== Explore data from chart action

Initiating *Explore underlying data* from the chart also navigates to Discover,
carrying over the current context for the visualization. In addition, this action
applies the filters and time range created by the events that triggered the action.

[role="screenshot"]
image::images/explore_data_in_chart.png[Explore underlying data from chart]

You can disable this action by adding the following line to your `kibana.yml` config.

["source","yml"]
-----------
xpack.discoverEnhanced.actions.exploreDataInChart.enabled: false
-----------
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/drilldowns/images/explore_data_in_chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/maps/heatmap-layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Heat map layers cluster point data to show locations with higher densities.
[role="screenshot"]
image::maps/images/heatmap_layer.png[]

To add a heat map layer to your map, click *Add layer*, then select the *Heat map* layer.
The index must contain at least one field mapped as {ref}/geo-point.html[geo_point].
To add a heat map layer to your map, click *Add layer*, then select *Heat map*.
The index must contain at least one field mapped as {ref}/geo-point.html[geo_point] or {ref}/geo-shape.html[geo_shape].

NOTE: Only count, sum, unique count metric aggregations are available with the grid aggregation source and heat map layers.
Average, min, and max are turned off because the heat map will blend nearby values.
Expand Down
4 changes: 2 additions & 2 deletions docs/maps/maps-aggregations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Grid aggregation layers use {ref}/search-aggregations-bucket-geotilegrid-aggrega
Symbolize grid aggregation metrics as:

*Clusters*:: Creates a <<vector-layer, vector layer>> with a cluster symbol for each gridded cell.
The cluster location is the weighted centroid for all geo-points in the gridded cell.
The cluster location is the weighted centroid for all documents in the gridded cell.

*Grid rectangles*:: Creates a <<vector-layer, vector layer>> with a bounding box polygon for each gridded cell.

Expand All @@ -60,7 +60,7 @@ To enable a grid aggregation layer:
To enable a blended layer that dynamically shows clusters or documents:

. Click *Add layer*, then select the *Documents* layer.
. Configure *Index pattern* and the *Geospatial field*. To enable clustering, the *Geospatial field* must be set to a field mapped as {ref}/geo-point.html[geo_point].
. Configure *Index pattern* and the *Geospatial field*.
. In *Scaling*, select *Show clusters when results exceed 10000*.


Expand Down
35 changes: 6 additions & 29 deletions docs/maps/maps-getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,40 +68,17 @@ The first layer you'll add is a choropleth layer to shade world countries
by web log traffic. Darker shades symbolize countries with more web log traffic,
and lighter shades symbolize countries with less traffic.

==== Add a vector layer to display world country boundaries

. Click *Add layer*.
. Select the *EMS Boundaries* layer.
. Select *Choropleth*.
. From the *Layer* dropdown menu, select *World Countries*.
. Under *Statistics source*, set *Index pattern* to *kibana_sample_data_logs*.
. Set *Join field* to *geo.src*.
. Click the *Add layer* button.
. Set *Name* to `Total Requests by Country`.
. Set *Opacity* to 50%.
. Click *Add* under *Tooltip fields*.
. In the popover, select *ISO 3166-1 alpha-2 code* and *name* and click *Add*.

===== Join the vector layer with the sample web log index

You now have a vector layer containing the world countries.
To symbolize countries by web traffic, you'll need to augment the world country features with the count of Elasticsearch weblog documents originating from each country.
To do this, you'll create a <<terms-join, term join>> to link the vector source *World Countries* to
the {es} index `kibana_sample_data_logs` on the shared key iso2 = geo.src.

. Click plus image:maps/images/gs_plus_icon.png[] next to the *Term Joins* label.
. Click *Join --select--*
. Set *Left field* to *ISO 3166-1 alpha-2 code*.
. Set *Right source* to *kibana_sample_data_logs*.
. Set *Right field* to *geo.src*.
. Click *and use metric count*.
. Set *Custom label* to *web logs count*.

===== Set the layer style

All of the world countries are still a single color because the layer is using <<maps-vector-style-static, static styling>>.
To shade the world countries based on which country is sending the most requests, you'll need to use <<maps-vector-style-data-driven, data driven styling>>.

. Under *Fill color*, change the selected value from *Solid* to *By value*.
. In the field select input, select *web logs count*.
. Select the grey color ramp.
. Under *Fill color*, select the grey color ramp.
. Under *Border color*, change the selected color to *white*.
. Click *Save & close*.
+
Expand All @@ -127,7 +104,7 @@ This layer displays web log documents as points.
The layer is only visible when users zoom in the map past zoom level 9.

. Click *Add layer*.
. Click the *Documents* layer.
. Select *Documents*.
. Set *Index pattern* to *kibana_sample_data_logs*.
. Click the *Add layer* button.
. Set *Name* to `Actual Requests`.
Expand Down Expand Up @@ -161,7 +138,7 @@ image::maps/images/grid_metrics_both.png[]
===== Add the layer

. Click *Add layer*.
. Click the *Clusters and grids* layer.
. Select *Clusters and grids*.
. Set *Index pattern* to *kibana_sample_data_logs*.
. Click the *Add layer* button.
. Set *Name* to `Total Requests and Bytes`.
Expand Down
4 changes: 3 additions & 1 deletion docs/maps/tile-layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Tile layers display image tiles served from a tile server.
[role="screenshot"]
image::maps/images/tile_layer.png[]

To add a tile layer to your map, click *Add layer*, then select one of the following layers:
To add a tile layer to your map, click *Add layer*, then select one of the following:

*Configured Tile Map Service*:: Tile map service configured in kibana.yml.
See map.tilemap.url in <<settings>> for details.
Expand All @@ -16,4 +16,6 @@ See map.tilemap.url in <<settings>> for details.

*Tile Map Service*:: Tile map service configured in interface.

*Vector tiles*:: Data service implementing the Mapbox vector tile specification.

*Web Map Service*:: Maps from OGC Standard WMS.
11 changes: 5 additions & 6 deletions docs/maps/vector-layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ Vector layers display points, lines, and polygons.
[role="screenshot"]
image::maps/images/vector_layer.png[]

To add a vector layer to your map, click *Add layer*, then select one of the following layers:
To add a vector layer to your map, click *Add layer*, then select one of the following:

*Clusters and grids*:: Geospatial data grouped in grids with metrics for each gridded cell.
The index must contain at least one field mapped as {ref}/geo-point.html[geo_point].
*Choropleth*:: Shaded areas to compare statistics across boundaries.

*Configured GeoJSON*:: Vector data from hosted GeoJSON configured in kibana.yml.
See map.regionmap.* in <<settings>> for details.
*Clusters and grids*:: Geospatial data grouped in grids with metrics for each gridded cell.
The index must contain at least one field mapped as {ref}/geo-point.html[geo_point] or {ref}/geo-shape.html[geo_shape].

*Documents*:: Vector data from a Kibana index pattern.
*Documents*:: Points, lines, and polyons from Elasticsearch.
The index must contain at least one field mapped as {ref}/geo-point.html[geo_point] or {ref}/geo-shape.html[geo_shape].

NOTE: Document results are limited to the `index.max_result_window` index setting, which defaults to 10000.
Expand Down
1 change: 1 addition & 0 deletions docs/user/dashboard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ When you're finished adding and arranging the panels, save the dashboard.
. Enter the dashboard *Title* and optional *Description*, then *Save* the dashboard.

include::{kib-repo-dir}/drilldowns/drilldowns.asciidoc[]
include::{kib-repo-dir}/drilldowns/explore-underlying-data.asciidoc[]

[[sharing-dashboards]]
== Share the dashboard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ NOTE:
////
[[code-exploration]]
=== Exploring Kibana code
== Exploring Kibana code
The goals of our folder heirarchy are:
Expand All @@ -71,14 +71,14 @@ To that aim, we strive to:
[discrete]
[[kibana-services-applications]]
==== Services and Applications
=== Services and Applications
[discrete]
===== src/plugins
==== src/plugins
${Array.from(printPlugins(ossPlugins)).join('\n')}
[discrete]
===== x-pack/plugins
==== x-pack/plugins
${Array.from(printPlugins(xpackPlugins)).join('\n')}
`;
}
13 changes: 13 additions & 0 deletions x-pack/plugins/graph/server/lib/license_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
import Boom from 'boom';
import { map } from 'rxjs/operators';
import { Observable, Subscription } from 'rxjs';
import { LicensingPluginStart } from '../../../licensing/server';
import { ILicense } from '../../../licensing/common/types';
import { checkLicense, GraphLicenseInformation } from '../../common/check_license';

export class LicenseState {
private licenseInformation: GraphLicenseInformation = checkLicense(undefined);
private subscription: Subscription | null = null;
private observable: Observable<GraphLicenseInformation> | null = null;
private _notifyUsage: LicensingPluginStart['featureUsage']['notifyUsage'] | null = null;

private updateInformation(licenseInformation: GraphLicenseInformation) {
this.licenseInformation = licenseInformation;
Expand All @@ -24,6 +26,17 @@ export class LicenseState {
this.subscription = this.observable.subscribe(this.updateInformation.bind(this));
}

public setNotifyUsage(notifyUsage: LicensingPluginStart['featureUsage']['notifyUsage']) {
this._notifyUsage = notifyUsage;
}

// 'Graph' is the only allowed feature here at the moment, if this gets extended in the future, add to the union type
public notifyUsage(featureName: 'Graph') {
if (this._notifyUsage) {
this._notifyUsage(featureName);
}
}

public stop() {
if (this.subscription) {
this.subscription.unsubscribe();
Expand Down
10 changes: 7 additions & 3 deletions x-pack/plugins/graph/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

import { i18n } from '@kbn/i18n';
import { Plugin, CoreSetup } from 'src/core/server';
import { LicensingPluginSetup } from '../../licensing/server';
import { Plugin, CoreSetup, CoreStart } from 'src/core/server';
import { LicensingPluginSetup, LicensingPluginStart } from '../../licensing/server';
import { LicenseState } from './lib/license_state';
import { registerSearchRoute } from './routes/search';
import { registerExploreRoute } from './routes/explore';
Expand Down Expand Up @@ -34,6 +34,7 @@ export class GraphPlugin implements Plugin {
licenseState.start(licensing.license$);
this.licenseState = licenseState;
core.savedObjects.registerType(graphWorkspace);
licensing.featureUsage.register('Graph', 'platinum');

if (home) {
registerSampleData(home.sampleData, licenseState);
Expand Down Expand Up @@ -79,7 +80,10 @@ export class GraphPlugin implements Plugin {
registerExploreRoute({ licenseState, router });
}

public start() {}
public start(core: CoreStart, { licensing }: { licensing: LicensingPluginStart }) {
this.licenseState!.setNotifyUsage(licensing.featureUsage.notifyUsage);
}

public stop() {
if (this.licenseState) {
this.licenseState.stop();
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/graph/server/routes/explore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export function registerExploreRoute({
response
) => {
verifyApiAccess(licenseState);
licenseState.notifyUsage('Graph');
try {
return response.ok({
body: {
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/graph/server/routes/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export function registerSearchRoute({
response
) => {
verifyApiAccess(licenseState);
licenseState.notifyUsage('Graph');
const includeFrozen = await uiSettings.get<boolean>(UI_SETTINGS.SEARCH_INCLUDE_FROZEN);
try {
return response.ok({
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/monitoring/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"kibanaLegacy",
"triggers_actions_ui",
"alerts",
"actions"
"actions",
"encryptedSavedObjects"
],
"optionalPlugins": ["infra", "telemetryCollectionManager", "usageCollection", "home", "cloud"],
"server": true,
Expand Down
Loading

0 comments on commit e284ccf

Please sign in to comment.