Created
January 5, 2021 15:09
-
-
Save chrisronline/2191a43d0ea26c0330748202175b960e to your computer and use it in GitHub Desktop.
es_version_mismatch
This file contains 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
# ES VERSION MISMATCH | |
PUT _ingest/pipeline/es_change_versions | |
{ | |
"processors": [ | |
{ | |
"script": { | |
"lang": "painless", | |
"source": """ | |
if (ctx.type == "cluster_stats") { | |
String[] versions = new String[] { "7.0.0", "7.1.0", "7.2.0" }; | |
ctx.cluster_stats.nodes.versions = versions; | |
} | |
""" | |
} | |
} | |
] | |
} | |
# Ensure a local exporter is explictly configured so the default pipeline is established | |
PUT _cluster/settings | |
{ | |
"transient": { | |
"xpack.monitoring.exporters": { | |
"local": { | |
"type": "local", | |
"use_ingest": false | |
} | |
} | |
} | |
} | |
# Use the created pipeline | |
PUT .monitoring-es-7-*/_settings | |
{ | |
"index.default_pipeline": "es_change_versions" | |
} | |
# This will unset the pipeline (and therefore resolve the alert) | |
PUT .monitoring-es-7-*/_settings | |
{ | |
"index.default_pipeline": null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment