[Stack Monitoring] update rules queries to support metricbeat 8.0 [fixed PR]#125748
Merged
jasonrhodes merged 11 commits intoelastic:mainfrom Feb 16, 2022
Merged
[Stack Monitoring] update rules queries to support metricbeat 8.0 [fixed PR]#125748jasonrhodes merged 11 commits intoelastic:mainfrom
jasonrhodes merged 11 commits intoelastic:mainfrom
Conversation
4 tasks
bb1b054 to
dcf4de6
Compare
neptunian
reviewed
Feb 16, 2022
x-pack/plugins/monitoring/server/lib/alerts/create_dataset_query_filter.ts
Show resolved
Hide resolved
neptunian
reviewed
Feb 16, 2022
| const { | ||
| _index: monitoringIndexName, | ||
| _source: { index_stats: indexStats }, | ||
| _source: { index_stats: indexStats, elasticsearch }, |
Contributor
There was a problem hiding this comment.
if you just declare indexStats like this:
const indexStats = topHit._source.index_stats || topHit._source.elasticsearch?.index, I don't think you'd need to make any other changes below this line @klacabane
Contributor
There was a problem hiding this comment.
This will make the 8.0.1 backport a bit more painful in this file as well.
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
neptunian
approved these changes
Feb 16, 2022
klacabane
approved these changes
Feb 16, 2022
Member
Author
|
Thanks to the amazing new PR cloud deploy tool, I've just verified this PR fixes the SM CPU, Memory (JVM), and Disk Usage alerts in cloud! 🙌 |
Contributor
💔 All backports failed
How to fixRe-run the backport manually: Questions ?Please refer to the Backport tool documentation |
klacabane
pushed a commit
to klacabane/kibana
that referenced
this pull request
Feb 16, 2022
…xed PR] (elastic#125748) * update queries to use metricset.name and fix paths * fix ccr query * fix cluster health query paths * update elasticsearch version mismatch * update fetchLicense paths * use ecs properties in fetch_index_shard_size * Clarified comment about createDatasetFilter * Re-editing a clarifying comment * Small comment edit * Revert "use ecs properties in fetch_index_shard_size" This reverts commit cdf8b24. * simplify fetch_index_shard_size document handling Co-authored-by: neptunian <sandra.gonzales@elastic.co> Co-authored-by: klacabane <kevin.lacabane@elastic.co> (cherry picked from commit 7126bc9) # Conflicts: # x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.ts
klacabane
pushed a commit
to klacabane/kibana
that referenced
this pull request
Feb 16, 2022
…xed PR] (elastic#125748) * update queries to use metricset.name and fix paths * fix ccr query * fix cluster health query paths * update elasticsearch version mismatch * update fetchLicense paths * use ecs properties in fetch_index_shard_size * Clarified comment about createDatasetFilter * Re-editing a clarifying comment * Small comment edit * Revert "use ecs properties in fetch_index_shard_size" This reverts commit cdf8b24. * simplify fetch_index_shard_size document handling Co-authored-by: neptunian <sandra.gonzales@elastic.co> Co-authored-by: klacabane <kevin.lacabane@elastic.co> (cherry picked from commit 7126bc9) # Conflicts: # x-pack/plugins/monitoring/server/lib/alerts/create_dataset_query_filter.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_ccr_read_exceptions.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_ccr_read_exceptions.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_cpu_usage_node_stats.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_cpu_usage_node_stats.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_disk_usage_node_stats.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_disk_usage_node_stats.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_elasticsearch_versions.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_elasticsearch_versions.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_index_shard_size.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_index_shard_size.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_kibana_versions.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_kibana_versions.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_licenses.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_licenses.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_logstash_versions.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_logstash_versions.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_memory_usage_node_stats.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_memory_usage_node_stats.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_nodes_from_cluster_stats.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_nodes_from_cluster_stats.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_thread_pool_rejections_stats.ts
klacabane
added a commit
that referenced
this pull request
Feb 16, 2022
….0 [fixed PR] (#125748) (#125856) * [Stack Monitoring] update rules queries to support metricbeat 8.0 [fixed PR] (#125748) * update queries to use metricset.name and fix paths * fix ccr query * fix cluster health query paths * update elasticsearch version mismatch * update fetchLicense paths * use ecs properties in fetch_index_shard_size * Clarified comment about createDatasetFilter * Re-editing a clarifying comment * Small comment edit * Revert "use ecs properties in fetch_index_shard_size" This reverts commit cdf8b24. * simplify fetch_index_shard_size document handling Co-authored-by: neptunian <sandra.gonzales@elastic.co> Co-authored-by: klacabane <kevin.lacabane@elastic.co> (cherry picked from commit 7126bc9) # Conflicts: # x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.ts * esClient still returns metadata Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
klacabane
added a commit
that referenced
this pull request
Feb 16, 2022
….0 [fixed PR] (#125748) (#125877) * [Stack Monitoring] update rules queries to support metricbeat 8.0 [fixed PR] (#125748) * update queries to use metricset.name and fix paths * fix ccr query * fix cluster health query paths * update elasticsearch version mismatch * update fetchLicense paths * use ecs properties in fetch_index_shard_size * Clarified comment about createDatasetFilter * Re-editing a clarifying comment * Small comment edit * Revert "use ecs properties in fetch_index_shard_size" This reverts commit cdf8b24. * simplify fetch_index_shard_size document handling Co-authored-by: neptunian <sandra.gonzales@elastic.co> Co-authored-by: klacabane <kevin.lacabane@elastic.co> (cherry picked from commit 7126bc9) # Conflicts: # x-pack/plugins/monitoring/server/lib/alerts/create_dataset_query_filter.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_ccr_read_exceptions.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_ccr_read_exceptions.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_cluster_health.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_clusters.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_cpu_usage_node_stats.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_cpu_usage_node_stats.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_disk_usage_node_stats.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_disk_usage_node_stats.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_elasticsearch_versions.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_elasticsearch_versions.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_index_shard_size.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_index_shard_size.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_kibana_versions.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_kibana_versions.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_licenses.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_licenses.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_logstash_versions.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_logstash_versions.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_memory_usage_node_stats.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_memory_usage_node_stats.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_missing_monitoring_data.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_nodes_from_cluster_stats.test.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_nodes_from_cluster_stats.ts # x-pack/plugins/monitoring/server/lib/alerts/fetch_thread_pool_rejections_stats.ts * import createDatasetFilter * target correct filter property Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #125035
Summary
This PR replaces #125315 because I screwed that one up with a bad merge that resulted in tons of commits getting mixed into the PR.
@neptunian's original summary was:
TODO
Backporting to 8.0.1 notes:
createDatasetFilterdoesn't exist in 8.0.0 so will need add themetricset.namein aboolshouldalong withtype(legacy). no need to adddata_stream.datasetterm