Adding xpack code for ES index recovery metricset#8106
Adding xpack code for ES index recovery metricset#8106ycombinator merged 4 commits intoelastic:masterfrom ycombinator:metricbeat/elasticsearch/index-recovery/x-pack
Conversation
| // specific language governing permissions and limitations | ||
| // under the License. | ||
|
|
||
| package index_recovery |
There was a problem hiding this comment.
don't use an underscore in package name
| ActiveOnly bool `config:"index_recovery.active_only"` | ||
| }{ | ||
| ActiveOnly: true, | ||
| ActiveOnly: false, |
There was a problem hiding this comment.
I made this change to be consistent with the current default value in XPack Monitoring:
However, it means that even for the non-xpack-monitoring case we will collect all index recoveries, not just active ones. WDYT of that?
There was a problem hiding this comment.
Ignore this comment, I was able to make this flag smarter in 4817f48.
ruflin
left a comment
There was a problem hiding this comment.
Code overall looks good to me. Some minor comments.
|
|
||
| "github.com/elastic/beats/metricbeat/helper/elastic" | ||
| "github.com/elastic/beats/metricbeat/module/elasticsearch" | ||
|
|
| continue | ||
| } | ||
|
|
||
| for _, value = range shards { |
There was a problem hiding this comment.
I'm a bit worried that we reuse the name value here.
| continue | ||
| } | ||
|
|
||
| value, ok = indexData["shards"] |
There was a problem hiding this comment.
What is the reason here that shards etc. could be missing?
Also worried about reuse of value here.
There was a problem hiding this comment.
What is the reason here that shards etc. could be missing?
It should never happen. I was just being safe with the ok check.
There was a problem hiding this comment.
+1 on the ok check. Was mainly curious if in "normal" behaviour of the endpoint we expect this to happen. They way I understand your answer it's not the case.
|
@ruflin Addressed all feedback from last review. Ready for your 👀 again. Thanks! |
|
jenkins, test this |
This PR teaches the
elasticsearch/index_recoverymetricset to indexindex_recoverydocuments into.monitoring-es-6-mb-*indices. These documents should be compatible in structure toindex_recoverydocuments in the current.monitoring-es-6-*indices indexed via the internal monitoring method.