Skip to content

Commit 4817f48

Browse files
committed
Get all recoveries if xpack.enabled is true
1 parent 1c6ac3c commit 4817f48

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

metricbeat/module/elasticsearch/index_recovery/index_recovery.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,17 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
4949

5050
config := struct {
5151
ActiveOnly bool `config:"index_recovery.active_only"`
52+
XPack bool `config:"xpack.enabled"`
5253
}{
53-
ActiveOnly: false,
54+
ActiveOnly: true,
55+
XPack: false,
5456
}
5557
if err := base.Module().UnpackConfig(&config); err != nil {
5658
return nil, err
5759
}
5860

5961
localRecoveryPath := recoveryPath
60-
if config.ActiveOnly {
62+
if !config.XPack && config.ActiveOnly {
6163
localRecoveryPath = localRecoveryPath + "?active_only=true"
6264
}
6365

0 commit comments

Comments
 (0)