Commit graph

39 commits

Author SHA1 Message Date
Tim Sullivan 80833cde95
Remove /api/_xpack/usage and /api/_kibana/v1/stats (#20800)
/api/_xpack/usage was added as a target for 6.4.0 but it will not be
used. Instead, the /api/stats response will include usage info on
everything that gets registered with the usage service in
/src/server/usage

/api/_kibana/v1/stats is a GET API that was added in 6.2, during a point
where we thought providing usage stats through a public API would be OK
for capturing internally, with the benefit of having it be visible.

However, we've pivoted away from that idea because it doesn't line up
too well with the existing flow of data, where usage stats are combined
with the "Kibana stats" such as process uptime and number of requests.
We want to shift how we collect stats from Kibana, but it will be
gradual. It might be a while before we have an architecture that makes
sense for a standalone public API for the usage stats

This endpoint was never documented, and isn't used anywhere in the code.
It does incur a maintenance cost though.

Therefore, instead of waiting for a next major version to remove this
API, I'm removing it for 6.4. It will be marked in the release notes as
a breaking change. Since it was never documented, it should not provide
a problem.
2018-07-19 13:46:52 -07:00
Tim Sullivan f8bdc7d22a
[Test/Cleanup] Remove console.log (#21002) 2018-07-19 13:42:47 -07:00
Bill McConaghy 35dade2d3c
Reactify users roles (#20739)
* partial progress on reactifying users

* progress on EUIfication of users screen

* removing Angular stuff

* adding data-test-subj="passwordConfirmationInput"

* removing data-test-subj="userFormEmailInput" refs from tests

* fixing selector for role assignment

* some functional test fixes

* fixing some functional tests

* fixing last functional test

* removing stray console log

* fixing warnings

* attempting to fix flaky test

* trying again to fix flaky test

* PR feedback

* PR feedback

* fixing issue where form tried to submit

* adding sleep to allow user to load

* Design edits

Mainly adding wrapper EUI page elements, but also shifted around form elements.

* Fixed console error and added responsive prop to table

* addressing PR feedback

* A few more PR feedback

- Fixed alignment of table
- Removed the tooltip from the lock icon and placed the description inline.
- Changed delete button to an empty button

* addressing more PR feedback

* adding email field back in

* adding back username validation

* restoring original error message

* fixing dumb null error
2018-07-19 16:40:12 -04:00
Tim Sullivan 274617de59
Stats API: implement the "kibana status" spec from the Monitoring data model for stats (#20577)
* [Stats API] Set API field names per spec

* fix jest tests

* fix api integration test

* trash the original metrics collector

- constantly accumulating stats over time does not align with the existing behavior, which is to reset the stats to 0 whenever they are pulled

* move some logic out of the collector types combiner into inline

- change the signature of sourceKibana

* Make a new stats collector for the API

- to not clear the data when pulling via the api
- fetching is a read-only thing

* isolate data transforms for api data and upload data

* no static methods

* remove external in bytes

* remove the _stats prefix for kibana and reporting

* update jest test snapshot

* fix collector_types_combiner test

* fix usage api

* add test suite todo comment

* reduce some loc change

* roll back mysterious change

* reduce some more loc change

* comment correction

* reduce more loc change

* whitespace

* comment question

* fix cluster_uuid

* fix stats integration test

* fix bulk uploader test, combineTypes is no longer external

* very important comments about the current nature of stats represented and long-term goals

* add stats api tests with/without authentication

* fix more fields to match data model

* fix more tests

* fix jest test

* remove TODO

* remove sockets

* use snake_case for api field names

* restore accidental removal + copy/paste error

* sourceKibana -> getKibanaInfoForStats

* skip usage test on legacy endpoint

* fix api tests

* more comment

* stop putting a field in that used to be omitted

* fix the internal type to ID the usage data for bulk uploader

* correct the kibana usage type value, which is shown as-is in the API

* more fixes for the constants identifying collector types + test against duplicates

* add a comment on a hack, and a whitespace fix
2018-07-18 16:37:04 -07:00
Tyler Smalley cca09311c0
Skip flaky Monitoring Shard Allocation Per Node tests (#20138)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-13 08:34:41 -07:00
Stacey Gammon 826758c78c
Turn reporting tests back on (#20634)
* unskip reporting tests

* Focus only on flaky test suite and run 10x

* Revert "Focus only on flaky test suite and run 10x"

This reverts commit a6616b1140c29d8d3f13666d20ae94db9a97267f.
2018-07-12 11:27:18 -04:00
archana c5432f27ba
[Tests] Run es from snapshot locally in xpack (#20585) 2018-07-10 05:25:55 -05:00
Nathan Reese 23d5dd4275
disable flaky reporting tests (#20441) 2018-07-03 16:35:02 -06:00
Tim Sullivan f7070890d4
fix monitoring elasticsearch nodes listing sort and filtering (#20321)
closes https://github.com/elastic/kibana/issues/20132
2018-07-02 10:11:44 -07:00
Josh Soref 2b27fb1c5f Fix misspellings (#19981) 2018-06-26 20:17:41 -07:00
Shaunak Kashyap da2da74a08
EUIFication: Grok Debugger (#20027)
* Move <kbn-dev-tools-app> Angular wrapper directive usage into route template

* Move sole directive into new directives folder

* WIP checkin: basic conversion to React components

* Fix sample custom patterns indentation

* Remove custom CSS

* Wrap button in EuiFormRow + define isSimulateDisabled

* Wire up simulate

* Cleanup

* Ace formatting options

* Better styling

* Adding spacing between custom patterns and simulate button

* Fixing form row widths

* Removing form row around button

* Add indentation/newlines in structured output

* Error handling

* Use constants

* Removing no-longer-used code

* Implement syntax highlighting via custom mode

* Making functional tests pass

* Adding trailing comma back

* Removing fixed heights

* Removing unnecessary styles

* Make Event Output form row full width as well

* Wrapping EuiCodeEditors in EuiPanels

* Adding spacer before callout; making spacing around callout consistent

* Clear out custom patterns from request if field is cleared out

* Clear out simulation results before attempting simulation

* Set state with untrimmed value
2018-06-22 11:51:27 -07:00
Larry Gregory 8e9d776f54
[Flaky Test] - Role Management Screen (#19988)
Fixes a flaky test by waiting for Kibana to finish all pending requests before continuing
2018-06-18 09:54:31 -04:00
CJ Cenizal 2ada1b348a
Replace Watcher's watch-type-select directive with two buttons. (#19782) 2018-06-13 17:08:13 -07:00
Tim Sullivan cbd319f92c
[Monitoring] Fix Node Advanced page (#19740)
* [Monitoring] Fix Node Advanced page

* fix metrics snapshot
2018-06-07 17:05:43 -07:00
Stacey Gammon c639deba73
Move all reporting tests into their own folder and add chromium tests (#19330)
* Move all reporting tests into their own folder to allow for multiple kibana.yml configuration tests, including chromium

* Add debugging and try to skip other tests an jenkins to speed things up

* More debug output

* more logging (remove other line which failed on jenkins)

* Remove no sandbox flag, it doesn't help

* Add fix for socket hangup and clean up tests

* fix path to logstash_functional

* Extend timeout for chromium, add verbose logging, add better comment, conditionally output curl command

* fix path... again

* Ah, other functional tests still need access to reporting page object, put it back

* fix sp err

* Add debug logs for screenshot stitching for png.bitblt error

* Fix tests that don't pass logger to screenshotStitcher

* Fix logger being undefined

* Add more debug output

* png has data, too much info to spit out

* Add comment with link to issue for extra debug messages so they can be left in since so many passes

* Dont use spawnSync with curl, use http.request instead, more support for it

* Comment out chromium tests for now to avoid flakiness

* Wait... lets at least make sure the other fix worked (the http.request instead of spawnsync and curl)

* New http.request code doesn't seem to work on jenkins, timing out after 10 secs maybe

* go back to spawnsync to see if it's an issue with the rxjs code or the http.request code

* I think I figured it out...

* Comment out tests to avoid flaky png error in the screenshot stitcher

* Use a const for OSS archive path

* use path.resolve correctly.
2018-06-05 18:41:23 -04:00
Tim Sullivan 1617da93dd
[X-Pack Usage API] use authentication from request headers (#19613)
* [X-Pack Usage API] use authentication from request headers

* add test for usage api no-auth

* whitespace / syntax nits

* reduce loc changed

* remove a weird looking comment
2018-06-05 10:38:02 -07:00
Justin Kambic 194e427bc8
Remove dirty prompt from Logstash Pipeline Management (#19649)
* Remove dirty prompt from Logstash Pipeline management because of Angular routing issue.

* Remove test for removed feature.
2018-06-05 12:30:11 -04:00
Tim Sullivan 6760a64c3d
[Monitoring/React] Logstash cluster status bars in react (#19433)
* [Monitoring/React] Logstash cluster status bars in react

* not have a prop named children

* simplify conditional metric

* fix functional tests
2018-05-29 14:36:32 -07:00
Stacey Gammon 803d0a61f3
Update dashboard snapshot tests (#19420)
* update snapshot tests

* Update time ranges

* Add sleeps, adjust time, update snapshots

* Skip TSVB until the issue with vertical line placement and x-axis timestamps is fixed

* fix expectations of time range with saved search creation

* remove debug line
2018-05-29 12:58:36 -04:00
Tim Sullivan 6eea4eae0f
[Monitoring] use react components for Kibana directives (#19379)
* kibana cluster status directive use react component

* fix some functional test failures
2018-05-24 18:05:51 -07:00
Stacey Gammon e3ea1a8726
Pluggable panel actions (#18877)
* Allow pluggable panel actions

* Need to register it as being used in kibana

* Some cleanup

* update snapshots to match new EUI versions, set time range

* Use newer panelActions service

* add missing await

* More clean up and fixes

* bring back window reload

* Show actions in view mode too

* delete now unused files

* Use toggle action to determin if context menu is open

* Fix tests that assume the toggle is hidden in view mode.

* Add some debug logs

* Fix up assumptions

* Previous failing test was legit - we don't want to show remove option when panel is expanded

* Embeddable can be empty before the panel is loaded

* Should look for either visualize or discover page

* Address code comments

* address code review comments

* whoops, get rid of childPanelToOpenOnClick entirely
2018-05-24 14:53:42 -04:00
Tim Sullivan d649f02c07
Monitoring/directives use react view elasticsearch (#19362)
* [Monitoring/React] Make Elasticsearch directives use React component internally

* fix more functional tests

* remove TODO

* lessen loc change
2018-05-23 16:57:37 -07:00
Tim Sullivan 77cfc94441
[Monitoring] Summary Status component data-test-subject wrap entire label/value container (#19289)
* [Monitoring] Summary Status component data-test-subject wrap entire label/value container

* update functional tests
2018-05-23 10:22:54 -07:00
Stacey Gammon c14f7a72c4
Reporting API test expansion and clean up (#18986)
* Update & expand reporting API tests

* remove xpack stuff from oss archive

* wrap "it"s so they are in expected order.

* Update expected recent stats

* url was pointing to a visualization not a csv

* Move comment around

* Merging with changes on master renaming stats to usage

* fix reference to old stats file.

* bad merge
2018-05-22 12:48:20 -04:00
Tim Sullivan 744fc0b316
[XpackMain] Add _xpack/usage API (#19232)
* [XpackMain] Add _xpack/usage API

* add xpack usage http api integration test

* comment

* misc test describe fixes

* fix integration test

* fix reply called twice

* enable api test

* enable kibana collection for integration test to work

* throw error comment
2018-05-21 16:55:26 -07:00
archana f63a3df17d
Option to run kibana from build for CI (#19125) (#19225)
* Option to run kibana from build for CI (#19125)

* Support --dev option for servers only

* try skipping dashboard time zones test
2018-05-21 08:31:30 -05:00
archana eaa4960981
Revert "Option to run kibana from build for CI" (#19224)
* Revert "[DOCS] Removes redundant index.asciidoc files (#19192)"

This reverts commit d11b5aae9a.

* Revert "[typescript] add typescript support for the server and browser (#19104)"

This reverts commit c6112067fc.

* Revert "Option to run kibana from build for CI (#19125)"

This reverts commit 5969860303.
2018-05-18 14:09:38 -05:00
archana 5969860303
Option to run kibana from build for CI (#19125) 2018-05-18 12:45:53 -05:00
Spencer 0f8a00304b
[x-pack] remove use of resolveKibanaPath from plugin helpers (#18979) 2018-05-11 07:46:44 -07:00
Tim Sullivan 782d4d9804
[Monitoring/React] Render ES Indices Listing with Base Controller / React (#18595)
* [Monitoring/React] Render ES Indices Listing with Base Controller

Refactors the ES Indices Listing to use Base Controller and a React component instead of an Angular directive

* fix functional tests

* fix another test

* better default for summary status component

* nicer code for whitespace after label

* apiFn => apiUrlFn

* Deleted / Closed
2018-05-09 21:37:24 -07:00
Tim Sullivan 011e8b2c28
[Monitoring] reorganize metrics per stack product (#18590)
* [Monitoring/Metrics] clean up metric classes and getMetricFields static helpers

* more pull out

* more to break out

* [Monitoring] reorganize metrics per stack product

This organizes the metrics classes per product as a starting point for adding more functions to the metrics so external logic in the `get_metrics` and `get_series` modules can be simplified.

New structure:
```
plugins/monitoring/server/lib/metrics
├── __test__
│   ├── __snapshots__
│   │   └── metrics.test.js.snap
│   └── metrics.test.js
├── beats
│   ├── __test__
│   │   └── cpu_utilization_calculation.test.js
│   ├── classes.js
│   └── metrics.js
├── classes
│   ├── __test__
│   │   ├── latency_metric_calculation.test.js
│   │   └── quota_metric_calculation.test.js
│   ├── cluster_metric.js
│   ├── index.js
│   ├── metric.js
│   └── quota_metric.js
├── elasticsearch
│   ├── __test__
│   │   └── latency_calculation.test.js
│   ├── classes.js
│   └── metrics.js
├── index.js
├── kibana
│   ├── classes.js
│   └── metrics.js
├── logstash
│   ├── classes.js
│   └── metrics.js
└── metrics.js
```

* fix strange test failure

* reduce loc change
2018-05-09 18:23:27 -07:00
archana b58e757794
Functional test setup with kbn-test package (#18568)
Restructure testing with kbn-test package

 - Run with multiple configs, move cli options to config
 - Package-ify kbn-test
 - Eventually we'll have functional_test_runner live in a package
of its own, and then this kbn-test will use that as a dependency,
probably still as a devDependency.
 - Implement functional_tests_server
 - Collapse single and multiple config apis into one command

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

Lift error handling to the top level
2018-05-09 18:23:49 -05:00
Tim Sullivan 3332143d14
[Monitoring/Test] More indices listing tests to prep for refactoring (#18758) 2018-05-03 09:16:31 -07:00
Spencer d35316642d
Fix loading indicator for uiSettingsClient (#18694)
* [ui/chrome/loadingIndicator] expose VanillaJS hooks for gloabl loading indicator

* [ui/uiSettingsClient] increment/decrement loading count while request in progress

* [ui/loadingIndicator] fix HeaderPage.isGlobalLoadingIndicatorHidden()

* [ui/loadingIndicator] remove rxjs, fix tests

* [ui/loadingIndicator] improve docs

* [ui/loadingIndicator] remove needless unmounts

* [ui/loadingCount] correct typo

* [functionalTests/headerPage] awaitGlobalLoadingIndicatorHidden

* [ui/loadingCount] send subscribers the loading count on subscription

* [ui/loadingIndicator] remove error throwing, cleanup render
2018-05-02 16:37:23 -07:00
Tim Sullivan 819b35a53e
[Monitoring/Test] More API Integration tests (#18700) 2018-05-02 10:24:03 -07:00
Shaunak Kashyap bf97342356
[Grok Debugger] Adding syntax highlighting for grok expressions (#18572)
* Adding basic syntax highlighting for grok expressions

* Use EUI color palette

* Handle regex tokens, escaped and unescaped

* Return token for escaped content

* Add functional test

* Using higher-contrast colors

* Removing comment I used for developing the highlight rules

* Using object destructuring

* Removing unnecessary method
2018-04-30 12:31:23 -07:00
Tim Sullivan 9e4d4952b6
[Monitoring] add get_clusters_summary to shrink cluster api response (#18596)
This reduces the output from the clusters API in the data processing stage.

Mainly, it throws away a lot of unused fields in `elasticsearch.cluster_stats` and `elasticsearch.cluster_state`

cc @rasroh
2018-04-30 09:11:01 -07:00
Tim Sullivan 4630548d2c
[Monitoring/React] Render ES Nodes Listing with Base Controller (#18585)
* [Monitoring/React] Render ES Nodes Listing with Base Controller

Refactors the ES Nodes Listing to use Base Controller and a React component instead of an Angular directive

* remove another obsolete file
2018-04-25 17:38:30 -07:00
Jenkins CI fe4609647d Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00