Commit graph

48 commits

Author SHA1 Message Date
Jonathan Budzenski 1275b79c68
[6.x] Support for multiple Elasticsearch nodes and sniffing (#21928) (#27431)
* Support for multiple Elasticsearch nodes and sniffing (#21928)

* Node sniffing

* update monitoring

* cleaning

* remove tests

* rewrite tests using the proxy

* fix monitoring mocha tests

* fix payload

* return full error

* default interval false

* add sniff settings to monitoring

* add docs for sniff settings

* re-add index search integration test

* catch parse error

* capital

* fix merge

* hapi upgrade

* return

* pass by prefix

* rm empty test fille

* split error handling

* fix merge

* update recent elasticsearch.url references

* prettier vs eslint

* transport.request, include query params

* mega comment

* revert elasticsearchUrl

* safe hosts

* more docs es.url references

* remove unused ml/esServerUrl

* log if both set

* tribe test

* update remaining url references
2018-12-18 19:16:04 -06:00
Leanid Shutau 31b5c1fac2
Set kibana locale in kibana.yml config (#21201) (#21777)
* set kibana locale in kibana.yml config

* remove accept-language-parser

* remove unnecessary tests

* fix readme description, fix description for locale in kibana.yml

* add point, that i18n.locale option should have exact match

* update kbn/i18n README

* Update README.md

* use getUiTranslations in render_mixin, remove i18n_mixin

* move registering translation files to mixin function
2018-08-08 13:51:31 +03:00
Nathan Reese fbcc6962fe
merge conflict (#19519) 2018-05-29 16:24:36 -06:00
Matt Bargar 9ff0f70953
Bring back shard timeout (#17420) (#17529)
It is not very useful to have:

* shardTimeout disabled if requestTimeout is enabled (means infinite es overruns)
* shardTimeout > requestTimeout if both enabled (means finite es overruns)
* shardTimeout < requestTimeout if both enabled (means partial results from es?)

The only option that really makes sense is to have shardTimeout === requestTimeout, so that's what I've done here.
2018-04-04 13:05:47 -04:00
Spencer ae0358a17a
[server/rewriteBasePath] Support rewriting basePath requests (#16724) (#16814)
* [server/rewriteBasePath] add option to enable basePath rewriting

* [server/rewriteBasePath/docs] end sentences with periods

* [server/rewriteBasePath] simplify Joi schema a smidge

* [server/rewriteBasePath] rename test file to match source

* [server/rewriteBasePath] initialize server in before/after hooks

* [server/rewriteBasePath] rephrase deprecation warning

* [server/config/schema] verify that non-strings are not accepted for basePath

* [server/config/schema] toss a trailing comma in there
2018-02-19 14:43:40 -07:00
Nathan Reese eae5e6893b
Kibana Home page - phase one (#14673) (#14733)
* make kibana home app default when defaultAppId not set

* make kibana icon link to home page, add react-router for routing within home app

* directory registry

* add href to directory listings

* add tabs to directory page

* add promo section to home page

* home page styling

* use kuiFlex components to display directory in columns

* fix react array missing key warning

* add icons

* remove feature directory title from home page, change data sources to integrations

* add tutorials registry

* fix rebase mistake

* start tutorial component

* wrap tutorial registration in helper function to hide implemenation details

* add constants for categry and instruction variant ids

* filter tutorial directory by tab category

* remove later phase stuff

* clean-up feature directory styling

* add kbnDirectory to uiExports

* remove unused file

* cleanup timelion plugin definition

* fix lint errors

* css work recommended by formgeist review

* cleanup from pairing session with snide

* rename kbnDirectory registry to featureCatalogue, rename kbnDirectory uiExports to home

* update kibana index uses name to match ui-exports name

* remove carot from package versions

* remove kuiViewContent--constrainedWidth from feature directory view

* updates from Stacey-Gammon review

* import FeatureCatalogueCategory instead of passing as parameter

* wrap KuiButton in href to fix button click bug

* remove conditional check for ADMIN and DATA feature category tabs

* consider apps for the 'OTHER' tab as anything not in ADMIN or DATA

* remove temp variable tabs and just store in this

* avoid overwriting kui class styles

* prefix class names with home

* updates from timroes review
2017-11-02 14:11:24 -06:00
Brandon Kobel 5a4263835d Modifying SSL settings to be consistent with the stack (#9823)
This introduces the following new settings:
- server.ssl.enabled
- server.ssl.keyPassphrase
- server.ssl.certificateAuthorities
- server.ssl.clientAuthentication
- server.ssl.supportedProtocols
- elasticsearch.ssl.keyPassphrase


and deprecates the following:
- server.ssl.cert -> server.ssl.certificate
- elasticsearch.ssl.ca -> elasticsearch.ssl.certificateAuthorities
- elasticsearch.ssl.cert -> elasticsearch.ssl.certificate
- elasticsearch.ssl.verify -> elasticsearch.ssl.verificationMode
- console.proxyConfig
2017-01-25 10:58:56 -05:00
Martin Hickey 7028a88efd Kibana Globalization - Phase 1 (#7545)
* Add low level i18n plugin

Manages languages that are available and is responsible for loading translated
content at the granularity of a plugin.

To be done:
 - APIs for store and retrieval

* Use Kibana install as root for the translation store directory

Setting the path for storing the bundled language translation files to
<KIBANA_INSTALL>/data/store_translations/<PLUGIN_NAME>

* Updated i18n core plugin APIs to be asynchronous

To be done:
 - Better error handling in APIs
 - Fix threading issue with storePluginLanguageTranslations API

* Fix thread synchroization issue in storePluginLanguageTranslations

* Update error handling in i18n core plugin

* Change to use NodeJS mkdirp function for creating directories recursively

Updates with review comments from @srl295. Changed export syntax to show the
exported functions at end of file.

* Add REST API for getting translations of a language for a plugin

To be done:
 - Add algorithm to decide on the language for a plugin by comparing the accept languages
from the REST call and the plugin supported languages
 - Add REST API tests

* Add algorithm for determining plugin language when retrieving translations

Client would pass languages used in the 'accept-language' header. These
languages would then be compared against the plugin supported languages
and best compared language would be selected.

To be done:
 - Add REST API tests

* Add API to return all registered plugin language translations

* Add HAPI API to get all plugins translation files

* Update register translations API to be independent of plugin name and language

The register API is updated to be independent of plugin name and language. The API will now
traverse the path given and create language bundles as per language files it traverses.
The translations files structure has also been simplified to be just key/value objects.

To be done:
 - Add hapi API to get translations
 - Extend the API tests to test responses

* Update API test

* Add eslint fix for API test

* Update with review comments

From review https://github.com/elastic/kibana/pull/7545#issuecomment-231147435
following comments updated:
- README, .gitignore, and .eslintrc are not needed in a core plugin
- package.json only needs name and version
- unit tests need to go in a tests directory otherwise they won't get picked up
by the grunt tasks. Also our convention is to name the test file with the same
name as the module it's testing (so i18n_tests.js should just be i18n.js)
- For consistency with the rest of the code base, rename the data directory to fixtures.
- Prefer const (or let if necessary). Don't use var.
- Use ES6 imports/exports rather than commonjs style
- Only export the i18n module's public API. For instance, I don't think getPluginTranslationDetails is used outside of the i18n module, so it shouldn't be exposed publicly. If you want to expose it for testing purposes, I would recommend creating an i18n directory with an index.js file that exports the module's public API, and a separate i18n.js file with the "private" API. index.js will be for public use, i18n.js will be for private internal use.

* Update after review comments

From review (https://github.com/elastic/kibana/pull/7545#issuecomment-231884490):
- i18n module API should return promises for async operations instead of using
callbacks
- All filesystem access should be async
- Unit tests need to be updated based on new proposed plugin structure
(single language file, not split by view)

From design (https://github.com/elastic/kibana/issues/6515#issuecomment-231400097):
- Removed API as will consider in later phase

TODO:
- Make write function async

* Update after review comments

Updated write function to be asynchronous

* Update registerTranslations API to take absolute translation file as argument

The API originally took the directory as the argument but following reviews it
was decided to change to absolute file because it will be less brittle
since it is more explicit.

* Translate the Kibana welcome message

Translates the start-up message (“Kibana is loading ...”)in the Jade template.

To be done:
 - Means to register the core plugin translations. They are currently added
in the fixtures directory as static files. Need to be generated on the fly.

* Add build task to generate core plugin translations

Task which calls registerTranslations API and then a task which copies the
regsitered translations to <kibana_root>/build/kibana

* Add hook to optimize module to add registration during dev startup

Registration of the core plugin translations during development start of
Kibana server. The translations include the welcome message and server error
startup message.

* Handle scenario when the user preferred language header is not passed

The UI when loading asks i18n plugin which language translation to use
depending on the user preferred language header 'accept-language'.
This commit is to handle scenario where header is not passed. The algorithm
then chooses the default language.

* Replace registering of translations at plugin install time to the plugin init phase

This change follows review comments in:
https://github.com/elastic/kibana/issues/6515#issuecomment-236237218

* Update after review comments

Comments:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-72890673
- https://github.com/elastic/kibana/pull/7545#discussion-diff-72894762

* Update after plugin folder layout changes in Kibana

This require to use <kibana_root>/data for registered translations
and i18n plugin moved to core_plugins from plugins.

Refer to PR for more details:
https://github.com/elastic/kibana/pull/7562

* Update translation registration to file path rather than bundling

After review discussions it was agreed to just register the absolute paths
to translation files rather than bundling each file into one central file
at registration.

* Update review comments

This commit contains the following review comments:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74661282
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74661392
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74662271
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74663235
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669201
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669269
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669419
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669628
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74799382

* Update review comments

The following review comments are included in the commit:
- https://github.com/elastic/kibana/pull/7545#discussion_r74663515
- https://github.com/elastic/kibana/pull/7545#discussion_r74666995
- https://github.com/elastic/kibana/pull/7545#discussion_r74805552

* Expose the i18n APIs in the server object for plugin access

Plugins should call the i18n plugin APIs through the server object
and not directly from the module.

This closes he following comments:
- https://github.com/elastic/kibana/pull/7545#discussion_r74662598
- https://github.com/elastic/kibana/pull/7545#discussion_r74669327
- https://github.com/elastic/kibana/pull/7545#discussion_r74669765

* Update accept-language-parser module to 1.2.0

Module version 1.2.0 fixes issue:
https://github.com/opentable/accept-language-parser/issues/8

This commit updates review comments:
https://github.com/elastic/kibana/pull/7545#discussion-diff-75525214
https://github.com/elastic/kibana/pull/7545#issuecomment-240290461

* Add i18n default locale as a configurable item

Adds 'defaultLocale' configurable item to the i18n plugin configuration.
The default locale is used for translations if the locale specified by user
is not supported.

This commit satisfies the review comment:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669970

* Move UI i18n wrapper functionality into a module

This commit better structures the i18n capability so that it can be called
in UI code in a clearly defined fashion with minimum code. It also fixes
potential race conditions.

This commit updates review comments:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74804791
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74801802
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74670457

* Fill any missing translations using translations from default locale

The default language translations are loaded and are compared against the selected
language translations. The comparison can then highlight any missing translation
keys and can load the default translations keys as needed. This helps to unsure
where possible that a translation string is available in most scenarios even if not
in the locale requested.

This commit resolves review comments:
- https://github.com/elastic/kibana/pull/7545#issuecomment-239202583
- https://github.com/elastic/kibana/pull/7545#issuecomment-239203734

* Add unit tests for the i18n UI wrapper functions

* Fix issues after rebase with master

* Add translation keys verification tool

This tool helps to check that translation keys are translated. This tool can be
used for non-angular translation constructs like the Jade templates.

* Updates after review comments

Updates for review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-3748114

* Update after review comments

Update for review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-3937958

To be done:
- Update of unit tests for UI and server
- Call of verify translations

* Update unit tests after review changes

There was a number of changes to the i18n module and the ui i18n wrapper
following review comments. This commit is to update the unit tests with
respect.

* Add build task for verify translations

* Update the kibana i18n IDs to be prefixed with kibana

* Update verify translations to test registered translations

It was testing the static translation files. It is now updated to
test the translations registered when Kibana server is started and
the plugins have initialized.

* Update after review comments

Updates following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-5529711

* Update after review

This commit contain updates after the following review:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-5707951

* Updates after review

Updates for review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-6656571

* Update after review

Updates for the following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-6911265

* Update after review

Updates after the following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-7084765

* Update unit tests to use expect throwError

* Update after rebase with master

Loading message changed following merge of commit
26c53e8a8d (diff-e25d7fee746a4f249e17f87c02fd95f8R55)
This required update to the welcome message and how it is called.

* Update following review

Updated the following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-9297662

* Update the algorithm to return the locale

The algorithm to return which locale to use for translations based on the user
locale list and the regsitered locales is updated in this commit. The algorithm
previously did an exact match on all the user locales first before (by priority)
then checking for best case match. The algorithm is now modified to check each
user locale starting with the highest priority first for an exact match and then
for best case match. If no match it then moves to the next user locale with
the next highest priority. This is to follow the priority list that a user
browser is configured for where there maybe a locale translation available
but might not be the exact match with regard to the locale code and/or script.
An example of this is that the highest priority locale of the user is 'en-US'
but the locale translation available is 'en'. It is better select the 'en'
locale rather than select the next highest locale which is an exact match.

* Update after review comments

Updates after the following reviews:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-9785665
https://github.com/elastic/kibana/pull/7545#pullrequestreview-9786404

* Fix after merge with master

Change in the flo and layout of ui index meant that acceptLanguages were not
being passed. This commit is an update to fix this so that the welcome
messages are loaded.

* Update after review comments

This commit is for updates after the following review:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-10435175

* Fix issue when unit test run in CI as core translations are registered

When unit tests are run on a test server (like in the CI), it will start
Kibana server and register the core translations. This means that the i18n
unit tests need to be able to store the existing registration prior to
testing and replace after testing.

* [server/ui] move i18n into ui module

* [server/ui] restore renderApp() method signature

* [server/ui] unify i18n logic in UiI18n class

* [server] move translation files into "translations" dir

* Update i18n module to loaded by multiple server instances within the one process

* Update i18n module to a class

Moving the i18n module into a class so as to encapsulate the registered
translations which means there can be different and distinct instances per process.
This is to accomodate the user case where there might be multiple Kibana server
instances in a process and the localization should be at the server level.

* Identify private members in a class with underscore-prefix convention

* Remove redundant translation from core translation file

Message starting with 'Give me a moment...' is no longer part of loading
message folowing a rebase with master.

* [ui/i18n] reject translations files that do not use absolute paths

* Update config item locale to defaultLocale

* Update after review comments

- Update after following review: https://github.com/elastic/kibana/pull/7545#pullrequestreview-12775161
- Also, fix syntax mess following rebase with master of src/optimize/index.js

* Fix rebase with master error

* Add task for verifying translations in CI

* Fix lint errors
2016-12-13 17:55:48 -07:00
aquister 2e34898f31 replace non-US-ASCII characters in kibana.yml 2016-11-28 10:29:44 -05:00
Thomas Neirynck 6142b5ff36 remove leading spaces 2016-09-22 14:18:54 -04:00
Matthew Bargar 02c9030c6a Make expected server.basePath usage more clear 2016-09-20 11:48:35 -04:00
Thomas Neirynck e702c6d404 Improve doc 2016-08-25 12:41:45 -04:00
Thomas Neirynck 549293d2b1 Bind Kibana server to localhost
This is a breaking change. The default behaviour will now be that
connections from remote users will be rejected.
2016-08-25 12:41:45 -04:00
Court Ewing d00d177d01 Configurable headers for all elasticsearch requests
A new server-side configuration, elasticsearch.customHeaders, allows
people to configure any number of custom headers that will get sent
along to all requests to Elasticsearch that are made via the proxy or
exposed client.

This allows for advanced architectures that do things such as dynamic
routing based on install-specific headers.
2016-08-18 17:58:20 -04:00
Timothy Sullivan 0c78e59f33 ops: set default interval for stat collection to 5 seconds
When polling the NodeJS server for operations data every 10 seconds, the
data become coarse-looking when viewing it at fine-grain detail. If you
aggregate the data into a date histogram and the bucket size is 10
seconds, then there'll be missing data in every other bucket. That is,
unless the time bounds of the buckets line up PERFECTLY with the time
that operations data was collected, which is unlikely
2016-06-03 13:40:16 -07:00
Shaunak Kashyap 65ddf96d34
Only document one option for sending no headers 2016-04-16 05:52:54 -07:00
Shaunak Kashyap 304511715e
Updating documentation 2016-04-15 12:23:43 -07:00
Shaunak Kashyap 2149f84aba
Renaming property to make its intent more explicit 2016-04-15 06:11:07 -07:00
Shaunak Kashyap f9f4b79626
Allow for elasticsearch.requestHeaders to be set to null 2016-04-14 17:55:28 -07:00
Shaunak Kashyap 836c740e56 Adding 'authorization' to the default headers list 2016-04-14 16:39:31 -07:00
Shaunak Kashyap b635b2c466
Adding elasticsearch.requestHeaders option to kibana.yml and documentation 2016-04-13 16:56:26 -07:00
Jonathan Budzenski 738e3d0105 [server] Add server.name 2016-03-23 10:05:24 -05:00
Timothy Sullivan 2c828aedff [config] add ops.interval config option 2016-03-10 10:50:03 -07:00
Timothy Sullivan 71cbe048c9 [chore] cut trailing whitespace 2016-03-10 10:50:03 -07:00
Joe Fleming 419434f5c8 4.x timeout fixes applied to master
see PR #6341 and #6377

Fixes #6385
2016-03-02 19:30:09 +00:00
Paul Echeverri 797c7098cf New commit to sync personal fork with 4.4 main 2016-01-05 14:54:27 -08:00
Jonathan Budzenski 642d4d6afa [config] Add option for changing max payload size on requests sent to server. Closes #5775. 2015-12-29 11:29:13 -06:00
spalger cdfb581e9a [server/xsrf] use the current version as the xsrf header, rather than a random value 2015-12-07 14:52:02 -07:00
spalger 4e7ae9fafd Merge branch 'master' of github.com:elastic/kibana into fix/relativePathsInKibana 2015-11-16 15:24:22 -06:00
spalger 5b38f328cf [config] add not about server.xsrf.token config 2015-11-10 10:58:04 -06:00
spalger 1cfa5f632f [config] add note about server.basePath 2015-11-05 17:34:11 -06:00
Jonathan Budzenski 9d0515f934 [config] Quote user and password example. Closes #5206 2015-11-05 16:10:57 -06:00
Rashid Khan 04ef79dac4 Merge pull request #5259 from ryanmaclean/patch-1
Update kibana.yml
2015-11-05 06:34:37 -07:00
Mark Walkom 4e2bf76950 Added missing ': false' 2015-11-04 11:05:29 +11:00
Ryan MacLean 48bc82b782 Update kibana.yml
Pedantic edit  :)
2015-11-01 17:49:11 -08:00
Rashid Khan 47cca849c8 Merge pull request #4844 from spalger/fix/configFileOrder
Group auth-related config items together
2015-09-14 16:31:58 -07:00
David Wittman 0d45630b1f Fix typos in kibana.yml 2015-09-10 00:18:19 -04:00
spalger e5dfa425e3 added logging output tweaks to the config file 2015-09-02 15:40:15 -07:00
spalger 1d576f4fd2 Merge branch 'master' of github.com:elastic/kibana into fix/configFileOrder 2015-09-01 10:35:21 -07:00
spalger a16e4f1b0b [config] reorder to @tbragin recommendation 2015-09-01 10:33:48 -07:00
Spencer b694025399 Merge pull request #4734 from lukasolson/issues/4697
Fix issues with elasticsearch and ssl
2015-08-26 15:04:00 -07:00
Arnout Boks 434bf025aa Fixed typo in kibana.yml 2015-08-25 13:21:07 +02:00
Lukas Olson 63bc181871 Attempt to fix issues with elasticsearch and ssl 2015-08-21 17:11:18 -07:00
Spencer fd79d959a6 Group auth-related config items together 2015-08-18 11:03:48 -07:00
spalger 608be7435e Merge branch 'master' of github.com:elastic/kibana into apps/home 2015-07-22 17:33:23 -07:00
Spencer Alger 73beac9cf1 consolidate around --config arg, use js to resolve 2015-07-10 09:01:27 -07:00
Spencer Alger 4f5f523946 [server/pid] move pid to it's own config, allow setting exclusive=true 2015-07-09 22:27:24 -07:00
Spencer Alger e98d264c20 enhance cli to manage dev server 2015-07-08 17:45:32 -07:00