Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
simianhacker committed Jan 17, 2017
2 parents 1e64c7c + 64a03fa commit b4ce642
Show file tree
Hide file tree
Showing 283 changed files with 4,723 additions and 830 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ selenium
*.swp
*.swo
*.out
src/ui_framework/doc_site/build/*.js*
ui_framework/doc_site/build/*.js*
3 changes: 3 additions & 0 deletions docs/development/core-development.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
* <<development-basepath>>
* <<development-dependencies>>
* <<development-modules>>
* <<development-elasticsearch>>

include::core/development-basepath.asciidoc[]

include::core/development-dependencies.asciidoc[]

include::core/development-modules.asciidoc[]

include::plugin/development-elasticsearch.asciidoc[]
1 change: 1 addition & 0 deletions docs/development/plugin-development.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The Kibana plugin interfaces are in a state of constant development. We cannot
* <<development-plugin-resources>>
* <<development-uiexports>>


include::plugin/development-plugin-resources.asciidoc[]

include::plugin/development-uiexports.asciidoc[]
41 changes: 41 additions & 0 deletions docs/development/plugin/development-elasticsearch.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[[development-elasticsearch]]
=== Communicating with Elasticsearch

Kibana exposes two clients on the server and browser for communicating with elasticsearch.
There is an 'admin' client which is used for managing Kibana's state, and a 'data' client for all
other requests. The clients use the https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html[elasticsearch.js library].

[float]
[[client-server]]
=== Server clients

Server clients are exposed through the elasticsearch plugin.
[source,javascript]
----
const adminCluster = server.plugins.elasticsearch.getCluster('admin);
const dataCluster = server.plugins.elasticsearch.getCluster('data);
//ping as the configured elasticsearch.user in kibana.yml
adminCluster.callWithInternalUser('ping');
//ping as the user specified in the current requests header
adminCluster.callWithRequest(req, 'ping');
----

[float]
[[client-browser]]
=== Browser clients

Browser clients are exposed through AngularJS services.

[source,javascript]
----
uiModules.get('kibana')
.run(function (esAdmin, es) {
es.ping()
.then(() => esAdmin.ping())
.catch(err => {
console.log('error pinging servers');
});
});
----
2 changes: 1 addition & 1 deletion docs/getting-started/tutorial-define-index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Each set of data loaded to Elasticsearch has an 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
case, a typical index name contains the date in YYYY.MM.DD 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
Expand Down
17 changes: 15 additions & 2 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ 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
increase request processing time.
`courier:ignoreFilterIfFieldNotInIndex`:: Set this property to `true` to skip filters that apply to fields that don't exist in a visualization's index. Useful when dashboards consist of visualizations from multiple index patterns.
`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
Expand All @@ -47,16 +48,17 @@ when necessary.
`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.
`visualization:dimmingOpacity`:: When part of a visualization is highlighted, by hovering over it for example, ths is the opacity applied to the other elements. A higher number means other elements will be less opaque.
`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
values are shown.
`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`.
`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
truncation.
`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.
`indexPattern:placeholder`:: The default placeholder value used when adding a new index pattern to Kibana.
`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.
Expand All @@ -74,3 +76,14 @@ Markdown.
`notifications:lifetime:error`:: Specifies the duration in milliseconds for error notification displays. The default value is 300000. Set this field to `Infinity` to disable error notifications.
`notifications:lifetime:warning`:: Specifies the duration in milliseconds for warning notification displays. The default value is 10000. Set this field to `Infinity` to disable warning notifications.
`notifications:lifetime:info`:: Specifies the duration in milliseconds for information notification displays. The default value is 5000. Set this field to `Infinity` to disable information notifications.

`timelion:showTutorial`:: Set this property to `true` to show the Timelion tutorial to users when they first open Timelion.
`timelion:es.timefield`:: Default field containing a timestamp when using the `.es()` query.
`timelion:es.default_index`:: Default index when using the `.es()` query.
`timelion:target_buckets`:: Used for calculating automatic intervals in visualizations, this is the number of buckets to try to represent.
`timelion:max_buckets`:: Used for calculating automatic intervals in visualizations, this is the maximum number of buckets to represent.
`timelion:default_columns`:: The default number of columns to use on a timelion sheet.
`timelion:default_rows`:: The default number of rows to use on a timelion sheet.
`timelion:graphite.url`:: [experimental] Used with graphite queries, this it the URL of your host
`timelion:quandl.key`:: [experimental] Used with quandl queries, this is your API key from www.quandl.com
`state:storeInSessionStorage`:: [experimental] Kibana tracks UI state in the URL, which can lead to problems when there is a lot of information there and the URL gets very long. Enabling this will store parts of the state in your browser session instead, to keep the URL shorter.
16 changes: 10 additions & 6 deletions docs/management/managing-fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,23 @@ WARNING: Computing data on the fly with scripted fields can be very resource int
Kibana's performance. Keep in mind that there's no built-in validation of a scripted field. If your scripts are
buggy, you'll get exceptions whenever you try to view the dynamically generated data.

Scripted fields use the Lucene expression syntax. For more information,
see {es-ref}modules-scripting-expression.html[
Lucene Expressions Scripts].
When you define a scripted field in Kibana, you have a choice of scripting languages. Starting with 5.0, the default
options are {es-ref}modules-scripting-expression.html[Lucene expressions] and {es-ref}modules-scripting-painless.html[Painless].
While you can use other scripting languages if you enable dynamic scripting for them in Elasticsearch, this is not recommended
because they cannot be sufficiently {es-ref}modules-scripting-security.html[sandboxed].

WARNING: Use of Groovy, Javascript, and Python scripting is deprecated starting in Elasticsearch 5.0, and support for those
scripting languages will be removed in the future.

You can reference any single value numeric field in your expressions, for example:

----
doc['field_name'].value
----

For more background on scripted fields and additional examples, refer to this blog:
https://www.elastic.co/blog/using-painless-kibana-scripted-fields[Using Painless in Kibana scripted fields]

[float]
[[create-scripted-field]]
=== Creating a Scripted Field
Expand All @@ -98,9 +105,6 @@ To create a scripted field:
For more information about scripted fields in Elasticsearch, see
{es-ref}modules-scripting.html[Scripting].

NOTE: In Elasticsearch releases 1.4.3 and later, this functionality requires you to enable
{es-ref}modules-scripting.html[dynamic Groovy scripting].

[float]
[[update-scripted-field]]
=== Updating a Scripted Field
Expand Down
2 changes: 2 additions & 0 deletions docs/setup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ include::setup/access.asciidoc[]

include::setup/connect-to-elasticsearch.asciidoc[]

include::setup/tribe.asciidoc[]

include::setup/production.asciidoc[]

include::setup/upgrade.asciidoc[]
8 changes: 0 additions & 8 deletions docs/setup/production.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* <<configuring-kibana-shield, Using Kibana with X-Pack>>
* <<enabling-ssl, Enabling SSL>>
* <<load-balancing, Load Balancing Across Multiple Elasticsearch Nodes>>
* <<kibana-tribe, Kibana and Tribe Nodes>>

How you deploy Kibana largely depends on your use case. If you are the only user,
you can run Kibana on your local machine and configure it to point to whatever
Expand Down Expand Up @@ -112,10 +111,3 @@ cluster.name: "my_cluster"
# The Elasticsearch instance to use for all your queries.
elasticsearch.url: "http://localhost:9200"
--------

[float]
[[kibana-tribe]]
=== Kibana and Tribe Nodes

Kibana 5.0 does not support tribe nodes. We are working on a solution that
addresses this limitation.
20 changes: 20 additions & 0 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,23 @@ unauthenticated users to access the Kibana server status API and status page.
`console.proxyConfig`:: A list of configuration options that are based on the proxy target. Use this to set custom timeouts or SSL settings for specific hosts. This is done by defining a set of `match` criteria using wildcards/globs which will be checked against each request. The configuration from all matching rules will then be merged together to configure the proxy used for that request.
+
The valid match keys are `match.protocol`, `match.host`, `match.port`, and `match.path`. All of these keys default to `*`, which means they will match any value. See <<configuring-console>> for an example.

`elasticsearch.tribe.url:`:: Optional URL of the Elasticsearch tribe instance to use for all your
queries.
`elasticsearch.tribe.username:` and `elasticsearch.tribe.password:`:: If your Elasticsearch is protected with basic authentication,
these settings provide the username and password that the Kibana server uses to perform maintenance on the Kibana index at
startup. Your Kibana users still need to authenticate with Elasticsearch, which is proxied through the Kibana server.
`elasticsearch.tribe.ssl.cert:` and `elasticsearch.tribe.ssl.key:`:: Optional settings that provide the paths to the PEM-format SSL
certificate and key files. These files validate that your Elasticsearch backend uses the same key files.
`elasticsearch.tribe.ssl.ca:`:: Optional setting that enables you to specify a path to the PEM file for the certificate
authority for your Elasticsearch instance.
`elasticsearch.tribe.ssl.verify:`:: *Default: true* To disregard the validity of SSL certificates, change this setting’s value
to `false`.
`elasticsearch.tribe.pingTimeout:`:: *Default: the value of the `elasticsearch.tribe.requestTimeout` setting* Time in milliseconds to
wait for Elasticsearch to respond to pings.
`elasticsearch.requestTimeout:`:: *Default: 30000* Time in milliseconds to wait for responses from the back end or
Elasticsearch. This value must be a positive integer.
`elasticsearch.tribe.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.tribe.customHeaders:`:: *Default: `{}`* Header names and values to send to Elasticsearch. Any custom headers
cannot be overwritten by client-side headers, regardless of the `elasticsearch.tribe.requestHeadersWhitelist` configuration.
33 changes: 33 additions & 0 deletions docs/setup/tribe.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[[tribe]]
== Using Kibana with Tribe nodes

Kibana can be configured to connect to a https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-tribe.html[tribe node] for data retrieval. Because tribe nodes can't create indices, Kibana additionally
requires a separate connection to a node to maintain state. When configured, searches and visualizations will retrieve data using
the tribe node and administrative actions (such as saving a dashboard) will be sent to non-tribe node.

[float]
[[tribe-configuration]]
=== Configuring Kibana for tribe nodes

Tribe nodes take all of the same configuration options used when configuring elasticsearch in `kibana.yml`. Tribe options
are prefixed with `elasticsearch.tribe` and at a minimum requires a url:
[source,text]
----
elasticsearch.url: "<your_administration_node>"
elasticsearch.tribe.url: "<your_tribe_node>"
----

When configured to use a tribe node, actions that modify Kibana's state will be sent to the node at `elasticsearch.url`. Searches and visualizations
will retrieve data from the node at `elasticsearch.tribe.url`. It's acceptable to use a node for `elasticsearch.url` that is part of one of the clusters that
a tribe node is pointing to.

The full list of configurations can be found at <<settings>>.

[float]
[[tribe-limitations]]
=== Limitations

Due to the ambiguity of which cluster is being used, certain features are disabled in Kibana:

* Console
* Managing users and roles with the x-pack plugin
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"mocha": "mocha",
"mocha:debug": "mocha --debug-brk",
"sterilize": "grunt sterilize",
"uiFramework:start": "webpack-dev-server --config src/ui_framework/doc_site/webpack.config.js --hot --inline --content-base src/ui_framework/doc_site/build"
"uiFramework:start": "grunt uiFramework:start"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -145,7 +145,6 @@
"moment-timezone": "0.5.4",
"no-ui-slider": "1.2.0",
"node-fetch": "1.3.2",
"node-sass": "3.8.0",
"node-uuid": "1.4.7",
"pegjs": "0.9.0",
"postcss-loader": "1.2.1",
Expand All @@ -155,7 +154,6 @@
"rimraf": "2.4.3",
"rison-node": "1.0.0",
"rjs-repack-loader": "1.0.6",
"sass-loader": "4.0.0",
"script-loader": "0.6.1",
"semver": "5.1.0",
"style-loader": "0.12.3",
Expand Down Expand Up @@ -223,6 +221,7 @@
"mocha": "2.5.3",
"murmurhash3js": "3.0.1",
"ncp": "2.0.0",
"node-sass": "3.8.0",
"nock": "8.0.0",
"npm": "3.10.8",
"portscanner": "1.0.0",
Expand All @@ -244,6 +243,7 @@
"react-select": "^1.0.0-rc.1",
"react-sortable": "^1.1.0",
"reactcss": "^1.0.7",
"sass-loader": "4.0.0",
"simple-git": "1.37.0",
"simianhacker-react-resize-aware": "^1.0.11",
"sinon": "1.17.2",
Expand Down
2 changes: 1 addition & 1 deletion src/cli/serve/__tests__/read_yaml_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('cli/serve/read_yaml_config', function () {
});
});

it('reads and merged mulitple config file', function () {
it('reads and merged multiple config file', function () {
const config = readYamlConfig([
fixture('one.yml'),
fixture('two.yml')
Expand Down
2 changes: 1 addition & 1 deletion src/cli/serve/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = function (program) {
.option(
'-c, --config <path>',
'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.',
'Use multiple --config args to include multiple config files.',
configPathCollector,
[ getConfig() ]
)
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/console/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default function (kibana) {

uiExports: {
apps: apps,

hacks: ['plugins/console/hacks/register'],
devTools: ['plugins/console/console'],

injectDefaultVars(server, options) {
Expand Down
7 changes: 0 additions & 7 deletions src/core_plugins/console/public/console.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import devTools from 'ui/registry/dev_tools';
import uiRoutes from 'ui/routes';
import template from './index.html';

Expand All @@ -16,12 +15,6 @@ require('./src/directives/sense_settings');
require('./src/directives/sense_help');
require('./src/directives/sense_welcome');

devTools.register(() => ({
order: 1,
name: 'console',
display: 'Console',
url: '#/dev_tools/console'
}));

uiRoutes.when('/dev_tools/console', {
controller: 'SenseController',
Expand Down
7 changes: 7 additions & 0 deletions src/core_plugins/console/public/hacks/register.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import devTools from 'ui/registry/dev_tools';
devTools.register(() => ({
order: 1,
name: 'console',
display: 'Console',
url: '#/dev_tools/console'
}));
2 changes: 1 addition & 1 deletion src/core_plugins/elasticsearch/lib/__tests__/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('plugins/elasticsearch', function () {
}

describe(format('%s %s', options.method, options.url), function () {
it('should should return ' + statusCode, function (done) {
it('should return ' + statusCode, function (done) {
kbnTestServer.makeRequest(kbnServer, options, function (res) {
if (res.statusCode === statusCode) {
done();
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/kbn_vislib_vis_types/public/heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function HeatmapVisType(Private) {
title: 'Value',
min: 1,
max: 1,
aggFilter: ['count', 'avg', 'median', 'sum', 'min', 'max', 'cardinality', 'std_dev'],
aggFilter: ['count', 'avg', 'median', 'sum', 'min', 'max', 'cardinality', 'std_dev', 'top_hits'],
defaults: [
{ schema: 'metric', type: 'count' }
]
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/kbn_vislib_vis_types/public/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function HistogramVisType(Private) {
title: 'Dot Size',
min: 0,
max: 1,
aggFilter: ['count', 'avg', 'sum', 'min', 'max', 'cardinality']
aggFilter: ['count', 'avg', 'sum', 'min', 'max', 'cardinality', 'top_hits']
},
{
group: 'buckets',
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/kbn_vislib_vis_types/public/pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function HistogramVisType(Private) {
title: 'Slice Size',
min: 1,
max: 1,
aggFilter: ['sum', 'count', 'cardinality'],
aggFilter: ['sum', 'count', 'cardinality', 'top_hits'],
defaults: [
{ schema: 'metric', type: 'count' }
]
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/kbn_vislib_vis_types/public/tile_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function TileMapVisType(Private, getAppState, courier, config) {
title: 'Value',
min: 1,
max: 1,
aggFilter: ['count', 'avg', 'sum', 'min', 'max', 'cardinality'],
aggFilter: ['count', 'avg', 'sum', 'min', 'max', 'cardinality', 'top_hits'],
defaults: [
{ schema: 'metric', type: 'count' }
]
Expand Down
Loading

0 comments on commit b4ce642

Please sign in to comment.