Add basic index recovery metricset#7225
Conversation
There was a problem hiding this comment.
don't use an underscore in package name
There was a problem hiding this comment.
don't use an underscore in package name
There was a problem hiding this comment.
don't use an underscore in package name
There was a problem hiding this comment.
don't use an underscore in package name
There was a problem hiding this comment.
don't use an underscore in package name
There was a problem hiding this comment.
don't use an underscore in package name
0173924 to
6de0631
Compare
52e9a1d to
e82ad36
Compare
There was a problem hiding this comment.
I added an if err check and send an the error event. I wonder if this is the right thing to do here.
There was a problem hiding this comment.
I now skiped the error completely. I initially reported it as an event. The good thing about it is that I detected a problem I had in the schema. The bad thing was that now instead of in the logs the user would have tons of documents in his index with errors which I think is not good.
There was a problem hiding this comment.
Maybe we could log the errors instead of sending them, or collect them in a multierror and send them all together as an only event.
There was a problem hiding this comment.
Would we want to explicitely check if shards exists?
There was a problem hiding this comment.
I wouldn't add more variables to this template, for this kind of settings, the extra option is used In system and munin modules, this could be also used here (or we could also rename the extra to metricset_options if this is the use case for extra as it seems to be used for similar things).
There was a problem hiding this comment.
removed, didn't reliase extra is there.
There was a problem hiding this comment.
Is recoveryPath used to check master state?
There was a problem hiding this comment.
The full url must be passed as this is the url that is revert to afterwards again. If not passed parts of the path will go missing. This is because of a hack to reuse the http client.
There was a problem hiding this comment.
Should this be shard_id?
There was a problem hiding this comment.
Kind of, see my comment in the code: https://github.com/elastic/beats/pull/7225/files#diff-d198e8deee0000763245926eefe134eaR32
TBH I'm still struggling a bit with what shard.id is as I would expect it to be a unique identifier but it's a counting integer related to an index as far as I can see.
There was a problem hiding this comment.
What about other fields such as translog.*, start_time, stop_time, etc.? Are you planning on adding them later?
There was a problem hiding this comment.
Maybe I'm missing something but at first glance it looks like info isn't actually being used here?
There was a problem hiding this comment.
You are right, I added it out of habit as the plan is to add the xpack part where it will be need I think. Should I remove it?
There was a problem hiding this comment.
Yeah, my preference would be to remove it until we need it. Otherwise it might be confusing as to why it's there.
There was a problem hiding this comment.
Ok, removed and new version pushed.
There was a problem hiding this comment.
See my other comment about info not being used.
Add basic metricset for index recovery. By default only data about indices is fetched that are currently recovering. Further changes: * Fix `NO_COMPOSE` flag for Golang integration tests * Clean up elasticsearch.GetInfo to also use `fetchPath` function * Enhance testing to also support settings metricset configs.
Add basic metricset for index recovery. By default only data about indices is fetched that are currently recovering.
Further changes:
NO_COMPOSEflag for Golang integration testsfetchPathfunction