closes https://github.com/elastic/kibana/issues/164667
## 📝 Summary
This PR modifies the legend for `Document Count` graph in stack
monitoring to allow showing the exact document count when the user
hovers on a specific point.
## ✅ Testing
1. Make sure to have any dummy index with millions of documents
2. Navigate to Indices tab in Stack Monitoring
3. Click on the created index and observe the Document Count Graph
4. Hovering on any point should show the exact document count through
the legend below the graph
## 🎥 Demo
56747cf7-7914-4742-884a-9f9a9f59e9e6
### Summary
Part of https://github.com/elastic/kibana/issues/119658
Add api integration tests for cluster and elasticsearch routes to
validate behavior when reading data ingested by elastic-agent.
We currently have a testing suite for legacy and another one for
metricbeat. Since metricbeat and agent documents only differ in their
metadata, for example agent will populate a `data_stream.*` property to
identify the document types while metricbeat uses `metricset.*`, the
tests assertion validating _business_ data should pass regardless of the
documents source. With this in mind the metricbeat tests were updated to
run the tests twice, one time with metricbeat data and a second time
with package data.
To generate the archives the `metrics-*` mappings were extracted with
esArchiver from an elasticsearch with the package installed, and the
documents were transformed from the metricbeat documents with [this
script](https://gist.github.com/klacabane/654497ff86053c60af6df15fa6f6f657).
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* comment tests back in for es, kibana, cluster, logstash
* comment tests back in for APM and update data to ECS .monitoring-beats-8-mb
* add beats integration tests and update archive data
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* update queries for elasticsearch package
* fix unit test
* add gitCcs helper function
* modify rest of es queries
* update logstash and kibana queries to use new createQuery
* change beats and apm to use new createQuery
* update changeQuery and remove old one
* make getIndexPattern take request to check for ccs
* fix unit test
* fix unit tests
* update queries and createQuery
* don't add metric constant without dataset in query
* fix types
* fix type
* comment out mb tests
* fix unit test
* fix unit test
* fix
* fix function param
* change to getMetrics name
* change to node_stats
* comment out metricbeat tests
* fix types
* improve types and readability for test
* remove passing of data stream type for now
* add tests for createQuery changes
* update getNewIndexPatterns to take one dataset
* add unit test for getNewIndexPatterns
* fix types
* remove metrics from filter, update tests
* update createNewIndexPatterns to accept new config instead of legacy
* update alert queries to include datas stream index patterns
* update comment
* fix defaulting ccs to * for non cluster requests
* update elasticsearch enterprise module
* update unit test
* remove data_stream.type from queries
* change entsearch to metricbeat module name enterprisesearch
* undo ccs cluster stats change
* fix import
* update alert queries
* fix unit test
* update unit test
* change shard size query to use filter
* change must to filter fix
* update findSupportedBasicLicenseCluster index pattern
* add ccs param to cluster request functions
* update queries for ccs in get_clusters_from_request
* update getBeatsForClusters query
* update clusters apm query
* update enterprisesearch query
* move index pattern to query in fetch for alerts, fix ccs
* remove metricbeat config from alert tests
* fix ts
* add metricset.name back to queries
* comment tests back in
* remove enterprise search checking for standalone cluster to fix test
* update es index metricset name from index_stats to index for mb data
* fix type
* fetchClusters creates index pattern
* fix type
* remove monitoring.ui.metricbeat.index from config and usage in getCollectionStatus
* fix type
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* adapt ES queries to updated document structure
* lint
* Revert "lint"
This reverts commit 2ad61e406c.
* Revert "adapt ES queries to updated document structure"
This reverts commit 25d4357dd2.
* fix cluster state property accesses
* only query index_recovery with ecs compliant indices
* lint
* setup/teardown to support datastreams
* lint
* update _mb archived data to target .monitoring index
* load archive with useCreate for datastream compatibility
* Revert "update _mb archived data to target .monitoring index"
This reverts commit 7bad361fd1.
* ignore non-elasticsearch archived documents
* Revert "ignore non-elasticsearch archived documents"
This reverts commit 26daeb7066.
* use correct index for archived documents
* add datastream lifecycle helper for api-integration tests
* use datastream lifecycle methods
* transform ccr_mb archive
* clean up datastreams
* lint
* load _mb data
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* remove usage of fields being removed in es, update tests
* add Lucene to title of fixed_bit_set_memory_in_bytes instead of generic IndexMemoryMetric class
* update fixtures for integration tests
* remove index segment count
* update translations
* remove usage of fields being removed in es, update tests
* add Lucene to title of fixed_bit_set_memory_in_bytes instead of generic IndexMemoryMetric class
* update fixtures for integration tests
* remove index segment count
* update translations
* Revert "remove index segment count"
This reverts commit d56ce6e746.
* Revert "remove index segment count"
This reverts commit d56ce6e746.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* WIP
* WIP
* Remove unnecessary fields
* Work on node detail page
* Cluster overview looking good
* Index page
* Fix types
* ML jobs
* CCR
* CCR
* We just need total here
* Standalone cluster fix
* Re-enable logstash
* FIx jest test
* Fix tests
* Fix tests
* Fix unused import
* Add new MB-based archives
* Add actual archives
* Fix types
* Add this file back in
* Fix tests and add more
* Update whitelist
* Renames
* Renames
* Only do ccs if enabled
* Updates
* Comment out
* More tests passing
* Another passing test
* More passing, yay
* Forgot to add the actual tests, wow
* CCR
* Fix CI issues
* Missed a field here
* Kibana tests passing
* Fix type issues
* Fix type
* Fix types
* Good chunk of logstash work
* Fix types
* Fix jest test
* Fix issue with get usage in logstash code
* Fix small bug here
* Update archives with proper mappings
* Handle both legacy and mb fields properly
* Fixes
* Fix jest test
* Fix issue
* Getting setup tests in a better state
* Only beats is failing now, which is good
* Progress on cluster listing
* Functional tests passing!
* More progress on cluster tests
* More cluster work
* Fix test
* Last recovery working
* Fix types
* Fix tests
* More tweaks
* Fix snapshot
* Use stats instead of kibana_stats
* Use node and node_stats for logstash
* Beats tests passing
* APM tests passing
* API tests passing!
* Fix types
* Fix tests
* Renames beats-with-restarted-instance archive dirs
Kebab case is disallowed for all newly added files.
* Renames logstash-pipeline dirs
Kebab case disallowed for all new files
* Renames multi-basic dirs
Kebab case disallowed for all new files
* Renames singlecluster-* dirs
Kebab case disallowed for all new files
* Fixes inaccurate path change for archive setup
* Reverts changes to rebuild_all script
Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Some progress on making alerts better in the UI
* Handle edge case
* Updates
* More updates
* Show kibana instances alerts better
* Stop showing missing nodes and improve the detail alert UI
* WIP
* Fix the badge display
* Okay I think this is finally working
* Fix type issues
* Fix tests
* Fix tests
* Fix alert counts
* Fix setup mode listing
* Better detail page view of alerts
* Feedback
* Sorting
* Fix a couple small issues
* Start of unit tests
* I don't think we need this Mock type
* Fix types
* More tests
* Improve tests and fix sorting
* Make this test more resilient
* Updates after merging master
* Fix tests
* Fix types, and improve tests
* PR comments
* Remove nextStep logic
* PR feedback
* PR feedback
* Removing unnecessary changes
* Fixing bad merge issues
* Remove unused imports
* Add tooltip to alerts grouped by node
* Fix up stateFilter usage
* Code clean up
* PR feedback
* Fix state filtering in the category list
* Fix types
* Fix test
* Fix types
* Update snapshots
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* For the nodes listing page, do not fetch shard data for indices
* Optimize our shard queries for the index and node listing pages
* This change isn't necessary
* Rename file and function
* Use optimized query for ml jobs and es overview
* Apply to node/index detail page, and more renaming
* Unnecessary change
* Fix tests
* Add basic tests
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Update moment related packages
* unify moment version in yarn.lock
* adapt ro pluralization fixes
* update some bad pluralization in fixtures/snapshots
* Got the basics working
* Preserve the sorting after calling getNodes
* Remove debug
* Fix issue where the loading state wasn't persisted as long as it needed to be
* Fix shardCount and isOnline not working properly
* Remove this test, as it doesn't make sense with server side sorting
* Ensure we properly await these clicks
* Fix api tests
* Fix tests and add some for pagination/sorting/filtering
* Fix and add a test here
* Add get_node_ids test
* Add setup mode support in the SSP table
* We need to wait for the table to finish loading now that we're sorting on the server
* Also wait for the table to finish loading when filtering
* Use different i18n id
* Fix issue where we expect data but it isn't there
* I/O metrics POC
* Gather correct metric for total
* Remove io stats from advanced
* Move io stats to node overview page
* Add new io metrics
* Add new io metrics
* Add note about supported platforms
* Update snapshot
* Add warning about platforms to all metrics
* Another snapshot update
* Update type and units
* Remove errant trailing comma
* Snapshot update for new types
* Add node_io integration testing
* Switch the order of primaries and total in legend
* Revert "Switch the order of primaries and total in legend"
This reverts commit 895960af10.
* Reorder legend items
* Functional test fixes
* Add disk space percentage to node listing
* Test modification for totalSpace
* Fix test mockup
* Add totalSpace to fixture
* Test fixup
* Remove trailing space per review suggestion
* More fixture updates
* More fixture update
* More fixture updates
* Update mock
* More fixture changes
* Initial implementation
* More logs UI work
* Remove unnecessary code
* Add support to build a logs url based on the cluster and/or node uuid
* Deep link directly
* Update link
* Use CCS to access remote filebeat data
* Fix existing tests
* Add log specific api integration tests
* Localization
* Adding more localization
* Adding unit tests for logs ui
* Client side unit tests, configuration for log fetch count, adding visual callout for why we can't detect logs
* Remove debug
* Fix localization issue
* Update tests
* PR feedback
* Update import
* Format the count to avoid a huge string of numbers
* Use @timestamp instead
* Handle scenario where the time period is not right but the type exists
* Update jest tests
* Update api tests
* Text changes
* Add periods
* Update tests
* [@kbn/expect] "fork" expect.js into repo
* [eslint] autofix references to expect.js
* [tslint] autofix all expect.js imports
* now that expect.js is in strict mode, avoid reassigning fn.length
* Minor change to stack monitoring tooltips
In the Linux documentation and source code, cgroups are always referred to without
capitalization and should be here as well.
* Update Jest snapshots
* Update more test fixtures
* Initial version of CCR monitoring UI
* Adding missing files
* Use icons
* Use new column header text
* Update tests
* Basic of shard detail page
* Do these in parallel
* Disable time picker on ccr page
* Remove summary for now
* Remove unnecessary code here
* Fix a few things on the shard page
* Only send down what we need
* update snapshot
* Handle no ccr_stats documents
* Ensure we fetch the latest
* Updates
* Format the time
* Add api integration tests
* Adding pagination and sorting
* Updated query logic
* Change this back
* Add specific information about the follower and leader lag ops
* Update tests
* UI updates
* Address PR issues
* Fix tests
* Update shapshots
* Add timestamp
* Update tests
* Add a few snapshot tests
* Use timezone formatter
* Fix tests
* Fix aligment of shard table
* PR feedback
* Update snapshots
* Update snapshot
* [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