[merge] Merge with master.
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
.aws-config.json
|
||||
.signing-config.json
|
||||
.ackrc
|
||||
.DS_Store
|
||||
.node_binaries
|
||||
|
|
|
@ -1 +1 @@
|
|||
4.3.2
|
||||
4.4.4
|
||||
|
|
21
.travis.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
language: node_js
|
||||
node_js: 4
|
||||
env:
|
||||
- CXX=g++-4.8
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
||||
|
||||
install:
|
||||
- npm install
|
||||
- npm run setup_kibana
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
- ../kibana
|
||||
|
||||
script: npm test
|
|
@ -55,7 +55,7 @@ Please make sure you have signed the [Contributor License Agreement](http://www.
|
|||
npm run elasticsearch
|
||||
```
|
||||
|
||||
- Start the development server. _On Windows, you'll need you use Git Bash, Cygwin, or a similar shell that exposes the `sh` command._
|
||||
- Start the development server. _On Windows, you'll need you use Git Bash, Cygwin, or a similar shell that exposes the `sh` command. And to successfully build you'll need Cygwin optional packages zip, tar, and shasum._
|
||||
|
||||
```sh
|
||||
npm start
|
||||
|
@ -209,8 +209,8 @@ Then sit back and wait. There will probably be discussion about the pull request
|
|||
|
||||
After a pull is submitted, it needs to get to review. If you have commit permission on the Kibana repo you will probably perform these steps while submitting your pull request. If not, a member of the elastic organization will do them for you, though you can help by suggesting a reviewer for your changes if you've interacted with someone while working on the issue.
|
||||
|
||||
1. Assign the `review` tag. This signals to the team that someone needs to give this attention.
|
||||
1. Assign version tags. If the pull is related to an existing issue (and it should be!), that issue probably has a version tag (eg `4.0.1`) on it. Assign the same version tag to your pull. You may end up with 2 or more version tags if the changes requires backporting
|
||||
1. Assign the `review` label. This signals to the team that someone needs to give this attention.
|
||||
1. Do **not** assign a version label. Someone from Elastic staff will assign a version label, if necessary, when your pull request is ready to be merged.
|
||||
1. Find someone to review your pull. Don't just pick any yahoo, pick the right person. The right person might be the original reporter of the issue, but it might also be the person most familiar with the code you've changed. If neither of those things apply, or your change is small in scope, try to find someone on the Kibana team without a ton of existing reviews on their plate. As a rule, most pulls will require 2 reviewers, but the first reviewer will pick the 2nd.
|
||||
|
||||
### Review engaged
|
||||
|
|
|
@ -62,7 +62,8 @@ module.exports = function (grunt) {
|
|||
'postcss-unique-selectors': '1.0.0',
|
||||
'postcss-minify-selectors': '1.4.6',
|
||||
'postcss-single-charset': '0.3.0',
|
||||
'regenerator': '0.8.36'
|
||||
'regenerator': '0.8.36',
|
||||
'readable-stream': '2.1.0'
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -88,4 +89,5 @@ module.exports = function (grunt) {
|
|||
// load task definitions
|
||||
grunt.task.loadTasks('tasks');
|
||||
grunt.task.loadTasks('tasks/build');
|
||||
grunt.task.loadTasks('tasks/rebuild');
|
||||
};
|
||||
|
|
12
README.md
|
@ -41,9 +41,9 @@ Visit [Elastic.co](http://www.elastic.co/guide/en/kibana/current/index.html) for
|
|||
|
||||
For the daring, snapshot builds are available. These builds are created after each commit to the master branch, and therefore are not something you should run in production.
|
||||
|
||||
| platform | | |
|
||||
| --- | --- | --- |
|
||||
| OSX | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-darwin-x64.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-darwin-x64.zip) |
|
||||
| Linux x64 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-linux-x64.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-linux-x64.zip) |
|
||||
| Linux x86 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-linux-x86.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-linux-x86.zip) |
|
||||
| Windows | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-windows.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-windows.zip) |
|
||||
| platform | | | | |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| OSX | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-darwin-x64.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-darwin-x64.zip) | | |
|
||||
| Linux x64 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-linux-x64.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-linux-x64.zip) | [deb](https://download.elastic.co/kibana/kibana-snapshot/kibana_5.0.0-snapshot_amd64.deb)| [rpm](https://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0_snapshot-1.x86_64.rpm) |
|
||||
| Linux x86 | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-linux-x86.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-linux-x86.zip) | [deb](https://download.elastic.co/kibana/kibana-snapshot/kibana_5.0.0-snapshot_i386.deb) | [rpm](https://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0_snapshot-1.i386.rpm) |
|
||||
| Windows | [tar](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-windows.tar.gz) | [zip](http://download.elastic.co/kibana/kibana-snapshot/kibana-5.0.0-snapshot-windows.zip) | | |
|
||||
|
|
|
@ -61,6 +61,10 @@
|
|||
# must be a positive integer.
|
||||
# elasticsearch.requestTimeout: 30000
|
||||
|
||||
# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
|
||||
# headers, set this value to [] (an empty list).
|
||||
# elasticsearch.requestHeadersWhitelist: [ authorization ]
|
||||
|
||||
# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
|
||||
# elasticsearch.shardTimeout: 0
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[[kibana-settings-reference]]
|
||||
|
||||
WARNING: Modifying the following settings can signficantly affect Kibana's performance and cause problems that are
|
||||
difficult to diagnose. Setting a property's value to a blank field will revert to the default behavior, which may not be
|
||||
WARNING: Modifying the following settings can signficantly affect Kibana's performance and cause problems that are
|
||||
difficult to diagnose. Setting a property's value to a blank field will revert to the default behavior, which may not be
|
||||
compatible with other configuration settings. Deleting a custom setting removes it from Kibana permanently.
|
||||
|
||||
.Kibana Settings Reference
|
||||
|
@ -10,37 +10,39 @@ compatible with other configuration settings. Deleting a custom setting removes
|
|||
`sort:options`:: Options for the Elasticsearch https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html[sort] parameter.
|
||||
`dateFormat`:: The format to use for displaying pretty-formatted dates.
|
||||
`dateFormat:tz`:: The timezone that Kibana uses. The default value of `Browser` uses the timezone detected by the browser.
|
||||
`dateFormat:scaled`:: These values define the format used to render ordered time-based data. Formatted timestamps must
|
||||
`dateFormat:scaled`:: These values define the format used to render ordered time-based data. Formatted timestamps must
|
||||
`dateFormat:dow`:: This property defines what day weeks should start on.
|
||||
adapt to the interval between measurements. Keys are http://en.wikipedia.org/wiki/ISO_8601#Time_intervals[ISO8601 intervals].
|
||||
`defaultIndex`:: Default is `null`. This property specifies the default index.
|
||||
`metaFields`:: An array of fields outside of `_source`. Kibana merges these fields into the document when displaying the
|
||||
`metaFields`:: An array of fields outside of `_source`. Kibana merges these fields into the document when displaying the
|
||||
document.
|
||||
`defaultColumns`:: Default is `_source`. Defines the columns that appear by default on the Discover page.
|
||||
`discover:sampleSize`:: The number of rows to show in the Discover table.
|
||||
`doc_table:highlight`:: Highlight results in Discover and Saved Searches Dashboard. Highlighing makes request slow when
|
||||
`doc_table:highlight`:: Highlight results in Discover and Saved Searches Dashboard. Highlighing makes request slow when
|
||||
working on big documents. Set this property to `false` to disable highlighting.
|
||||
`courier:maxSegmentCount`:: Kibana splits requests in the Discover app into segments to limit the size of requests sent to
|
||||
the Elasticsearch cluster. This setting constrains the length of the segment list. Long segment lists can significantly
|
||||
`courier:maxSegmentCount`:: Kibana splits requests in the Discover app into segments to limit the size of requests sent to
|
||||
the Elasticsearch cluster. This setting constrains the length of the segment list. Long segment lists can significantly
|
||||
increase request processing time.
|
||||
`fields:popularLimit`:: This setting governs how many of the top most popular fields are shown.
|
||||
`histogram:barTarget`:: When date histograms use the `auto` interval, Kibana attempts to generate this number of bars.
|
||||
`histogram:maxBars`:: Date histograms are not generated with more bars than the value of this property, scaling values
|
||||
`histogram:maxBars`:: Date histograms are not generated with more bars than the value of this property, scaling values
|
||||
when necessary.
|
||||
`visualization:tileMap:maxPrecision`:: The maximum geoHash precision displayed on tile maps: 7 is high, 10 is very high,
|
||||
`visualization:tileMap:maxPrecision`:: The maximum geoHash precision displayed on tile maps: 7 is high, 10 is very high,
|
||||
12 is the maximum. http://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html#_cell_dimensions_at_the_equator[Explanation of cell dimensions].
|
||||
`visualization:tileMap:WMSdefaults`:: Default properties for the WMS map server support in the tile map.
|
||||
`visualization:colorMapping`:: Maps values to specified colors within visualizations.
|
||||
`visualization:loadingDelay`:: Time to wait before dimming visualizations during query.
|
||||
`csv:separator`:: A string that serves as the separator for exported values.
|
||||
`csv:quoteValues`:: Set this property to `true` to quote exported values.
|
||||
`history:limit`:: In fields that have history, such as query inputs, the value of this property limits how many recent
|
||||
`history:limit`:: In fields that have history, such as query inputs, the value of this property limits how many recent
|
||||
values are shown.
|
||||
`shortDots:enable`:: Set this property to `true` to shorten long field names in visualizations. For example, instead of
|
||||
`shortDots:enable`:: Set this property to `true` to shorten long field names in visualizations. For example, instead of
|
||||
`foo.bar.baz`, show `f.b.baz`.
|
||||
`truncate:maxHeight`:: This property specifies the maximum height that a cell occupies in a table. A value of 0 disables
|
||||
`truncate:maxHeight`:: This property specifies the maximum height that a cell occupies in a table. A value of 0 disables
|
||||
truncation.
|
||||
`indexPattern:fieldMapping:lookBack`:: The value of this property sets the number of recent matching patterns to query the
|
||||
`indexPattern:fieldMapping:lookBack`:: The value of this property sets the number of recent matching patterns to query the
|
||||
field mapping for index patterns with names that contain timestamps.
|
||||
`format:defaultTypeMap`:: A map of the default format name for each field type. Field types that are not explicitly
|
||||
`format:defaultTypeMap`:: A map of the default format name for each field type. Field types that are not explicitly
|
||||
mentioned use "_default_".
|
||||
`format:number:defaultPattern`:: Default numeral format for the "number" format.
|
||||
`format:bytes:defaultPattern`:: Default numeral format for the "bytes" format.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[[kibana-apps]]
|
||||
== Kibana Apps added[4.2]
|
||||
== Kibana Apps
|
||||
|
||||
The Kibana UI serves as a framework that can contain several different applications. You can switch between these
|
||||
applications by clicking the image:images/app-button.png[App Picker] *App picker* button to display the app bar:
|
||||
|
|
|
@ -24,7 +24,7 @@ aggregation returns the percentile rankings for the values in the numeric field
|
|||
from the drop-down, then specify one or more percentile rank values in the *Values* fields. Click the *X* to remove a
|
||||
values field. Click *+Add* to add a values field.
|
||||
|
||||
You can add an aggregation by clicking the *+ Add Aggregation* button.
|
||||
You can add an aggregation by clicking the *+ Add Metrics* button.
|
||||
|
||||
include::x-axis-aggs.asciidoc[]
|
||||
For example, a chart of dates with incident counts can display dates in chronological order, or you can raise the
|
||||
|
@ -36,9 +36,7 @@ include::color-picker.asciidoc[]
|
|||
You can click the *Advanced* link to display more customization options for your metrics or bucket aggregation:
|
||||
|
||||
*Exclude Pattern*:: Specify a pattern in this field to exclude from the results.
|
||||
*Exclude Pattern Flags*:: A standard set of Java flags for the exclusion pattern.
|
||||
*Include Pattern*:: Specify a pattern in this field to include in the results.
|
||||
*Include Pattern Flags*:: A standard set of Java flags for the inclusion pattern.
|
||||
*JSON Input*:: A text field where you can add specific JSON-formatted properties to merge with the aggregation
|
||||
definition, as in the following example:
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@ When a refresh interval is set, it is displayed to the left of the Time Filter i
|
|||
|
||||
To set the refresh interval:
|
||||
|
||||
. Click the *Time Filter* image:images/TimeFilter.jpg[Time Filter] in the upper right corner of the menu bar.
|
||||
. Click the *Time Filter* image:images/TimeFilter.jpg[Time Filter].
|
||||
. Click the *Refresh Interval* tab.
|
||||
. Choose a refresh interval from the list.
|
||||
|
||||
To automatically refresh the data, click the image:images/autorefresh.png[] *Auto-refresh* button and select an
|
||||
autorefresh interval:
|
||||
To automatically refresh the data, click the image:images/autorefresh.png[] *Auto-refresh* button when the time picker
|
||||
is open and select an autorefresh interval:
|
||||
|
||||
image::images/autorefresh-intervals.png[]
|
||||
|
||||
|
|
|
@ -2,6 +2,10 @@ The `Color` field formatter enables you to specify colors with specific ranges o
|
|||
|
||||
When you select the `Color` field formatter, Kibana displays the *Range*, *Font Color*, *Background Color*, and *Example* fields.
|
||||
|
||||
Click the *Add Color* button to add a range of values to associate with a particular color. You can click in the *Font Color* and *Background Color* fields to display a color picker. You can also enter a specific hex code value in the field. The effect of your current color choices are displayed in the *Example* field.
|
||||
Click the *Add Color* button to add a range of values to associate with a particular color. You can click in the *Font Color* and
|
||||
*Background Color* fields to display a color picker. You can also enter a specific hex code value in the field. The effect of your current
|
||||
color choices are displayed in the *Example* field.
|
||||
|
||||
image::images/colorformatter.png[]
|
||||
image::images/colorformatter.png[]
|
||||
|
||||
//update image
|
||||
|
|
|
@ -5,7 +5,7 @@ A Kibana _dashboard_ displays a set of saved visualizations in groups that you c
|
|||
dashboard to share or reload at a later time.
|
||||
|
||||
.Sample dashboard
|
||||
image:images/NYCTA-Dashboard.jpg[Example dashboard]
|
||||
image:images/tutorial-dashboard.png[Example dashboard]
|
||||
|
||||
[float]
|
||||
[[dashboard-getting-started]]
|
||||
|
@ -22,9 +22,7 @@ The first time you click the *Dashboard* tab, Kibana displays an empty dashboard
|
|||
image:images/NewDashboard.png[New Dashboard screen]
|
||||
|
||||
Build your dashboard by adding visualizations. By default, Kibana dashboards use a light color theme. To use a dark color
|
||||
theme instead, click the *Settings* image:images/SettingsButton.jpg[Gear] button and check the *Use dark theme* box.
|
||||
|
||||
image:images/darktheme.png[Dark Theme Example]
|
||||
theme instead, click the *Options* button and check the *Use dark theme* box.
|
||||
|
||||
NOTE: You can change the default theme in the *Advanced* section of the *Settings* tab.
|
||||
|
||||
|
@ -36,9 +34,9 @@ include::autorefresh.asciidoc[]
|
|||
[[adding-visualizations-to-a-dashboard]]
|
||||
==== Adding Visualizations to a Dashboard
|
||||
|
||||
To add a visualization to the dashboard, click the *Add Visualization* image:images/AddVis.png[Plus] button in the
|
||||
toolbar panel. Select a saved visualization from the list. You can filter the list of visualizations by typing a filter
|
||||
string into the *Visualization Filter* field.
|
||||
To add a visualization to the dashboard, click the *Add* button in the toolbar panel. Select a saved visualization
|
||||
from the list. You can filter the list of visualizations by typing a filter string into the *Visualization Filter*
|
||||
field.
|
||||
|
||||
The visualization you select appears in a _container_ on your dashboard.
|
||||
|
||||
|
@ -60,7 +58,7 @@ when you save a dashboard. To disable this behavior, clear the *Store time with
|
|||
|
||||
Click the *Load Saved Dashboard* button to display a list of existing dashboards. The saved dashboard selector includes
|
||||
a text field to filter by dashboard name and a link to the Object Editor for managing your saved dashboards. You can
|
||||
also access the Object Editor by clicking *Settings > Edit Saved Objects*.
|
||||
also access the Object Editor by clicking *Settings > Objects*.
|
||||
|
||||
[float]
|
||||
[[sharing-dashboards]]
|
||||
|
@ -73,8 +71,6 @@ NOTE: A user must have Kibana access in order to view embedded dashboards.
|
|||
|
||||
To share a dashboard, click the *Share* button image:images/share-dashboard.png[] to display the _Sharing_ panel.
|
||||
|
||||
image:images/sharing-panel.png[]
|
||||
|
||||
Click the *Copy to Clipboard* button image:images/share-link.png[] to copy the native URL or embed HTML to the clipboard.
|
||||
Click the *Generate short URL* button image:images/share-short-link.png[] to create a shortened URL for sharing or
|
||||
embedding.
|
||||
|
|
|
@ -39,9 +39,9 @@ in a name to display on the visualization.
|
|||
*Geohash*:: The {ref}search-aggregations-bucket-geohashgrid-aggregation.html[_geohash_] aggregation displays points
|
||||
based on the geohash coordinates.
|
||||
|
||||
Once you've specified a bucket type aggregation, you can define sub-aggregations to refine the visualization. Click
|
||||
*+ Add Sub Aggregation* to define a sub-aggregation, then choose *Split Rows* or *Split Table*, then select a
|
||||
sub-aggregation from the list of types.
|
||||
Once you've specified a bucket type aggregation, you can define sub-buckets to refine the visualization. Click
|
||||
*+ Add sub-buckets* to define a sub-bucket, then choose *Split Rows* or *Split Table*, then select an
|
||||
aggregation from the list of types.
|
||||
|
||||
You can use the up or down arrows to the right of the aggregation's type to change the aggregation's priority.
|
||||
|
||||
|
@ -50,9 +50,7 @@ Enter a string in the *Custom Label* field to change the display label.
|
|||
You can click the *Advanced* link to display more customization options for your metrics or bucket aggregation:
|
||||
|
||||
*Exclude Pattern*:: Specify a pattern in this field to exclude from the results.
|
||||
*Exclude Pattern Flags*:: A standard set of Java flags for the exclusion pattern.
|
||||
*Include Pattern*:: Specify a pattern in this field to include in the results.
|
||||
*Include Pattern Flags*:: A standard set of Java flags for the inclusion pattern.
|
||||
*JSON Input*:: A text field where you can add specific JSON-formatted properties to merge with the aggregation
|
||||
definition, as in the following example:
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ You can also see the number of documents that match the search query and get fie
|
|||
configured for the selected index pattern, the distribution of documents over time is displayed in a histogram at the
|
||||
top of the page.
|
||||
|
||||
image:images/Discover-Start-Annotated.jpg[Discover Page]
|
||||
image::images/Discover-Start-Annotated.jpg[Discover Page]
|
||||
|
||||
[float]
|
||||
[[set-time-filter]]
|
||||
|
@ -43,15 +43,16 @@ sets an interval based on the time range.
|
|||
[[search]]
|
||||
=== Searching Your Data
|
||||
You can search the indices that match the current index pattern by submitting a search from the Discover page.
|
||||
You can enter simple query strings, use the Lucene https://lucene.apache.org/core/2_9_4/queryparsersyntax.html[query
|
||||
syntax], or use the full JSON-based {ref}/query-dsl.html[Elasticsearch Query DSL].
|
||||
You can enter simple query strings, use the
|
||||
Lucene https://lucene.apache.org/core/2_9_4/queryparsersyntax.html[query syntax], or use the full JSON-based
|
||||
{ref}/query-dsl.html[Elasticsearch Query DSL].
|
||||
|
||||
When you submit a search, the histogram, Documents table, and Fields list are updated to reflect
|
||||
the search results. The total number of hits (matching documents) is shown in the upper right corner of the
|
||||
histogram. The Documents table shows the first five hundred hits. By default, the hits are listed in reverse
|
||||
chronological order, with the newest documents shown first. You can reverse the sort order by by clicking on the Time
|
||||
column header. You can also sort the table using the values in any indexed field. For more information, see <<sorting,
|
||||
Sorting the Documents Table>>.
|
||||
column header. You can also sort the table using the values in any indexed field. For more information, see
|
||||
<<sorting,Sorting the Documents Table>>.
|
||||
|
||||
To search your data:
|
||||
|
||||
|
@ -79,9 +80,7 @@ Reference.
|
|||
[float]
|
||||
[[new-search]]
|
||||
==== Starting a New Search
|
||||
To clear the current search and start a new search, click the *New Search* button in the Discover toolbar.
|
||||
|
||||
image:images/Discover-New-Search.jpg[New Search]
|
||||
To clear the current search and start a new search, click the *New* button in the Discover toolbar.
|
||||
|
||||
[float]
|
||||
[[save-search]]
|
||||
|
@ -91,19 +90,18 @@ Saving a search saves both the search query string and the currently selected in
|
|||
|
||||
To save the current search:
|
||||
|
||||
. Click the *Save Search* button image:images/SaveButton.jpg[Save Search button] in the Discover toolbar.
|
||||
. Click the *Save* button in the Discover toolbar.
|
||||
. Enter a name for the search and click *Save*.
|
||||
|
||||
[float]
|
||||
[[load-search]]
|
||||
==== Loading a Saved Search
|
||||
==== Opening a Saved Search
|
||||
To load a saved search:
|
||||
|
||||
. Click the *Load Search* button image:images/LoadButton.jpg[Load Search
|
||||
button] in the Discover toolbar.
|
||||
. Select the search you want to load.
|
||||
. Click the *Open* button in the Discover toolbar.
|
||||
. Select the search you want to open.
|
||||
|
||||
If the saved search is associated with a different index pattern than is currently selected, loading the saved search
|
||||
If the saved search is associated with a different index pattern than is currently selected, opening the saved search
|
||||
also changes the selected index pattern.
|
||||
|
||||
[float]
|
||||
|
@ -184,13 +182,11 @@ image:images/add-column-button.png[Add Column] *Toggle column in table* button.
|
|||
[float]
|
||||
[[sorting]]
|
||||
==== Sorting the Document List
|
||||
You can sort the documents in the Documents table by the values in any indexed field. If a time field is configured for
|
||||
the selected index pattern, by default the documents are sorted in reverse chronological order.
|
||||
You can sort the documents in the Documents table by the values in any indexed field. Documents in index patterns that
|
||||
are configured with time fields are sorted in reverse chronological order by default.
|
||||
|
||||
To change the sort order:
|
||||
|
||||
* Click the name of the field you want to sort by. The fields you can use for sorting have a sort button to the right
|
||||
of the field name. Clicking the field name a second time reverses the sort order.
|
||||
To change the sort order, click the name of the field you want to sort by. The fields you can use for sorting have a
|
||||
sort button to the right of the field name. Clicking the field name a second time reverses the sort order.
|
||||
|
||||
[float]
|
||||
[[adding-columns]]
|
||||
|
@ -228,10 +224,8 @@ button image:images/RemoveFieldButton.jpg[Remove Field Button].
|
|||
From the field list, you can see how many documents in the Documents table contain a particular field, what the top 5
|
||||
values are, and what percentage of documents contain each value.
|
||||
|
||||
To view field data statistics:
|
||||
|
||||
* Click the name of a field in the Fields list. The field can be anywhere in the Fields list--Selected Fields, Popular
|
||||
Fields, or the list of other fields.
|
||||
To view field data statistics, click the name of a field in the Fields list. The field can be anywhere in the Fields
|
||||
list.
|
||||
|
||||
image:images/Discover-FieldStats.jpg[Field Statistics]
|
||||
|
||||
|
|
15
docs/duration-formatter.asciidoc
Normal file
|
@ -0,0 +1,15 @@
|
|||
The `Duration` field formatter can display the numeric value of a field in the following increments:
|
||||
|
||||
* Picoseconds
|
||||
* Nanoseconds
|
||||
* Microseconds
|
||||
* Milliseconds
|
||||
* Seconds
|
||||
* Minutes
|
||||
* Hours
|
||||
* Days
|
||||
* Weeks
|
||||
* Months
|
||||
* Years
|
||||
|
||||
You can specify these increments with up to 20 decimal places for both input and output formats.
|
|
@ -1,6 +1,6 @@
|
|||
=== Working with Filters
|
||||
|
||||
When you create a filter anywhere in Kibana, the filter conditions display in a green oval under the search text
|
||||
When you create a filter anywhere in Kibana, the filter conditions display in an oval under the search text
|
||||
entry box:
|
||||
|
||||
image::images/filter-sample.png[]
|
||||
|
@ -10,7 +10,7 @@ Hovering on the filter oval displays the following icons:
|
|||
image::images/filter-allbuttons.png[]
|
||||
|
||||
Enable Filter image:images/filter-enable.png[]:: Click this icon to disable the filter without removing it. You can
|
||||
enable the filter again later by clicking the icon again. Disabled filters display a striped shaded color, green for
|
||||
enable the filter again later by clicking the icon again. Disabled filters display a striped shaded color, grey for
|
||||
inclusion filters and red for exclusion filters.
|
||||
Pin Filter image:images/filter-pin.png[]:: Click this icon to _pin_ a filter. Pinned filters persist across Kibana tabs.
|
||||
You can pin filters from the _Visualize_ tab, click on the _Discover_ or _Dashboard_ tabs, and those filters remain in
|
||||
|
@ -18,7 +18,7 @@ place.
|
|||
NOTE: If you have a pinned filter and you're not seeing any query results, that your current tab's index pattern is one
|
||||
that the filter applies to.
|
||||
Toggle Filter image:images/filter-toggle.png[]:: Click this icon to _toggle_ a filter. By default, filters are inclusion
|
||||
filters, and display in green. Only elements that match the filter are displayed. To change this to an exclusion
|
||||
filters, and display in grey. Only elements that match the filter are displayed. To change this to an exclusion
|
||||
filters, displaying only elements that _don't_ match, toggle the filter. Exclusion filters display in red.
|
||||
Remove Filter image:images/filter-delete.png[]:: Click this icon to remove a filter entirely.
|
||||
Custom Filter image:images/filter-custom.png[]:: Click this icon to display a text field where you can customize the JSON
|
||||
|
|
|
@ -6,7 +6,7 @@ key Kibana functionality. By the end of this tutorial, you will have:
|
|||
|
||||
* Loaded a sample data set into your Elasticsearch installation
|
||||
* Defined at least one index pattern
|
||||
* Use the <<discover, Discover>> functionality to explore your data
|
||||
* Used the <<discover, Discover>> functionality to explore your data
|
||||
* Set up some <<visualize,_visualizations_>> to graphically represent your data
|
||||
* Assembled visualizations into a <<dashboard,Dashboard>>
|
||||
|
||||
|
@ -14,10 +14,10 @@ The material in this section assumes you have a working Kibana install connected
|
|||
|
||||
Video tutorials are also available:
|
||||
|
||||
* https://www.elastic.co/blog/kibana-4-video-tutorials-part-1[High-level Kibana 4 introduction, pie charts]
|
||||
* https://www.elastic.co/blog/kibana-4-video-tutorials-part-1[High-level Kibana introduction, pie charts]
|
||||
* https://www.elastic.co/blog/kibana-4-video-tutorials-part-2[Data discovery, bar charts, and line charts]
|
||||
* https://www.elastic.co/blog/kibana-4-video-tutorials-part-3[Tile maps]
|
||||
* https://www.elastic.co/blog/kibana-4-video-tutorials-part-4[Embedding Kibana 4 visualizations]
|
||||
* https://www.elastic.co/blog/kibana-4-video-tutorials-part-4[Embedding Kibana visualizations]
|
||||
|
||||
[float]
|
||||
[[tutorial-load-dataset]]
|
||||
|
@ -76,9 +76,9 @@ The schema for the logs data set has dozens of different fields, but the notable
|
|||
"@timestamp": "date"
|
||||
}
|
||||
|
||||
Before we load the Shakespeare data set, we need to set up a {ref}/mapping.html[_mapping_] for the fields. Mapping
|
||||
divides the documents in the index into logical groups and specifies a field's characteristics, such as the field's
|
||||
searchability or whether or not it's _tokenized_, or broken up into separate words.
|
||||
Before we load the Shakespeare and logs data sets, we need to set up {ref}mapping.html[_mappings_] for the fields.
|
||||
Mapping divides the documents in the index into logical groups and specifies a field's characteristics, such as the
|
||||
field's searchability or whether or not it's _tokenized_, or broken up into separate words.
|
||||
|
||||
Use the following command to set up a mapping for the Shakespeare data set:
|
||||
|
||||
|
@ -196,10 +196,10 @@ yellow open logstash-2015.05.20 5 1 4750 0 16.4mb
|
|||
=== Defining Your Index Patterns
|
||||
|
||||
Each set of data loaded to Elasticsearch has an <<settings-create-pattern,index pattern>>. In the previous section, the
|
||||
Shakespeare data set has an index named `shakespeare`, and the accounts
|
||||
data set has an index named `bank`. An _index pattern_ is a string with optional wildcards that can match multiple
|
||||
indices. For example, in the common logging use case, a typical index name contains the date in MM-DD-YYYY
|
||||
format, and an index pattern for May would look something like `logstash-2015.05*`.
|
||||
Shakespeare data set has an index named `shakespeare`, and the accounts data set has an index named `bank`. An _index
|
||||
pattern_ is a string with optional wildcards that can match multiple indices. For example, in the common logging use
|
||||
case, a typical index name contains the date in MM-DD-YYYY format, and an index pattern for May would look something
|
||||
like `logstash-2015.05*`.
|
||||
|
||||
For this tutorial, any pattern that matches the name of an index we've loaded will work. Open a browser and
|
||||
navigate to `localhost:5601`. Click the *Settings* tab, then the *Indices* tab. Click *Add New* to define a new index
|
||||
|
@ -219,7 +219,7 @@ contain data.
|
|||
[[tutorial-discovering]]
|
||||
=== Discovering Your Data
|
||||
|
||||
Click the *Discover* tab to display Kibana's data discovery functions:
|
||||
Click the *Discover* image:images/discover-compass.png[Compass icon] tab to display Kibana's data discovery functions:
|
||||
|
||||
image::images/tutorial-discover.png[]
|
||||
|
||||
|
@ -257,7 +257,7 @@ image::images/tutorial-discover-3.png[]
|
|||
The visualization tools available on the *Visualize* tab enable you to display aspects of your data sets in several
|
||||
different ways.
|
||||
|
||||
Click on the *Visualize* tab to start:
|
||||
Click on the *Visualize* image:images/visualize-icon.png[Bar chart icon] tab to start:
|
||||
|
||||
image::images/tutorial-visualize.png[]
|
||||
|
||||
|
@ -284,7 +284,7 @@ total number of ranges to six. Enter the following ranges:
|
|||
15000 30999
|
||||
31000 50000
|
||||
|
||||
Click the green *Apply changes* button image:images/apply-changes-button.png[] to display the chart:
|
||||
Click the *Apply changes* button image:images/apply-changes-button.png[] to display the chart:
|
||||
|
||||
image::images/tutorial-visualize-pie-2.png[]
|
||||
|
||||
|
@ -294,7 +294,7 @@ holder's age.
|
|||
|
||||
Click *Add sub-buckets* at the bottom, then select *Split Slices*. Choose the *Terms* aggregation and the *age* field from
|
||||
the drop-downs.
|
||||
Click the green *Apply changes* button image:images/apply-changes-button.png[] to add an external ring with the new
|
||||
Click the *Apply changes* button image:images/apply-changes-button.png[] to add an external ring with the new
|
||||
results.
|
||||
|
||||
image::images/tutorial-visualize-pie-3.png[]
|
||||
|
@ -310,10 +310,10 @@ image::images/tutorial-visualize-bar-1.png[]
|
|||
For the Y-axis metrics aggregation, select *Unique Count*, with *speaker* as the field. For Shakespeare plays, it might
|
||||
be useful to know which plays have the lowest number of distinct speaking parts, if your theater company is short on
|
||||
actors. For the X-Axis buckets, select the *Terms* aggregation with the *play_name* field. For the *Order*, select
|
||||
*Ascending*, leaving the *Size* at 5.
|
||||
*Ascending*, leaving the *Size* at 5. Write a description for the axes in the *Custom Label* fields.
|
||||
|
||||
Leave the other elements at their default values and click the green *Apply changes* button image:images/apply-changes-button.png[]. Your chart should now look
|
||||
like this:
|
||||
Leave the other elements at their default values and click the *Apply changes* button
|
||||
image:images/apply-changes-button.png[]. Your chart should now look like this:
|
||||
|
||||
image::images/tutorial-visualize-bar-2.png[]
|
||||
|
||||
|
@ -327,15 +327,18 @@ as well as change many other options for your visualizations, by clicking the *O
|
|||
Now that you have a list of the smallest casts for Shakespeare plays, you might also be curious to see which of these
|
||||
plays makes the greatest demands on an individual actor by showing the maximum number of speeches for a given part. Add
|
||||
a Y-axis aggregation with the *Add metrics* button, then choose the *Max* aggregation for the *speech_number* field. In
|
||||
the *Options* tab, change the *Bar Mode* drop-down to *grouped*, then click the green *Apply changes* button
|
||||
image:images/apply-changes-button.png[]. Your
|
||||
chart should now look like this:
|
||||
the *Options* tab, change the *Bar Mode* drop-down to *grouped*, then click the *Apply changes* button
|
||||
image:images/apply-changes-button.png[]. Your chart should now look like this:
|
||||
|
||||
image::images/tutorial-visualize-bar-3.png[]
|
||||
|
||||
As you can see, _Love's Labours Lost_ has an unusually high maximum speech number, compared to the other plays, and
|
||||
might therefore make more demands on an actor's memory.
|
||||
|
||||
Note how the *Number of speaking parts* Y-axis starts at zero, but the bars don't begin to differentiate until 18. To
|
||||
make the differences stand out, starting the Y-axis at a value closer to the minimum, check the
|
||||
*Scale Y-Axis to data bounds* box in the *Options* tab.
|
||||
|
||||
Save this chart with the name _Bar Example_.
|
||||
|
||||
Next, we're going to make a tile map chart to visualize some geographic data. Click on *New Visualization*, then
|
||||
|
@ -350,8 +353,8 @@ at the bottom. You'll see a map of the world, since we haven't defined any bucke
|
|||
|
||||
image::images/tutorial-visualize-map-1.png[]
|
||||
|
||||
Select *Geo Coordinates* as the bucket, then click the green *Apply changes* button image:images/apply-changes-button.png[]. Your chart should now look like
|
||||
this:
|
||||
Select *Geo Coordinates* as the bucket, then click the *Apply changes* button image:images/apply-changes-button.png[].
|
||||
Your chart should now look like this:
|
||||
|
||||
image::images/tutorial-visualize-map-2.png[]
|
||||
|
||||
|
@ -378,7 +381,7 @@ Write the following text in the field:
|
|||
The Markdown widget uses **markdown** syntax.
|
||||
> Blockquotes in Markdown use the > character.
|
||||
|
||||
Click the green *Apply changes* button image:images/apply-changes-button.png[] to display the rendered Markdown in the
|
||||
Click the *Apply changes* button image:images/apply-changes-button.png[] to display the rendered Markdown in the
|
||||
preview pane:
|
||||
|
||||
image::images/tutorial-visualize-md-2.png[]
|
||||
|
|
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 664 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 191 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 803 B |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
docs/images/discover-compass.png
Normal file
After Width: | Height: | Size: 721 B |
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 855 KiB After Width: | Height: | Size: 843 KiB |
Before Width: | Height: | Size: 208 KiB After Width: | Height: | Size: 161 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 634 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 498 KiB After Width: | Height: | Size: 368 KiB |
Before Width: | Height: | Size: 511 KiB After Width: | Height: | Size: 281 KiB |
Before Width: | Height: | Size: 619 KiB After Width: | Height: | Size: 2 MiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 217 KiB After Width: | Height: | Size: 169 KiB |
BIN
docs/images/visualize-icon.png
Normal file
After Width: | Height: | Size: 285 B |
|
@ -3,10 +3,11 @@
|
|||
|
||||
:ref: http://www.elastic.co/guide/en/elasticsearch/reference/current/
|
||||
:shield: https://www.elastic.co/guide/en/shield/current
|
||||
:scyld: X-Pack Security
|
||||
:k4issue: https://github.com/elastic/kibana/issues/
|
||||
:k4pull: https://github.com/elastic/kibana/pull/
|
||||
:version: 5.0 alpha
|
||||
:esversion: 2.3
|
||||
:version: master
|
||||
:esversion: master
|
||||
|
||||
include::introduction.asciidoc[]
|
||||
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
[[introduction]]
|
||||
== Introduction
|
||||
|
||||
Kibana is an open source analytics and visualization platform designed to work
|
||||
with Elasticsearch. You use Kibana to search, view, and interact with data
|
||||
stored in Elasticsearch indices. You can easily perform advanced data analysis
|
||||
Kibana is an open source analytics and visualization platform designed to work with Elasticsearch. You use Kibana to
|
||||
search, view, and interact with data stored in Elasticsearch indices. You can easily perform advanced data analysis
|
||||
and visualize your data in a variety of charts, tables, and maps.
|
||||
|
||||
Kibana makes it easy to understand large volumes of data. Its simple,
|
||||
browser-based interface enables you to quickly create and share dynamic
|
||||
dashboards that display changes to Elasticsearch queries in real time.
|
||||
Kibana makes it easy to understand large volumes of data. Its simple, browser-based interface enables you to quickly
|
||||
create and share dynamic dashboards that display changes to Elasticsearch queries in real time.
|
||||
|
||||
Setting up Kibana is a snap. You can install Kibana and start exploring your
|
||||
Elasticsearch indices in minutes -- no code, no additional infrastructure required.
|
||||
Setting up Kibana is a snap. You can install Kibana and start exploring your Elasticsearch indices in minutes -- no
|
||||
code, no additional infrastructure required.
|
||||
|
||||
NOTE: This guide describes how to use Kibana {version}. For information about what's new
|
||||
in Kibana {version}, see the <<releasenotes, release notes>>.
|
||||
For more information about creating and sharing visualizations and dashboards, see the <<visualize, Visualize>>
|
||||
and <<dashboard, Dashboard>> topics. A complete <<getting-started,tutorial>> covering several aspects of Kibana's
|
||||
functionality is also available.
|
||||
|
||||
NOTE: This guide describes how to use Kibana {version}. For information about what's new in Kibana {version}, see
|
||||
the <<releasenotes, release notes>>.
|
||||
|
||||
////
|
||||
[float]
|
||||
|
@ -52,7 +54,3 @@ that displays several visualizations of the TFL data:
|
|||
|
||||
image:images/TFL-Dashboard.jpg[Dashboard]
|
||||
////
|
||||
|
||||
For more information about creating and sharing visualizations and dashboards, see the <<visualize, Visualize>>
|
||||
and <<dashboard, Dashboard>> topics. A complete <<getting-started,tutorial>> covering several aspects of Kibana's
|
||||
functionality is also available.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[[setup-repositories]]
|
||||
=== Kibana Repositories
|
||||
|
||||
Binary packages for Kibana are available for Unix distributions that support the `apt` and `yum` tools.We also have
|
||||
Binary packages for Kibana are available for Unix distributions that support the `apt` and `yum` tools. We also have
|
||||
repositories available for APT and YUM based distributions.
|
||||
|
||||
NOTE: Since the packages are created as part of the Kibana build, source packages are not available.
|
||||
|
@ -24,23 +24,24 @@ wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add
|
|||
+
|
||||
. Add the repository definition to your `/etc/apt/sources.list.d/kibana.list` file:
|
||||
+
|
||||
[source, sh]
|
||||
["source","sh",subs="attributes"]
|
||||
--------------------------------------------------
|
||||
echo "deb http://packages.elastic.co/kibana/{branch}/debian stable main" | sudo tee -a /etc/apt/sources.list.d/kibana.list
|
||||
echo "deb http://packages.elastic.co/kibana/{version}/debian stable main" | sudo tee -a /etc/apt/sources.list.d/kibana.list
|
||||
--------------------------------------------------
|
||||
+
|
||||
[WARNING]
|
||||
==================================================
|
||||
Use the `echo` method described above to add the Kibana repository. Do not use `add-apt-repository`, as that command
|
||||
Use the `echo` method described above to add the Kibana repository. Do not use `add-apt-repository`, as that command
|
||||
adds a `deb-src` entry with no corresponding source package.
|
||||
When the `deb-src` entry, is present, the commands in this procedure generate an error similar to the following:
|
||||
|
||||
When the `deb-src` entry is present, the commands in this procedure generate an error similar to the following:
|
||||
|
||||
Unable to find expected entry 'main/source/Sources' in Release file (Wrong sources.list entry or malformed file)
|
||||
|
||||
Delete the `deb-src` entry from the `/etc/apt/sources.list.d/kibana.list` file to clear the error.
|
||||
==================================================
|
||||
+
|
||||
. Run `apt-get update` and the repository is ready for use. Install Kibana with the following command:
|
||||
. Run `apt-get update` to ready the repository. Install Kibana with the following command:
|
||||
+
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -79,11 +80,11 @@ rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
|
|||
+
|
||||
. Create a file named `kibana.repo` in the `/etc/yum.repos.d/` directory with the following contents:
|
||||
+
|
||||
[source,sh]
|
||||
["source","sh",subs="attributes"]
|
||||
--------------------------------------------------
|
||||
[kibana-{branch}]
|
||||
name=Kibana repository for {branch}.x packages
|
||||
baseurl=http://packages.elastic.co/kibana/{branch}/centos
|
||||
[kibana-{version}]
|
||||
name=Kibana repository for {version}.x packages
|
||||
baseurl=http://packages.elastic.co/kibana/{version}/centos
|
||||
gpgcheck=1
|
||||
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
|
||||
enabled=1
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
[horizontal]
|
||||
`server.port:`:: *Default: 5601* Kibana is served by a back end server. This setting specifies the port to use.
|
||||
`server.host:`:: *Default: "0.0.0.0"* This setting specifies the IP address of the back end server.
|
||||
`server.basePath:`:: Enables you to specify a path to mount Kibana at if you are running behind a proxy. This setting cannot
|
||||
end in a slash (`/`).
|
||||
`server.basePath:`:: Enables you to specify a path to mount Kibana at if you are running behind a proxy. This setting
|
||||
cannot end in a slash (`/`).
|
||||
`server.maxPayloadBytes:`:: *Default: 1048576* The maximum payload size in bytes for incoming server requests.
|
||||
`server.name:`:: *Default: "your-hostname"* A human-readable display name that identifies this Kibana instance.
|
||||
`elasticsearch.url:`:: *Default: "http://localhost:9200"* The URL of the Elasticsearch instance to use for all your
|
||||
queries.
|
||||
`elasticsearch.preserveHost:`:: *Default: true* When this setting’s value is true Kibana uses the hostname specified in
|
||||
|
@ -28,7 +29,9 @@ to `false`.
|
|||
wait for Elasticsearch to respond to pings.
|
||||
`elasticsearch.requestTimeout:`:: *Default: 300000* Time in milliseconds to wait for responses from the back end or
|
||||
Elasticsearch. This value must be a positive integer.
|
||||
`elasticsearch.shardTimeout:`:: *Default: 0* Time in milliseconds for Elasticsearch to wait for responses from shards. Set
|
||||
`elasticsearch.requestHeadersWhitelist:`:: *Default: `[ 'authorization' ]`* List of Kibana client-side headers to send to Elasticsearch.
|
||||
To send *no* client-side headers, set this value to [] (an empty list).
|
||||
`elasticsearch.shardTimeout:`:: *Default: 0* Time in milliseconds for Elasticsearch to wait for responses from shards. Set
|
||||
to 0 to disable.
|
||||
`elasticsearch.startupTimeout:`:: *Default: 5000* Time in milliseconds to wait for Elasticsearch at Kibana startup before
|
||||
retrying.
|
||||
|
@ -39,4 +42,7 @@ retrying.
|
|||
error messages.
|
||||
`logging.verbose`:: *Default: false* Set the value of this setting to `true` to log all events, including system usage
|
||||
information and all requests.
|
||||
`ops.interval`:: *Default: 10000* Set the interval in milliseconds to sample system and process performance metrics. Minimum is 100ms. Defaults to 10 seconds.
|
||||
`ops.interval`:: *Default: 10000* Set the interval in milliseconds to sample system and process performance metrics.
|
||||
The minimum value is 100.
|
||||
`status.allowAnonymous`:: *Default: false* If authentication is enabled, setting this to `true` allows
|
||||
unauthenticated users to access the Kibana server status API and status page.
|
||||
|
|
|
@ -50,7 +50,7 @@ values.
|
|||
*Scale Y-Axis to Data Bounds*:: The default Y-axis bounds are zero and the maximum value returned in the data. Check
|
||||
this box to change both upper and lower bounds to match the values returned in the data.
|
||||
|
||||
After changing options, click the green *Apply changes* button to update your visualization, or the grey *Discard
|
||||
After changing options, click the *Apply changes* button to update your visualization, or the grey *Discard
|
||||
changes* button to keep your visualization in its current state.
|
||||
|
||||
[float]
|
||||
|
|
|
@ -50,8 +50,8 @@ in a name to display on the visualization.
|
|||
{ref}search-aggregations-bucket-significantterms-aggregation.html[_significant terms_] aggregation. The value of the
|
||||
*Size* parameter defines the number of entries this aggregation returns.
|
||||
|
||||
After defining an initial bucket aggregation, you can define sub-aggregations to refine the visualization. Click *+ Add
|
||||
Sub Aggregation* to define a sub-aggregation, then choose *Split Slices* to select a sub-aggregation from the list of
|
||||
After defining an initial bucket aggregation, you can define sub-buckets to refine the visualization. Click *+ Add
|
||||
sub-buckets* to define a sub-aggregation, then choose *Split Slices* to select a sub-bucket from the list of
|
||||
types.
|
||||
|
||||
When multiple aggregations are defined on a chart's axis, you can use the up or down arrows to the right of the
|
||||
|
@ -64,9 +64,7 @@ Enter a string in the *Custom Label* field to change the display label.
|
|||
You can click the *Advanced* link to display more customization options for your metrics or bucket aggregation:
|
||||
|
||||
*Exclude Pattern*:: Specify a pattern in this field to exclude from the results.
|
||||
*Exclude Pattern Flags*:: A standard set of Java flags for the exclusion pattern.
|
||||
*Include Pattern*:: Specify a pattern in this field to include in the results.
|
||||
*Include Pattern Flags*:: A standard set of Java flags for the inclusion pattern.
|
||||
*JSON Input*:: A text field where you can add specific JSON-formatted properties to merge with the aggregation
|
||||
definition, as in the following example:
|
||||
|
||||
|
@ -84,7 +82,7 @@ Select the *Options* tab to change the following aspects of the table:
|
|||
*Show Tooltip*:: Check this box to enable the display of tooltips.
|
||||
*Show Legend*:: Check this box to enable the display of a legend next to the chart.
|
||||
|
||||
After changing options, click the green *Apply changes* button to update your visualization, or the grey *Discard
|
||||
After changing options, click the *Apply changes* button to update your visualization, or the grey *Discard
|
||||
changes* button to keep your visualization in its current state.
|
||||
|
||||
[float]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[[kibana-plugins]]
|
||||
== Kibana Plugins added[4.2]
|
||||
== Kibana Plugins
|
||||
|
||||
Add-on functionality for Kibana is implemented with plug-in modules. You can use the `bin/kibana plugin`
|
||||
Add-on functionality for Kibana is implemented with plug-in modules. You can use the `bin/kibana-plugin`
|
||||
command to manage these modules. You can also install a plugin manually by moving the plugin file to the
|
||||
`installedPlugins` directory and unpacking the plugin files into a new directory.
|
||||
|
||||
|
@ -13,27 +13,22 @@ A list of existing Kibana plugins is available on https://github.com/elastic/kib
|
|||
Use the following command to install a plugin:
|
||||
|
||||
[source,shell]
|
||||
bin/kibana plugin --install <org>/<package>/<version>
|
||||
bin/kibana-plugin install <package name or URL>
|
||||
|
||||
You can also use `-i` instead of `--install`, as in the following example:
|
||||
|
||||
[source,shell]
|
||||
bin/kibana plugin -i elasticsearch/marvel/latest
|
||||
|
||||
Because the organization given is `elasticsearch`, the plugin management tool automatically downloads the
|
||||
plugin from `download.elastic.co`.
|
||||
When you specify a plugin name without a URL, the plugin tool attempts to download the plugin from `download.elastic.co`.
|
||||
|
||||
[float]
|
||||
=== Installing Plugins from an Arbitrary URL
|
||||
==== Installing Plugins from an Arbitrary URL
|
||||
|
||||
You can specify a URL to a plugin with the `-u` or `--url` options after the `-i` or `--install` option, as in the
|
||||
following example:
|
||||
You can specify a URL to a specific plugin, as in the following example:
|
||||
|
||||
[source,shell]
|
||||
bin/kibana plugin -i sample-plugin -u https://some.sample.url/directory
|
||||
Installing sample-plugin
|
||||
Attempting to extract from https://some.sample.url/directory
|
||||
Downloading <some number> bytes....................
|
||||
$ bin/kibana-plugin install https://download.elastic.co/kibana/x-pack/x-pack-5.0.0-snapshot.zip
|
||||
Attempting to transfer from https://download.elastic.co/kibana/x-pack//x-pack-5.0.0-snapshot.zip
|
||||
Transferring <some number> bytes....................
|
||||
Transfer complete
|
||||
Retrieving metadata from plugin archive
|
||||
Extracting plugin archive
|
||||
Extraction complete
|
||||
Optimizing and caching browser bundles...
|
||||
Plugin installation complete
|
||||
|
@ -43,13 +38,17 @@ You can specify URLs that use the HTTP, HTTPS, or `file` protocols.
|
|||
[float]
|
||||
=== Installing Plugins to an Arbitrary Directory
|
||||
|
||||
Use the `-d` or `--plugin-dir` option to specify a directory for plugins, as in the following example:
|
||||
Use the `-d` or `--plugin-dir` option after the `install` command to specify a directory for plugins, as in the following
|
||||
example:
|
||||
|
||||
[source,shell]
|
||||
bin/kibana plugin -i elasticsearch/sample-plugin/latest -d <path/to/directory>
|
||||
$ bin/kibana-plugin install file:///some/local/path/x-pack.zip -d path/to/directory
|
||||
Installing sample-plugin
|
||||
Attempting to extract from https://download.elastic.co/elasticsearch/sample-plugin/sample-plugin-latest.tar.gz
|
||||
Downloading <some number> bytes....................
|
||||
Attempting to transfer from file:///some/local/path/x-pack.zip
|
||||
Transferring <some number> bytes....................
|
||||
Transfer complete
|
||||
Retrieving metadata from plugin archive
|
||||
Extracting plugin archive
|
||||
Extraction complete
|
||||
Optimizing and caching browser bundles...
|
||||
Plugin installation complete
|
||||
|
@ -59,18 +58,17 @@ NOTE: This command creates the specified directory if it does not already exist.
|
|||
[float]
|
||||
=== Removing Plugins
|
||||
|
||||
Use the `--remove` or `-r` option to remove a plugin, including any configuration information, as in the following
|
||||
example:
|
||||
Use the `remove` command to remove a plugin, including any configuration information, as in the following example:
|
||||
|
||||
[source,shell]
|
||||
bin/kibana plugin --remove marvel
|
||||
$ bin/kibana-plugin remove timelion
|
||||
|
||||
You can also remove a plugin manually by deleting the plugin's subdirectory under the `installedPlugins` directory.
|
||||
You can also remove a plugin manually by deleting the plugin's subdirectory under the `installedPlugins/` directory.
|
||||
|
||||
[float]
|
||||
=== Listing Installed Plugins
|
||||
|
||||
Use `--list` or `-l` option to list the currently installed plugins.
|
||||
Use the `list` command to list the currently installed plugins.
|
||||
|
||||
[float]
|
||||
=== Updating Plugins
|
||||
|
@ -81,27 +79,28 @@ To update a plugin, remove the current version and reinstall the plugin.
|
|||
=== Configuring the Plugin Manager
|
||||
|
||||
By default, the plugin manager provides you with feedback on the status of the activity you've asked the plugin manager
|
||||
to perform. You can control the level of feedback with the `--quiet` and `--silent` options. Use the `--quiet` option to
|
||||
suppress all non-error output. Use the `--silent` option to suppress all output.
|
||||
to perform. You can control the level of feedback for the `install` and `remove` commands with the `--quiet` and
|
||||
`--silent` options. Use the `--quiet` option to suppress all non-error output. Use the `--silent` option to suppress all
|
||||
output.
|
||||
|
||||
By default, plugin manager requests do not time out. Use the `--timeout` option, followed by a time, to change this
|
||||
behavior, as in the following examples:
|
||||
By default, plugin manager installation requests do not time out. Use the `--timeout` option, followed by a time, to
|
||||
change this behavior, as in the following examples:
|
||||
|
||||
[source,shell]
|
||||
.Waits for 30 seconds before failing
|
||||
bin/kibana plugin --install username/sample-plugin --timeout 30s
|
||||
bin/kibana-plugin install --timeout 30s sample-plugin
|
||||
|
||||
[source,shell]
|
||||
.Waits for 1 minute before failing
|
||||
bin/kibana plugin --install username/sample-plugin --timeout 1m
|
||||
bin/kibana-plugin install --timeout 1m sample-plugin
|
||||
|
||||
[float]
|
||||
==== Plugins and Custom Kibana Configurations
|
||||
|
||||
Use the `-c` or `--config` options to specify the path to the configuration file used to start Kibana. By default, Kibana
|
||||
uses the configuration file `config/kibana.yml`. When you change your installed plugins, the `bin/kibana plugin` command
|
||||
restarts the Kibana server. When you are using a customized configuration file, you must specify the
|
||||
path to that configuration file each time you use the `bin/kibana plugin` command.
|
||||
Use the `-c` or `--config` options with the `install` and `remove` commands to specify the path to the configuration file
|
||||
used to start Kibana. By default, Kibana uses the configuration file `config/kibana.yml`. When you change your installed
|
||||
plugins, the `bin/kibana-plugin` command restarts the Kibana server. When you are using a customized configuration file,
|
||||
you must specify the path to that configuration file each time you use the `bin/kibana-plugin` command.
|
||||
|
||||
[float]
|
||||
=== Plugin Manager Exit Codes
|
||||
|
@ -117,9 +116,14 @@ path to that configuration file each time you use the `bin/kibana plugin` comman
|
|||
== Switching Plugin Functionality
|
||||
|
||||
The Kibana UI serves as a framework that can contain several different plugins. You can switch between these
|
||||
plugins by clicking the image:images/app-button.png[Plugin Chooser] *Plugin chooser* button to display icons for the
|
||||
installed plugins:
|
||||
plugins by clicking the icons for your desired plugins in the left-hand navigation bar.
|
||||
|
||||
image::images/app-picker.png[]
|
||||
[float]
|
||||
=== Disabling Plugins
|
||||
|
||||
Click a plugin's icon to switch to that plugin's functionality.
|
||||
Use the following command to disable a plugin:
|
||||
|
||||
[source,shell]
|
||||
./bin/kibana --<plugin ID>.enabled=false
|
||||
|
||||
You can find a plugin's plugin ID as the value of the `name` property in the plugin's `package.json` file.
|
|
@ -1,6 +1,6 @@
|
|||
[[production]]
|
||||
== Using Kibana in a Production Environment
|
||||
* <<configuring-kibana-shield, Configuring Kibana to Work with Shield>>
|
||||
* <<configuring-kibana-shield, Configuring Kibana to Work with {scyld}>>
|
||||
* <<enabling-ssl, Enabling SSL>>
|
||||
* <<controlling-access, Controlling Access>>
|
||||
* <<load-balancing, Load Balancing Across Multiple Elasticsearch Nodes>>
|
||||
|
@ -19,31 +19,29 @@ and an Elasticsearch client node on the same machine. For more information, see
|
|||
|
||||
[float]
|
||||
[[configuring-kibana-shield]]
|
||||
=== Configuring Kibana to Work with Shield
|
||||
If you are using Shield to authenticate Elasticsearch users, you need to provide
|
||||
=== Configuring Kibana to Work with {scyld}
|
||||
If you are using {scyld} to authenticate Elasticsearch users, you need to provide
|
||||
the Kibana server with credentials so it can access the `.kibana` index and monitor
|
||||
the cluster.
|
||||
|
||||
To configure credentials for the Kibana server:
|
||||
|
||||
. Assign the `kibana4_server` role to a user in Shield. For more information, see
|
||||
{shield}/kibana.html#kibana4-server-role[Configuring a Role for the Kibana 4 Server]
|
||||
in the Shield documentation.
|
||||
. Assign the `kibana4_server` role to a user in {scyld}. For more information, see
|
||||
{shield}/kibana.html#kibana4-server-role[Configuring a Role for the Kibana Server]
|
||||
in the {scyld} documentation.
|
||||
|
||||
. Set the `kibana_elasticsearch_username` and
|
||||
`kibana_elasticsearch_password` properties in `kibana.yml` to specify the credentials
|
||||
of the user you assigned the `kibana4_server`
|
||||
role:
|
||||
of the user you assigned the `kibana4_server` role:
|
||||
+
|
||||
[source,text]
|
||||
----
|
||||
kibana_elasticsearch_username: kibana4-user
|
||||
kibana_elasticsearch_password: kibana4-password
|
||||
kibana_elasticsearch_username: kibana-user
|
||||
kibana_elasticsearch_password: kibana-password
|
||||
----
|
||||
|
||||
Kibana 4 users also need access to the `.kibana` index so they can save and load searches, visualizations, and dashboards.
|
||||
For more information, see {shield}/kibana.html[Using Kibana with Shield] in
|
||||
the Shield documentation.
|
||||
Users on release 4.0 and later of Kibana also need access to the `.kibana` index so they can save and load searches, visualizations, and
|
||||
dashboards. For more information, see {shield}/kibana.html[Using Kibana with {scyld}].
|
||||
|
||||
TIP: See <<kibana-dynamic-mapping, Kibana and Elasticsearch Dynamic Mapping>> for important information on Kibana and
|
||||
the dynamic mapping feature in Elasticsearch.
|
||||
|
@ -64,7 +62,7 @@ server.ssl.key: /path/to/your/server.key
|
|||
server.ssl.cert: /path/to/your/server.crt
|
||||
----
|
||||
|
||||
If you are using Shield or a proxy that provides an HTTPS endpoint for Elasticsearch,
|
||||
If you are using {scyld} or a proxy that provides an HTTPS endpoint for Elasticsearch,
|
||||
you can configure Kibana to access Elasticsearch via HTTPS so communications between
|
||||
the Kibana server and Elasticsearch are encrypted.
|
||||
|
||||
|
@ -89,15 +87,14 @@ ca: /path/to/your/ca/cacert.pem
|
|||
[float]
|
||||
[[controlling-access]]
|
||||
=== Controlling access
|
||||
You can use http://www.elastic.co/overview/shield/[Elasticsearch Shield]
|
||||
(Shield) to control what Elasticsearch data users can access through Kibana.
|
||||
Shield provides index-level access control. If a user isn't authorized to run
|
||||
You can use http://www.elastic.co/overview/shield/[{scyld}] to control what Elasticsearch data users can access through Kibana.
|
||||
{scyld} provides index-level access control. If a user isn't authorized to run
|
||||
the query that populates a Kibana visualization, the user just sees an empty
|
||||
visualization.
|
||||
|
||||
To configure access to Kibana using Shield, you create Shield roles
|
||||
To configure access to Kibana using {scyld}, you create roles
|
||||
for Kibana using the `kibana4` default role as a starting point. For more
|
||||
information, see {shield}/kibana.html#using-kibana4-with-shield[Using Kibana 4 with Shield].
|
||||
information, see {shield}/kibana.html#using-kibana4-with-shield[Using Kibana with {scyld}].
|
||||
|
||||
[float]
|
||||
[[load-balancing]]
|
||||
|
|
|
@ -3,21 +3,29 @@
|
|||
|
||||
The {version} release of Kibana requires Elasticsearch {esversion} or later.
|
||||
|
||||
[float]
|
||||
[[breaking]]
|
||||
== Breaking Changes
|
||||
|
||||
// * {k4issue}5591[Issue 5591]: The command-line plugin tool no longer supports Github.
|
||||
|
||||
[float]
|
||||
[[enhancements]]
|
||||
== Enhancements
|
||||
|
||||
// * {k4issue}5109[Issue 5109]: Adds custom JSON and filter alias naming for filters.
|
||||
// * {k4issue}1726[Issue 1726]: Adds a color field formatter for value ranges in numeric fields.
|
||||
// * {k4issue}4342[Issue 4342]: Increased performance for wildcard indices.
|
||||
// * {k4issue}1600[Issue 1600]: Support for global time zones.
|
||||
// * {k4pull}5275[Pull Request 5275]: Highlighting values in Discover can now be disabled.
|
||||
// * {k4issue}5212[Issue 5212]: Adds support for multiple certificate authorities.
|
||||
// * {k4issue}2716[Issue 2716]: The open/closed position of the spy panel now persists across UI state changes.
|
||||
// * {k4issue}6387[Issue 6387]: A new look for Kibana: new logo and UI, improved layout and navigation.
|
||||
|
||||
[float]
|
||||
[[bugfixes]]
|
||||
== Bug Fixes
|
||||
|
||||
// * {k4issue}5165[Issue 5165]: Resolves a display error in embedded views.
|
||||
// * {k4issue}5021[Issue 5021]: Improves visualization dimming for dashboards with auto-refresh.
|
||||
// * {k4issue}5914[Issue 5914]: Adds ability to aggregate on unindexed fields.
|
||||
|
||||
[float]
|
||||
[[plugins-apis]]
|
||||
== Plugins, APIs, and Development Infrastructure
|
||||
|
||||
NOTE: The items in this section are not a complete list of the internal changes relating to development in Kibana. Plugin
|
||||
framework and APIs are not formally documented and not guaranteed to be backward compatible from release to release.
|
||||
|
||||
// * {k4issue}5198[Issue 5198]: Injects buttons from the plugin to the navigation bar.
|
||||
|
|
|
@ -183,11 +183,13 @@ include::string-formatter.asciidoc[]
|
|||
|
||||
==== Numeric Field Formatters
|
||||
|
||||
Numeric fields support the `Url`, `String`, `Bytes`, `Number`, `Percentage`, and `Color` formatters.
|
||||
Numeric fields support the `Url`, `Bytes`, `Duration`, `Number`, `Percentage`, `String`, and `Color` formatters.
|
||||
|
||||
include::url-formatter.asciidoc[]
|
||||
|
||||
include::string-formatter.asciidoc[]
|
||||
|
||||
include::url-formatter.asciidoc[]
|
||||
include::duration-formatter.asciidoc[]
|
||||
|
||||
include::color-formatter.asciidoc[]
|
||||
|
||||
|
@ -278,6 +280,7 @@ you'll need to update your `kibana.yml` file. You can also enable SSL and set a
|
|||
|
||||
include::kibana-yml.asciidoc[]
|
||||
|
||||
////
|
||||
deprecated[4.2, The names of several Kibana server properties changed in the 4.2 release of Kibana. The previous names remain as functional aliases, but are now deprecated and will be removed in a future release of Kibana]
|
||||
|
||||
[horizontal]
|
||||
|
@ -373,6 +376,10 @@ deprecated[4.2, The names of several Kibana server properties changed in the 4.2
|
|||
+
|
||||
*default*: `500000`
|
||||
|
||||
`elasticsearch.requestHeadersWhitelist:` added[5.0]:: List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side headers, set this value to [] (an empty list).
|
||||
+
|
||||
*default*: `[ 'authorization' ]`
|
||||
|
||||
`elasticsearch.shardTimeout` added[4.2]:: How long Elasticsearch should wait for responses from shards. Set to 0 to disable.
|
||||
+
|
||||
*alias*: `shard_timeout` deprecated[4.2]
|
||||
|
@ -407,6 +414,7 @@ you are using a self-signed certificate so the certificate can be verified. Disa
|
|||
`logging.dest` added[4.2]:: The location where you want to store the Kibana's log output. If not specified, log output is written to standard output and not stored. Specifying a log file suppresses log writes to standard output.
|
||||
+
|
||||
*alias*: `log_file` deprecated[4.2]
|
||||
////
|
||||
|
||||
[[managing-saved-objects]]
|
||||
=== Managing Saved Searches, Visualizations, and Dashboards
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
You can set up Kibana and start exploring your Elasticsearch indices in minutes.
|
||||
All you need is:
|
||||
|
||||
* Elasticsearch master
|
||||
* Elasticsearch {esversion}
|
||||
* A modern web browser - http://www.elastic.co/subscriptions/matrix#matrix_browsers[Supported Browsers].
|
||||
* Information about your Elasticsearch installation:
|
||||
** URL of the Elasticsearch instance you want to connect to.
|
||||
** Which Elasticsearch indices you want to search.
|
||||
|
||||
NOTE: If your Elasticsearch installation is protected by http://www.elastic.co/overview/shield/[Shield] see
|
||||
{shield}/kibana.html#using-kibana4-with-shield[Shield with Kibana 4] for additional setup instructions.
|
||||
NOTE: If your Elasticsearch installation is protected by http://www.elastic.co/overview/shield/[{scyld}], see
|
||||
{shield}/kibana.html#using-kibana4-with-shield[{scyld} with Kibana] for additional setup instructions.
|
||||
|
||||
[float]
|
||||
[[install]]
|
||||
|
@ -18,15 +18,16 @@ NOTE: If your Elasticsearch installation is protected by http://www.elastic.co/o
|
|||
|
||||
To get Kibana up and running:
|
||||
|
||||
. Download the https://www.elastic.co/downloads/kibana[Kibana 4 binary package] for your platform.
|
||||
. Download the https://www.elastic.co/downloads/kibana[Kibana {version} binary package] for your platform.
|
||||
. Extract the `.zip` or `tar.gz` archive file.
|
||||
. After installing, run Kibana from the install directory: `bin/kibana` (Linux/MacOSX) or `bin\kibana.bat` (Windows).
|
||||
|
||||
// On Unix, you can instead run the package manager suited for your distribution.
|
||||
//
|
||||
// [float]
|
||||
// include::kibana-repositories.asciidoc[]
|
||||
//
|
||||
After installing, run Kibana from the install directory: `bin/kibana` (Linux/MacOSX) or `bin\kibana.bat` (Windows).
|
||||
On Unix, you can instead run the package manager suited for your distribution.
|
||||
|
||||
////
|
||||
[float]
|
||||
include::kibana-repositories.asciidoc[]
|
||||
////
|
||||
|
||||
That's it! Kibana is now running on port 5601.
|
||||
|
||||
|
@ -82,14 +83,14 @@ simply be the name of a single index.
|
|||
reads the index mapping to list all of the fields that contain a timestamp. If your index doesn't have time-based data,
|
||||
disable the *Index contains time-based events* option.
|
||||
+
|
||||
WARNING: Using event times to create index names is *deprecated* in this release of Kibana. Support for this functionality
|
||||
will be removed entirely in the next major Kibana release. Elasticsearch 2.1 includes sophisticated date parsing APIs that
|
||||
Kibana uses to determine date information, removing the need to specify dates in the index pattern name.
|
||||
WARNING: Using event times to create index names is *deprecated* in this release of Kibana. Starting in the 2.1
|
||||
release, Elasticsearch includes sophisticated date parsing APIs that Kibana uses to determine date information,
|
||||
removing the need to specify dates in the index pattern name.
|
||||
+
|
||||
. Click *Create* to add the index pattern. This first pattern is automatically configured as the default.
|
||||
When you have more than one index pattern, you can designate which one to use as the default from *Settings > Indices*.
|
||||
|
||||
Voila! Kibana is now connected to your Elasticsearch data. Kibana displays a read-only list of fields configured for
|
||||
All done! Kibana is now connected to your Elasticsearch data. Kibana displays a read-only list of fields configured for
|
||||
the matching index.
|
||||
|
||||
[float]
|
||||
|
@ -101,5 +102,5 @@ You're ready to dive in to your data:
|
|||
* Chart and map your data from the <<visualize, Visualize>> page.
|
||||
* Create and view custom dashboards from the <<dashboard, Dashboard>> page.
|
||||
|
||||
For a brief tutorial that explores these core Kibana concepts, take a look at the <<getting-started, Getting
|
||||
For a tutorial that explores these core Kibana concepts, take a look at the <<getting-started, Getting
|
||||
Started>> page.
|
||||
|
|
|
@ -2,9 +2,10 @@ The `String` field formatter can apply the following transformations to the fiel
|
|||
|
||||
* Convert to lowercase
|
||||
* Convert to uppercase
|
||||
* Convert to title case
|
||||
* Apply the short dots transformation, which replaces the content before a `.` character with the first character of
|
||||
that content, as in the following example:
|
||||
|
||||
[horizontal]
|
||||
*Original*:: *Becomes*
|
||||
`com.organizations.project.ClassName`:: `c.o.p.ClassName`
|
||||
`com.organizations.project.ClassName`:: `c.o.p.ClassName`
|
||||
|
|
|
@ -50,7 +50,7 @@ intervals in the histogram.
|
|||
*Range*:: With a {ref}search-aggregations-bucket-range-aggregation.html[_range_] aggregation, you can specify ranges
|
||||
of values for a numeric field. Click *Add Range* to add a set of range endpoints. Click the red *(x)* symbol to remove
|
||||
a range.
|
||||
After changing options, click the green *Apply changes* button to update your visualization, or the grey *Discard
|
||||
After changing options, click the *Apply changes* button to update your visualization, or the grey *Discard
|
||||
changes* button to keep your visualization in its current state.
|
||||
*Date Range*:: A {ref}search-aggregations-bucket-daterange-aggregation.html[_date range_] aggregation reports values
|
||||
that are within a range of dates that you specify. You can specify the ranges for the dates using
|
||||
|
@ -78,9 +78,7 @@ Enter a string in the *Custom Label* field to change the display label.
|
|||
You can click the *Advanced* link to display more customization options for your metrics or bucket aggregation:
|
||||
|
||||
*Exclude Pattern*:: Specify a pattern in this field to exclude from the results.
|
||||
*Exclude Pattern Flags*:: A standard set of Java flags for the exclusion pattern.
|
||||
*Include Pattern*:: Specify a pattern in this field to include in the results.
|
||||
*Include Pattern Flags*:: A standard set of Java flags for the inclusion pattern.
|
||||
*JSON Input*:: A text field where you can add specific JSON-formatted properties to merge with the aggregation
|
||||
definition, as in the following example:
|
||||
|
||||
|
@ -123,7 +121,7 @@ in the lower right corner.
|
|||
* *WMS styles*: A comma-separated list of the styles to use in this visualization. Each map server provides its own styling
|
||||
options.
|
||||
|
||||
After changing options, click the green *Apply changes* button to update your visualization, or the grey *Discard
|
||||
After changing options, click the *Apply changes* button to update your visualization, or the grey *Discard
|
||||
changes* button to keep your visualization in its current state.
|
||||
|
||||
[float]
|
||||
|
|
|
@ -43,9 +43,7 @@ Enter a string in the *Custom Label* field to change the display label.
|
|||
You can click the *Advanced* link to display more customization options for your metrics or bucket aggregation:
|
||||
|
||||
*Exclude Pattern*:: Specify a pattern in this field to exclude from the results.
|
||||
*Exclude Pattern Flags*:: A standard set of Java flags for the exclusion pattern.
|
||||
*Include Pattern*:: Specify a pattern in this field to include in the results.
|
||||
*Include Pattern Flags*:: A standard set of Java flags for the inclusion pattern.
|
||||
*JSON Input*:: A text field where you can add specific JSON-formatted properties to merge with the aggregation
|
||||
definition, as in the following example:
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[[visualize]]
|
||||
== Visualize
|
||||
|
||||
You can use the _Visualize_ page to design data visualizations. You can save these visualizations, use
|
||||
them individually, or combine visualizations into a _dashboard_. A visualization can be based on one of the following
|
||||
You can use the _Visualize_ page to design data visualizations. You can save these visualizations, use them
|
||||
individually, or combine visualizations into a _dashboard_. A visualization can be based on one of the following
|
||||
data source types:
|
||||
|
||||
* A new interactive search
|
||||
|
@ -15,9 +15,9 @@ Visualizations are based on the {ref}search-aggregations.html[aggregation] featu
|
|||
[[createvis]]
|
||||
=== Creating a New Visualization
|
||||
|
||||
To start the New Visualization wizard, click on the *Visualize* tab at the top left of the page. If you are already
|
||||
creating a visualization, you can click the *New Visualization* button image:images/K4NewDocument.png[New Document
|
||||
button] in the toolbar to the right of the search bar. The wizard guides you through the following steps:
|
||||
Click on the *Visualize* image:images/visualize-icon.png[chart icon] tab in the left-hand navigation bar. If you are
|
||||
already creating a visualization, you can click the *New* button in the toolbar. To set up your visualization, follow
|
||||
these steps:
|
||||
|
||||
[float]
|
||||
[[newvis01]]
|
||||
|
@ -38,8 +38,8 @@ dashboard.
|
|||
<<vertical-bar-chart,Vertical bar chart>>:: Use vertical bar charts as a general-purpose chart.
|
||||
|
||||
You can also load a saved visualization that you created earlier. The saved visualization selector includes a text
|
||||
field to filter by visualization name and a link to the Object Editor, accessible through *Settings > Edit Saved
|
||||
Objects*, to manage your saved visualizations.
|
||||
field to filter by visualization name and a link to the Object Editor, accessible through *Settings > Objects*, to
|
||||
manage your saved visualizations.
|
||||
|
||||
If your new visualization is a Markdown widget, selecting that type takes you to a text entry field where you enter the
|
||||
text to display in the widget. For all other types of visualization, selecting the type takes you to data source
|
||||
|
@ -128,7 +128,7 @@ inside each bucket, which in this example is a one-hour interval.
|
|||
|
||||
NOTE: Remember, each subsequent bucket slices the data from the previous bucket.
|
||||
|
||||
To render the visualization on the _preview canvas_, click the green *Apply Changes* button at the top right of the
|
||||
To render the visualization on the _preview canvas_, click the *Apply Changes* button at the top right of the
|
||||
Aggregation Builder.
|
||||
|
||||
You can learn more about aggregation and how altering the order of aggregations affects your visualizations
|
||||
|
@ -143,7 +143,7 @@ include::filter-pinning.asciidoc[]
|
|||
===== Preview Canvas
|
||||
|
||||
The preview canvas displays a preview of the visualization you've defined in the aggregation builder. To refresh the
|
||||
visualization preview, clicking the *Refresh* button image:images/K4Refresh.png[Refresh button] on the toolbar.
|
||||
visualization preview, clicking the *Apply Changes* image:images/apply-changes-button.png[] button on the toolbar.
|
||||
|
||||
include::area.asciidoc[]
|
||||
|
||||
|
|
|
@ -21,6 +21,6 @@ aggregation returns the percentile rankings for the values in the numeric field
|
|||
from the drop-down, then specify one or more percentile rank values in the *Values* fields. Click the *X* to remove a
|
||||
values field. Click *+Add* to add a values field.
|
||||
|
||||
You can add an aggregation by clicking the *+ Add Aggregation* button.
|
||||
You can add an aggregation by clicking the *+ Add Metrics* button.
|
||||
|
||||
Enter a string in the *Custom Label* field to change the display label.
|
||||
|
|
11
package.json
|
@ -16,7 +16,6 @@
|
|||
"number": 8467,
|
||||
"sha": "6cb7fec4e154faa0a4a3fee4b33dfef91b9870d9"
|
||||
},
|
||||
"main": "src/server/KbnServer.js",
|
||||
"homepage": "https://www.elastic.co/products/kibana",
|
||||
"bugs": {
|
||||
"url": "http://github.com/elastic/kibana/issues"
|
||||
|
@ -68,6 +67,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@bigfunger/decompress-zip": "0.2.0-stripfix2",
|
||||
"@elastic/datemath": "2.2.0",
|
||||
"@spalger/angular-bootstrap": "0.12.1",
|
||||
"@spalger/filesaver": "1.1.2",
|
||||
"@spalger/leaflet-draw": "0.2.3",
|
||||
|
@ -127,9 +127,11 @@
|
|||
"mkdirp": "0.5.1",
|
||||
"moment": "2.10.6",
|
||||
"moment-timezone": "0.4.1",
|
||||
"node-uuid": "1.4.7",
|
||||
"raw-loader": "0.5.1",
|
||||
"request": "2.61.0",
|
||||
"rimraf": "2.4.3",
|
||||
"rison-node": "1.0.0",
|
||||
"rjs-repack-loader": "1.0.6",
|
||||
"script-loader": "0.6.1",
|
||||
"semver": "5.1.0",
|
||||
|
@ -143,7 +145,7 @@
|
|||
"wreck": "6.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@elastic/eslint-config-kibana": "0.0.2",
|
||||
"@elastic/eslint-config-kibana": "0.0.3",
|
||||
"Nonsense": "0.1.2",
|
||||
"angular-mocks": "1.4.7",
|
||||
"auto-release-sinon": "1.0.3",
|
||||
|
@ -188,10 +190,11 @@
|
|||
"simple-git": "1.8.0",
|
||||
"sinon": "1.17.2",
|
||||
"source-map": "0.4.4",
|
||||
"source-map-support": "0.4.0",
|
||||
"supertest-as-promised": "2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "4.3.2",
|
||||
"npm": "2.14.22"
|
||||
"node": "4.4.4",
|
||||
"npm": "2.15.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Server } from 'hapi';
|
|||
import { notFound } from 'boom';
|
||||
import { merge, sample } from 'lodash';
|
||||
import { format as formatUrl } from 'url';
|
||||
import { fromNode } from 'bluebird';
|
||||
import { map, fromNode } from 'bluebird';
|
||||
import { Agent as HttpsAgent } from 'https';
|
||||
import { readFileSync } from 'fs';
|
||||
|
||||
|
@ -40,7 +40,7 @@ export default class BasePathProxy {
|
|||
}
|
||||
|
||||
setupRoutes() {
|
||||
const { server, basePath, targetPort } = this;
|
||||
const { clusterManager, server, basePath, targetPort } = this;
|
||||
|
||||
server.route({
|
||||
method: 'GET',
|
||||
|
@ -53,6 +53,28 @@ export default class BasePathProxy {
|
|||
server.route({
|
||||
method: '*',
|
||||
path: `${basePath}/{kbnPath*}`,
|
||||
config: {
|
||||
pre: [
|
||||
(req, reply) => {
|
||||
map(clusterManager.workers, worker => {
|
||||
if (worker.type === 'server' && !worker.listening && !worker.crashed) {
|
||||
return fromNode(cb => {
|
||||
const done = () => {
|
||||
worker.removeListener('listening', done);
|
||||
worker.removeListener('crashed', done);
|
||||
cb();
|
||||
};
|
||||
|
||||
worker.on('listening', done);
|
||||
worker.on('crashed', done);
|
||||
});
|
||||
}
|
||||
})
|
||||
.return(undefined)
|
||||
.nodeify(reply);
|
||||
}
|
||||
],
|
||||
},
|
||||
handler: {
|
||||
proxy: {
|
||||
passThrough: true,
|
||||
|
|
|
@ -28,8 +28,12 @@ module.exports = class Worker extends EventEmitter {
|
|||
this.title = opts.title || opts.type;
|
||||
this.watch = (opts.watch !== false);
|
||||
this.startCount = 0;
|
||||
this.online = false;
|
||||
this.listening = false;
|
||||
|
||||
// status flags
|
||||
this.online = false; // the fork can accept messages
|
||||
this.listening = false; // the fork is listening for connections
|
||||
this.crashed = false; // the fork crashed
|
||||
|
||||
this.changes = [];
|
||||
|
||||
this.forkBinder = null; // defined when the fork is
|
||||
|
@ -56,8 +60,10 @@ module.exports = class Worker extends EventEmitter {
|
|||
this.online = false;
|
||||
this.listening = false;
|
||||
this.emit('fork:exit');
|
||||
this.crashed = code > 0;
|
||||
|
||||
if (code) {
|
||||
if (this.crashed) {
|
||||
this.emit('crashed');
|
||||
this.log.bad(`${this.title} crashed`, 'with status code', code);
|
||||
if (!this.watch) process.exit(code);
|
||||
} else {
|
||||
|
@ -85,7 +91,7 @@ module.exports = class Worker extends EventEmitter {
|
|||
this.processBinder.destroy();
|
||||
|
||||
// wait until the cluster reports this fork has exitted, then resolve
|
||||
await new Promise(cb => this.once('fork:exit', cb));
|
||||
await new Promise(resolve => this.once('fork:exit', resolve));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,6 +115,7 @@ module.exports = class Worker extends EventEmitter {
|
|||
onOnline() {
|
||||
this.online = true;
|
||||
this.emit('fork:online');
|
||||
this.crashed = false;
|
||||
}
|
||||
|
||||
onDisconnect() {
|
||||
|
@ -143,7 +150,7 @@ module.exports = class Worker extends EventEmitter {
|
|||
this.forkBinder = new BinderFor(this.fork);
|
||||
|
||||
// when the fork sends a message, comes online, or looses it's connection, then react
|
||||
this.forkBinder.on('message', (msg) => this.parseIncomingMessage(msg));
|
||||
this.forkBinder.on('message', msg => this.parseIncomingMessage(msg));
|
||||
this.forkBinder.on('online', () => this.onOnline());
|
||||
this.forkBinder.on('disconnect', () => this.onDisconnect());
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ Command.prototype.parseOptions = _.wrap(Command.prototype.parseOptions, function
|
|||
|
||||
Command.prototype.action = _.wrap(Command.prototype.action, function (action, fn) {
|
||||
return action.call(this, function (...args) {
|
||||
var ret = fn.apply(this, args);
|
||||
let ret = fn.apply(this, args);
|
||||
if (ret && typeof ret.then === 'function') {
|
||||
ret.then(null, function (e) {
|
||||
console.log('FATAL CLI ERROR', e.stack);
|
||||
|
|
|
@ -69,6 +69,6 @@ ${indent(cmd.optionHelp(), 2)}
|
|||
}
|
||||
|
||||
function humanReadableArgName(arg) {
|
||||
var nameOutput = arg.name + (arg.variadic === true ? '...' : '');
|
||||
let nameOutput = arg.name + (arg.variadic === true ? '...' : '');
|
||||
return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']';
|
||||
}
|
||||
|
|
48
src/cli/serve/__tests__/deprecated_config.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
import expect from 'expect.js';
|
||||
import { set } from 'lodash';
|
||||
import { checkForDeprecatedConfig } from '../deprecated_config';
|
||||
import sinon from 'auto-release-sinon';
|
||||
|
||||
describe('cli/serve/deprecated_config', function () {
|
||||
it('passes original config through', function () {
|
||||
const config = {};
|
||||
set(config, 'server.xsrf.token', 'xxtokenxx');
|
||||
const output = checkForDeprecatedConfig(config);
|
||||
expect(output).to.be(config);
|
||||
expect(output.server).to.be(config.server);
|
||||
expect(output.server.xsrf).to.be(config.server.xsrf);
|
||||
expect(output.server.xsrf.token).to.be(config.server.xsrf.token);
|
||||
});
|
||||
|
||||
it('logs warnings about deprecated config values', function () {
|
||||
const log = sinon.stub();
|
||||
const config = {};
|
||||
set(config, 'server.xsrf.token', 'xxtokenxx');
|
||||
checkForDeprecatedConfig(config, log);
|
||||
sinon.assert.calledOnce(log);
|
||||
expect(log.firstCall.args[0]).to.match(/server\.xsrf\.token.+deprecated/);
|
||||
});
|
||||
|
||||
describe('does not support compound.keys', function () {
|
||||
it('ignores fully compound keys', function () {
|
||||
const log = sinon.stub();
|
||||
const config = { 'server.xsrf.token': 'xxtokenxx' };
|
||||
checkForDeprecatedConfig(config, log);
|
||||
sinon.assert.notCalled(log);
|
||||
});
|
||||
|
||||
it('ignores partially compound keys', function () {
|
||||
const log = sinon.stub();
|
||||
const config = { server: { 'xsrf.token': 'xxtokenxx' } };
|
||||
checkForDeprecatedConfig(config, log);
|
||||
sinon.assert.notCalled(log);
|
||||
});
|
||||
|
||||
it('ignores partially compound keys', function () {
|
||||
const log = sinon.stub();
|
||||
const config = { 'server.xsrf': { token: 'xxtokenxx' } };
|
||||
checkForDeprecatedConfig(config, log);
|
||||
sinon.assert.notCalled(log);
|
||||
});
|
||||
});
|
||||
});
|
1
src/cli/serve/__tests__/fixtures/deprecated.yml
Normal file
|
@ -0,0 +1 @@
|
|||
server.xsrf.token: token
|
1
src/cli/serve/__tests__/fixtures/legacy.yml
Normal file
|
@ -0,0 +1 @@
|
|||
kibana_index: indexname
|
2
src/cli/serve/__tests__/fixtures/one.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
foo: 1
|
||||
bar: true
|
2
src/cli/serve/__tests__/fixtures/two.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
foo: 2
|
||||
baz: bonkers
|
28
src/cli/serve/__tests__/legacy_config.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
import expect from 'expect.js';
|
||||
import { rewriteLegacyConfig } from '../legacy_config';
|
||||
import sinon from 'auto-release-sinon';
|
||||
|
||||
describe('cli/serve/legacy_config', function () {
|
||||
it('returns a clone of the input', function () {
|
||||
const file = {};
|
||||
const output = rewriteLegacyConfig(file);
|
||||
expect(output).to.not.be(file);
|
||||
});
|
||||
|
||||
it('rewrites legacy config values with literal path replacement', function () {
|
||||
const file = { port: 4000, host: 'kibana.com' };
|
||||
const output = rewriteLegacyConfig(file);
|
||||
expect(output).to.not.be(file);
|
||||
expect(output).to.eql({
|
||||
'server.port': 4000,
|
||||
'server.host': 'kibana.com',
|
||||
});
|
||||
});
|
||||
|
||||
it('logs warnings when legacy config properties are encountered', function () {
|
||||
const log = sinon.stub();
|
||||
rewriteLegacyConfig({ port: 5555 }, log);
|
||||
sinon.assert.calledOnce(log);
|
||||
expect(log.firstCall.args[0]).to.match(/port.+deprecated.+server\.port/);
|
||||
});
|
||||
});
|
102
src/cli/serve/__tests__/read_yaml_config.js
Normal file
|
@ -0,0 +1,102 @@
|
|||
import expect from 'expect.js';
|
||||
import { join, relative, resolve } from 'path';
|
||||
import readYamlConfig from '../read_yaml_config';
|
||||
import sinon from 'auto-release-sinon';
|
||||
|
||||
function fixture(name) {
|
||||
return resolve(__dirname, 'fixtures', name);
|
||||
}
|
||||
|
||||
describe('cli/serve/read_yaml_config', function () {
|
||||
it('reads a single config file', function () {
|
||||
const config = readYamlConfig(fixture('one.yml'));
|
||||
|
||||
expect(readYamlConfig(fixture('one.yml'))).to.eql({
|
||||
foo: 1,
|
||||
bar: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('reads and merged mulitple config file', function () {
|
||||
const config = readYamlConfig([
|
||||
fixture('one.yml'),
|
||||
fixture('two.yml')
|
||||
]);
|
||||
|
||||
expect(config).to.eql({
|
||||
foo: 2,
|
||||
bar: true,
|
||||
baz: 'bonkers'
|
||||
});
|
||||
});
|
||||
|
||||
context('different cwd()', function () {
|
||||
const oldCwd = process.cwd();
|
||||
const newCwd = join(oldCwd, '..');
|
||||
|
||||
before(function () {
|
||||
process.chdir(newCwd);
|
||||
});
|
||||
|
||||
it('resolves relative files based on the cwd', function () {
|
||||
const relativePath = relative(newCwd, fixture('one.yml'));
|
||||
const config = readYamlConfig(relativePath);
|
||||
expect(config).to.eql({
|
||||
foo: 1,
|
||||
bar: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('fails to load relative paths, not found because of the cwd', function () {
|
||||
expect(function () {
|
||||
readYamlConfig(relative(oldCwd, fixture('one.yml')));
|
||||
}).to.throwException(/ENOENT/);
|
||||
});
|
||||
|
||||
after(function () {
|
||||
process.chdir(oldCwd);
|
||||
});
|
||||
});
|
||||
|
||||
context('stubbed stdout', function () {
|
||||
let stub;
|
||||
|
||||
beforeEach(function () {
|
||||
stub = sinon.stub(process.stdout, 'write');
|
||||
});
|
||||
|
||||
context('deprecated settings', function () {
|
||||
it('warns about deprecated settings', function () {
|
||||
readYamlConfig(fixture('deprecated.yml'));
|
||||
sinon.assert.calledOnce(stub);
|
||||
expect(stub.firstCall.args[0]).to.match(/deprecated/);
|
||||
stub.restore();
|
||||
});
|
||||
|
||||
it('only warns once about deprecated settings', function () {
|
||||
readYamlConfig(fixture('deprecated.yml'));
|
||||
readYamlConfig(fixture('deprecated.yml'));
|
||||
readYamlConfig(fixture('deprecated.yml'));
|
||||
sinon.assert.notCalled(stub); // already logged in previous test
|
||||
stub.restore();
|
||||
});
|
||||
});
|
||||
|
||||
context('legacy settings', function () {
|
||||
it('warns about deprecated settings', function () {
|
||||
readYamlConfig(fixture('legacy.yml'));
|
||||
sinon.assert.calledOnce(stub);
|
||||
expect(stub.firstCall.args[0]).to.match(/has been replaced/);
|
||||
stub.restore();
|
||||
});
|
||||
|
||||
it('only warns once about legacy settings', function () {
|
||||
readYamlConfig(fixture('legacy.yml'));
|
||||
readYamlConfig(fixture('legacy.yml'));
|
||||
readYamlConfig(fixture('legacy.yml'));
|
||||
sinon.assert.notCalled(stub); // already logged in previous test
|
||||
stub.restore();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
16
src/cli/serve/deprecated_config.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { forOwn, has, noop } from 'lodash';
|
||||
|
||||
// deprecated settings are still allowed, but will be removed at a later time. They
|
||||
// are checked for after the config object is prepared and known, so legacySettings
|
||||
// will have already been transformed.
|
||||
export const deprecatedSettings = new Map([
|
||||
[['server', 'xsrf', 'token'], 'server.xsrf.token is deprecated. It is no longer used when providing xsrf protection.']
|
||||
]);
|
||||
|
||||
// check for and warn about deprecated settings
|
||||
export function checkForDeprecatedConfig(object, log = noop) {
|
||||
for (const [key, msg] of deprecatedSettings.entries()) {
|
||||
if (has(object, key)) log(msg);
|
||||
}
|
||||
return object;
|
||||
}
|
47
src/cli/serve/legacy_config.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
import { noop, transform } from 'lodash';
|
||||
|
||||
// legacySettings allow kibana 4.2+ to accept the same config file that people
|
||||
// used for kibana 4.0 and 4.1. These settings are transformed to their modern
|
||||
// equivalents at the very begining of the process
|
||||
export const legacySettings = {
|
||||
// server
|
||||
port: 'server.port',
|
||||
host: 'server.host',
|
||||
pid_file: 'pid.file',
|
||||
ssl_cert_file: 'server.ssl.cert',
|
||||
ssl_key_file: 'server.ssl.key',
|
||||
|
||||
// logging
|
||||
log_file: 'logging.dest',
|
||||
|
||||
// kibana
|
||||
kibana_index: 'kibana.index',
|
||||
default_app_id: 'kibana.defaultAppId',
|
||||
|
||||
// es
|
||||
ca: 'elasticsearch.ssl.ca',
|
||||
elasticsearch_preserve_host: 'elasticsearch.preserveHost',
|
||||
elasticsearch_url: 'elasticsearch.url',
|
||||
kibana_elasticsearch_client_crt: 'elasticsearch.ssl.cert',
|
||||
kibana_elasticsearch_client_key: 'elasticsearch.ssl.key',
|
||||
kibana_elasticsearch_password: 'elasticsearch.password',
|
||||
kibana_elasticsearch_username: 'elasticsearch.username',
|
||||
ping_timeout: 'elasticsearch.pingTimeout',
|
||||
request_timeout: 'elasticsearch.requestTimeout',
|
||||
shard_timeout: 'elasticsearch.shardTimeout',
|
||||
startup_timeout: 'elasticsearch.startupTimeout',
|
||||
verify_ssl: 'elasticsearch.ssl.verify',
|
||||
};
|
||||
|
||||
// transform legacy options into new namespaced versions
|
||||
export function rewriteLegacyConfig(object, log = noop) {
|
||||
return transform(object, (clone, val, key) => {
|
||||
if (legacySettings.hasOwnProperty(key)) {
|
||||
const replacement = legacySettings[key];
|
||||
log(`Config key "${key}" is deprecated. It has been replaced with "${replacement}"`);
|
||||
clone[replacement] = val;
|
||||
} else {
|
||||
clone[key] = val;
|
||||
}
|
||||
}, {});
|
||||
}
|
|
@ -1,75 +1,40 @@
|
|||
import _ from 'lodash';
|
||||
import fs from 'fs';
|
||||
import yaml from 'js-yaml';
|
||||
import { chain, isArray, isPlainObject, forOwn, memoize, set, transform } from 'lodash';
|
||||
import { readFileSync as read } from 'fs';
|
||||
import { safeLoad } from 'js-yaml';
|
||||
import { red } from 'ansicolors';
|
||||
|
||||
import { fromRoot } from '../../utils';
|
||||
import { rewriteLegacyConfig } from './legacy_config';
|
||||
import { checkForDeprecatedConfig } from './deprecated_config';
|
||||
|
||||
let legacySettingMap = {
|
||||
// server
|
||||
port: 'server.port',
|
||||
host: 'server.host',
|
||||
pid_file: 'pid.file',
|
||||
ssl_cert_file: 'server.ssl.cert',
|
||||
ssl_key_file: 'server.ssl.key',
|
||||
const log = memoize(function (message) {
|
||||
console.log(red('WARNING:'), message);
|
||||
});
|
||||
|
||||
// logging
|
||||
log_file: 'logging.dest',
|
||||
export function merge(sources) {
|
||||
return transform(sources, (merged, source) => {
|
||||
forOwn(source, function apply(val, key) {
|
||||
if (isPlainObject(val)) {
|
||||
forOwn(val, function (subVal, subKey) {
|
||||
apply(subVal, key + '.' + subKey);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// kibana
|
||||
kibana_index: 'kibana.index',
|
||||
default_app_id: 'kibana.defaultAppId',
|
||||
if (isArray(val)) {
|
||||
set(merged, key, []);
|
||||
val.forEach((subVal, i) => apply(subVal, key + '.' + i));
|
||||
return;
|
||||
}
|
||||
|
||||
// es
|
||||
ca: 'elasticsearch.ssl.ca',
|
||||
elasticsearch_preserve_host: 'elasticsearch.preserveHost',
|
||||
elasticsearch_url: 'elasticsearch.url',
|
||||
kibana_elasticsearch_client_crt: 'elasticsearch.ssl.cert',
|
||||
kibana_elasticsearch_client_key: 'elasticsearch.ssl.key',
|
||||
kibana_elasticsearch_password: 'elasticsearch.password',
|
||||
kibana_elasticsearch_username: 'elasticsearch.username',
|
||||
ping_timeout: 'elasticsearch.pingTimeout',
|
||||
request_timeout: 'elasticsearch.requestTimeout',
|
||||
shard_timeout: 'elasticsearch.shardTimeout',
|
||||
startup_timeout: 'elasticsearch.startupTimeout',
|
||||
verify_ssl: 'elasticsearch.ssl.verify',
|
||||
};
|
||||
|
||||
const deprecatedSettings = {
|
||||
'server.xsrf.token': 'server.xsrf.token is deprecated. It is no longer used when providing xsrf protection.'
|
||||
};
|
||||
|
||||
module.exports = function (path) {
|
||||
if (!path) return {};
|
||||
|
||||
let file = yaml.safeLoad(fs.readFileSync(path, 'utf8'));
|
||||
|
||||
function apply(config, val, key) {
|
||||
if (_.isPlainObject(val)) {
|
||||
_.forOwn(val, function (subVal, subKey) {
|
||||
apply(config, subVal, key + '.' + subKey);
|
||||
});
|
||||
}
|
||||
else if (_.isArray(val)) {
|
||||
config[key] = [];
|
||||
val.forEach((subVal, i) => {
|
||||
apply(config, subVal, key + '.' + i);
|
||||
});
|
||||
}
|
||||
else {
|
||||
_.set(config, key, val);
|
||||
}
|
||||
}
|
||||
|
||||
_.each(deprecatedSettings, function (message, setting) {
|
||||
if (_.has(file, setting)) console.error(message);
|
||||
});
|
||||
|
||||
// transform legeacy options into new namespaced versions
|
||||
return _.transform(file, function (config, val, key) {
|
||||
if (legacySettingMap.hasOwnProperty(key)) {
|
||||
key = legacySettingMap[key];
|
||||
}
|
||||
|
||||
apply(config, val, key);
|
||||
set(merged, key, val);
|
||||
});
|
||||
}, {});
|
||||
};
|
||||
}
|
||||
|
||||
export default function (paths) {
|
||||
const files = [].concat(paths || []);
|
||||
const yamls = files.map(path => safeLoad(read(path, 'utf8')));
|
||||
const config = merge(yamls.map(file => rewriteLegacyConfig(file, log)));
|
||||
return checkForDeprecatedConfig(config, log);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import _ from 'lodash';
|
||||
import { statSync } from 'fs';
|
||||
import { isWorker } from 'cluster';
|
||||
import { resolve } from 'path';
|
||||
import { fromRoot } from '../../utils';
|
||||
|
||||
const cwd = process.cwd();
|
||||
import readYamlConfig from './read_yaml_config';
|
||||
|
||||
let canCluster;
|
||||
try {
|
||||
|
@ -21,6 +21,7 @@ const pathCollector = function () {
|
|||
};
|
||||
};
|
||||
|
||||
const configPathCollector = pathCollector();
|
||||
const pluginDirCollector = pathCollector();
|
||||
const pluginPathCollector = pathCollector();
|
||||
|
||||
|
@ -32,11 +33,6 @@ function readServerSettings(opts, extraCliOptions) {
|
|||
const has = _.partial(_.has, settings);
|
||||
const merge = _.partial(_.merge, settings);
|
||||
|
||||
if (opts.dev) {
|
||||
try { merge(readYamlConfig(fromRoot('config/kibana.dev.yml'))); }
|
||||
catch (e) { null; }
|
||||
}
|
||||
|
||||
if (opts.dev) {
|
||||
set('env', 'development');
|
||||
set('optimize.lazy', true);
|
||||
|
@ -79,8 +75,11 @@ module.exports = function (program) {
|
|||
.option('-e, --elasticsearch <uri>', 'Elasticsearch instance')
|
||||
.option(
|
||||
'-c, --config <path>',
|
||||
'Path to the config file, can be changed with the CONFIG_PATH environment variable as well',
|
||||
process.env.CONFIG_PATH || fromRoot('config/kibana.yml'))
|
||||
'Path to the config file, can be changed with the CONFIG_PATH environment variable as well. ' +
|
||||
'Use mulitple --config args to include multiple config files.',
|
||||
configPathCollector,
|
||||
[ process.env.CONFIG_PATH || fromRoot('config/kibana.yml') ]
|
||||
)
|
||||
.option('-p, --port <port>', 'The port to bind to', parseInt)
|
||||
.option('-q, --quiet', 'Prevent all logging except errors')
|
||||
.option('-Q, --silent', 'Prevent all logging')
|
||||
|
@ -116,6 +115,17 @@ module.exports = function (program) {
|
|||
|
||||
command
|
||||
.action(async function (opts) {
|
||||
if (opts.dev) {
|
||||
try {
|
||||
const kbnDevConfig = fromRoot('config/kibana.dev.yml');
|
||||
if (statSync(kbnDevConfig).isFile()) {
|
||||
opts.config.push(kbnDevConfig);
|
||||
}
|
||||
} catch (err) {
|
||||
// ignore, kibana.dev.yml does not exist
|
||||
}
|
||||
}
|
||||
|
||||
const getCurrentSettings = () => readServerSettings(opts, this.getUnknownOptions());
|
||||
const settings = getCurrentSettings();
|
||||
|
||||
|
@ -135,8 +145,11 @@ module.exports = function (program) {
|
|||
catch (err) {
|
||||
const { server } = kbnServer;
|
||||
|
||||
if (server) server.log(['fatal'], err);
|
||||
console.error('FATAL', err);
|
||||
if (err.code === 'EADDRINUSE') {
|
||||
logFatal(`Port ${err.port} is already in use. Another instance of Kibana may be running!`, server);
|
||||
} else {
|
||||
logFatal(err, server);
|
||||
}
|
||||
|
||||
kbnServer.close();
|
||||
process.exit(1); // eslint-disable-line no-process-exit
|
||||
|
@ -152,3 +165,10 @@ module.exports = function (program) {
|
|||
return kbnServer;
|
||||
});
|
||||
};
|
||||
|
||||
function logFatal(message, server) {
|
||||
if (server) {
|
||||
server.log(['fatal'], message);
|
||||
}
|
||||
console.error('FATAL', message);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ program
|
|||
.command('help <command>')
|
||||
.description('get the help for a specific command')
|
||||
.action(function (cmdName) {
|
||||
var cmd = _.find(program.commands, { _name: cmdName });
|
||||
let cmd = _.find(program.commands, { _name: cmdName });
|
||||
if (!cmd) return program.error(`unknown command ${cmdName}`);
|
||||
cmd.help();
|
||||
});
|
||||
|
@ -35,7 +35,7 @@ program
|
|||
});
|
||||
|
||||
// check for no command name
|
||||
var subCommand = argv[2] && !String(argv[2][0]).match(/^-|^\.|\//);
|
||||
let subCommand = argv[2] && !String(argv[2][0]).match(/^-|^\.|\//);
|
||||
if (!subCommand) {
|
||||
program.defaultHelp();
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import glob from 'glob-all';
|
|||
import rimraf from 'rimraf';
|
||||
import mkdirp from 'mkdirp';
|
||||
import Logger from '../../lib/logger';
|
||||
import { UnsupportedProtocolError } from '../../lib/errors';
|
||||
import { download, _downloadSingle } from '../download';
|
||||
import { join } from 'path';
|
||||
|
||||
|
@ -74,12 +75,12 @@ describe('kibana cli', function () {
|
|||
});
|
||||
});
|
||||
|
||||
it('should throw an ENOTFOUND error for an invalid url', function () {
|
||||
it('should throw an UnsupportedProtocolError for an invalid url', function () {
|
||||
const sourceUrl = 'i am an invalid url';
|
||||
|
||||
return _downloadSingle(settings, logger, sourceUrl)
|
||||
.then(shouldReject, function (err) {
|
||||
expect(err.message).to.match(/ENOTFOUND/);
|
||||
expect(err).to.be.an(UnsupportedProtocolError);
|
||||
expectWorkingPathEmpty();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -175,7 +175,7 @@ describe('kibana cli', function () {
|
|||
|
||||
const expected = [
|
||||
command,
|
||||
`https://download.elastic.co/packs/${command}/${command}-1234.zip`
|
||||
`https://download.elastic.co/kibana/${command}/${command}-1234.zip`
|
||||
];
|
||||
|
||||
expect(settings.urls).to.eql(expected);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import downloadHttpFile from './downloaders/http';
|
||||
import downloadLocalFile from './downloaders/file';
|
||||
import { UnsupportedProtocolError } from '../lib/errors';
|
||||
import { parse } from 'url';
|
||||
|
||||
export function _downloadSingle(settings, logger, sourceUrl) {
|
||||
|
@ -8,8 +9,10 @@ export function _downloadSingle(settings, logger, sourceUrl) {
|
|||
|
||||
if (/^file/.test(urlInfo.protocol)) {
|
||||
downloadPromise = downloadLocalFile(logger, decodeURI(urlInfo.path), settings.tempArchiveFile);
|
||||
} else {
|
||||
} else if (/^https?/.test(urlInfo.protocol)) {
|
||||
downloadPromise = downloadHttpFile(logger, sourceUrl, settings.tempArchiveFile, settings.timeout);
|
||||
} else {
|
||||
downloadPromise = Promise.reject(new UnsupportedProtocolError());
|
||||
}
|
||||
|
||||
return downloadPromise;
|
||||
|
@ -29,7 +32,9 @@ export function download(settings, logger) {
|
|||
|
||||
return _downloadSingle(settings, logger, sourceUrl)
|
||||
.catch((err) => {
|
||||
if (err.message === 'ENOTFOUND') {
|
||||
const isUnsupportedProtocol = err instanceof UnsupportedProtocolError;
|
||||
const isDownloadResourceNotFound = err.message === 'ENOTFOUND';
|
||||
if (isUnsupportedProtocol || isDownloadResourceNotFound) {
|
||||
return tryNext();
|
||||
}
|
||||
throw (err);
|
||||
|
|
|
@ -40,8 +40,8 @@ export default function pluginInstall(program) {
|
|||
)
|
||||
.description('install a plugin',
|
||||
`Common examples:
|
||||
install xpack
|
||||
install file:///Path/to/my/xpack.zip
|
||||
install https://path.to/my/xpack.zip`)
|
||||
install x-pack
|
||||
install file:///Path/to/my/x-pack.zip
|
||||
install https://path.to/my/x-pack.zip`)
|
||||
.action(processCommand);
|
||||
};
|
||||
|
|
|
@ -87,8 +87,9 @@ async function mergePackageData(settings, packages) {
|
|||
*/
|
||||
async function extractArchive(settings) {
|
||||
const filter = {
|
||||
paths: [ settings.plugins[0].folder ]
|
||||
paths: [ `kibana/${settings.plugins[0].folder}` ]
|
||||
};
|
||||
|
||||
await extractFiles(settings.tempArchiveFile, settings.workingPath, 2, filter);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import { arch, platform } from 'os';
|
|||
function generateUrls({ version, plugin }) {
|
||||
return [
|
||||
plugin,
|
||||
`https://download.elastic.co/packs/${plugin}/${plugin}-${version}.zip`
|
||||
`https://download.elastic.co/kibana/${plugin}/${plugin}-${version}.zip`
|
||||
];
|
||||
}
|
||||
|
||||
|
|
1
src/cli_plugin/lib/errors.js
Normal file
|
@ -0,0 +1 @@
|
|||
export class UnsupportedProtocolError extends Error {};
|
|
@ -34,6 +34,6 @@ export default function pluginRemove(program) {
|
|||
)
|
||||
.description('remove a plugin',
|
||||
`common examples:
|
||||
remove xpack`)
|
||||
remove x-pack`)
|
||||
.action(processCommand);
|
||||
};
|
||||
|
|
|
@ -17,23 +17,23 @@ export default function GeoHashGridAggResponseFixture() {
|
|||
// },
|
||||
// });
|
||||
|
||||
var geoHashCharts = _.union(
|
||||
let geoHashCharts = _.union(
|
||||
_.range(48, 57), // 0-9
|
||||
_.range(65, 90), // A-Z
|
||||
_.range(97, 122) // a-z
|
||||
);
|
||||
|
||||
var totalDocCount = 0;
|
||||
let totalDocCount = 0;
|
||||
|
||||
var tags = _.times(_.random(4, 20), function (i) {
|
||||
let tags = _.times(_.random(4, 20), function (i) {
|
||||
// random number of tags
|
||||
var docCount = 0;
|
||||
var buckets = _.times(_.random(40, 200), function () {
|
||||
let docCount = 0;
|
||||
let buckets = _.times(_.random(40, 200), function () {
|
||||
return _.sample(geoHashCharts, 3).join('');
|
||||
})
|
||||
.sort()
|
||||
.map(function (geoHash) {
|
||||
var count = _.random(1, 5000);
|
||||
let count = _.random(1, 5000);
|
||||
|
||||
totalDocCount += count;
|
||||
docCount += count;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var results = {};
|
||||
let results = {};
|
||||
|
||||
results.timeSeries = {
|
||||
data: {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var data = { };
|
||||
let data = { };
|
||||
|
||||
data.metricOnly = {
|
||||
hits: { total: 1000, hits: [], max_score: 0 },
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
var longString = Array(200).join('_');
|
||||
let longString = Array(200).join('_');
|
||||
|
||||
export default function (id, mapping) {
|
||||
function fakeVals(type) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function stubbedLogstashFields() {
|
||||
var sourceData = [
|
||||
let sourceData = [
|
||||
{ name: 'bytes', type: 'number', indexed: true, analyzed: true, sortable: true, filterable: true, count: 10 },
|
||||
{ name: 'ssl', type: 'boolean', indexed: true, analyzed: true, sortable: true, filterable: true, count: 20 },
|
||||
{ name: '@timestamp', type: 'date', indexed: true, analyzed: true, sortable: true, filterable: true, count: 30 },
|
||||
|
|
|
@ -3,11 +3,11 @@ import sinon from 'auto-release-sinon';
|
|||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
|
||||
export default function (Private, Promise) {
|
||||
var indexPatterns = Private(FixturesStubbedLogstashIndexPatternProvider);
|
||||
var getIndexPatternStub = sinon.stub();
|
||||
let indexPatterns = Private(FixturesStubbedLogstashIndexPatternProvider);
|
||||
let getIndexPatternStub = sinon.stub();
|
||||
getIndexPatternStub.returns(Promise.resolve(indexPatterns));
|
||||
|
||||
var courier = {
|
||||
let courier = {
|
||||
indexPatterns: { get: getIndexPatternStub },
|
||||
getStub: getIndexPatternStub
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import _ from 'lodash';
|
||||
var keys = {};
|
||||
let keys = {};
|
||||
export default {
|
||||
get: function (path, def) {
|
||||
return keys[path] == null ? def : keys[path];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import FixturesLogstashFieldsProvider from 'fixtures/logstash_fields';
|
||||
|
||||
function stubbedDocSourceResponse(Private) {
|
||||
var mockLogstashFields = Private(FixturesLogstashFieldsProvider);
|
||||
let mockLogstashFields = Private(FixturesLogstashFieldsProvider);
|
||||
|
||||
return function (id, index) {
|
||||
index = index || '.kibana';
|
||||
|
|
|
@ -3,21 +3,21 @@ import TestUtilsStubIndexPatternProvider from 'test_utils/stub_index_pattern';
|
|||
import IndexPatternsFieldTypesProvider from 'ui/index_patterns/_field_types';
|
||||
import FixturesLogstashFieldsProvider from 'fixtures/logstash_fields';
|
||||
export default function stubbedLogstashIndexPatternService(Private) {
|
||||
var StubIndexPattern = Private(TestUtilsStubIndexPatternProvider);
|
||||
var fieldTypes = Private(IndexPatternsFieldTypesProvider);
|
||||
var mockLogstashFields = Private(FixturesLogstashFieldsProvider);
|
||||
let StubIndexPattern = Private(TestUtilsStubIndexPatternProvider);
|
||||
let fieldTypes = Private(IndexPatternsFieldTypesProvider);
|
||||
let mockLogstashFields = Private(FixturesLogstashFieldsProvider);
|
||||
|
||||
|
||||
var fields = mockLogstashFields.map(function (field) {
|
||||
let fields = mockLogstashFields.map(function (field) {
|
||||
field.displayName = field.name;
|
||||
var type = fieldTypes.byName[field.type];
|
||||
let type = fieldTypes.byName[field.type];
|
||||
if (!type) throw new TypeError('unknown type ' + field.type);
|
||||
if (!_.has(field, 'sortable')) field.sortable = type.sortable;
|
||||
if (!_.has(field, 'filterable')) field.filterable = type.filterable;
|
||||
return field;
|
||||
});
|
||||
|
||||
var indexPattern = new StubIndexPattern('logstash-*', 'time', fields);
|
||||
let indexPattern = new StubIndexPattern('logstash-*', 'time', fields);
|
||||
indexPattern.id = 'logstash-*';
|
||||
|
||||
return indexPattern;
|
||||
|
|
|
@ -3,8 +3,8 @@ import searchResponse from 'fixtures/search_response';
|
|||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
|
||||
export default function stubSearchSource(Private, $q, Promise) {
|
||||
var deferedResult = $q.defer();
|
||||
var indexPattern = Private(FixturesStubbedLogstashIndexPatternProvider);
|
||||
let deferedResult = $q.defer();
|
||||
let indexPattern = Private(FixturesStubbedLogstashIndexPatternProvider);
|
||||
|
||||
return {
|
||||
sort: sinon.spy(),
|
||||
|
|
|
@ -2,7 +2,7 @@ import _ from 'lodash';
|
|||
import $ from 'jquery';
|
||||
import VislibVisProvider from 'ui/vislib/vis';
|
||||
|
||||
var $visCanvas = $('<div>')
|
||||
let $visCanvas = $('<div>')
|
||||
.attr('id', 'vislib-vis-fixtures')
|
||||
.css({
|
||||
height: '500px',
|
||||
|
@ -15,8 +15,8 @@ var $visCanvas = $('<div>')
|
|||
})
|
||||
.appendTo('body');
|
||||
|
||||
var count = 0;
|
||||
var visHeight = $visCanvas.height();
|
||||
let count = 0;
|
||||
let visHeight = $visCanvas.height();
|
||||
|
||||
$visCanvas.new = function () {
|
||||
count += 1;
|
||||
|
@ -32,7 +32,7 @@ afterEach(function () {
|
|||
|
||||
module.exports = function VislibFixtures(Private) {
|
||||
return function (visLibParams) {
|
||||
var Vis = Private(VislibVisProvider);
|
||||
let Vis = Private(VislibVisProvider);
|
||||
return new Vis($visCanvas.new(), _.defaults({}, visLibParams || {}, {
|
||||
shareYAxis: true,
|
||||
addTooltip: true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { cloneDeep } from 'lodash';
|
||||
var fromRoot = require('path').resolve.bind(null, __dirname, '../../');
|
||||
let fromRoot = require('path').resolve.bind(null, __dirname, '../../');
|
||||
|
||||
if (!process.env.BABEL_CACHE_PATH) {
|
||||
process.env.BABEL_CACHE_PATH = fromRoot('optimize/.babelcache.json');
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
var cloneDeep = require('lodash').cloneDeep;
|
||||
var fromRoot = require('path').resolve.bind(null, __dirname, '../../');
|
||||
// this file is not transpiled
|
||||
'use strict'; // eslint-disable-line strict
|
||||
|
||||
let cloneDeep = require('lodash').cloneDeep;
|
||||
let fromRoot = require('path').resolve.bind(null, __dirname, '../../');
|
||||
|
||||
if (!process.env.BABEL_CACHE_PATH) {
|
||||
process.env.BABEL_CACHE_PATH = fromRoot('optimize/.babelcache.json');
|
||||
|
|