Cherry-pick #11856 to 7.1: [Heartbeat] Remove not needed flags from setup command#12126
Merged
ruflin merged 1 commit intoelastic:7.1from May 9, 2019
Merged
Cherry-pick #11856 to 7.1: [Heartbeat] Remove not needed flags from setup command#12126ruflin merged 1 commit intoelastic:7.1from
ruflin merged 1 commit intoelastic:7.1from
Conversation
The setup command until now contained all the possible options from the other Beats. As Heartbeat does not ship anymore with dashboards, the --dashboards command is not needed anymore and is only confusing. I also removed all the other commands except `--ilm-policy` and `--template`. I'm not aware that `--pipelines` or `--machine-learning` would be used.
Here the comparison between `./heartbeat setup -h` from before and after.
Before:
```
This command does initial setup of the environment:
* Index mapping template in Elasticsearch to ensure fields are mapped.
* Kibana dashboards (where available).
* ML jobs (where available).
* Ingest pipelines (where available).
* ILM policy (for Elasticsearch 6.5 and newer).
Usage:
heartbeat setup [flags]
Flags:
--dashboards Setup dashboards
-h, --help help for setup
--ilm-policy Setup ILM policy
--machine-learning Setup machine learning job configurations
--pipelines Setup Ingest pipelines
--template Setup index template
```
After:
```
This command does initial setup of the environment:
* Index mapping template in Elasticsearch to ensure fields are mapped.
* ILM Policy
Usage:
heartbeat setup [flags]
Flags:
-h, --help help for setup
--ilm-policy Setup ILM policy
--template Setup index template
```
In this PR I did not include a check for the config option `setup.dashboards` to make sure they are not there like apm-server does (https://github.com/elastic/apm-server/blob/2baefab778fdfe70c47bc2fb488677b2e43e4635/beater/beater.go#L60) as I don't think it's necessary.
(cherry picked from commit e098e00)
houndci-bot
reviewed
May 9, 2019
| "github.com/elastic/beats/libbeat/cmd/instance" | ||
|
|
||
| "github.com/elastic/beats/heartbeat/beater" | ||
| _ "github.com/elastic/beats/heartbeat/monitors/defaults" |
There was a problem hiding this comment.
a blank import should be only in a main or test package, or have a comment justifying it
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
elastic#12126) The setup command until now contained all the possible options from the other Beats. As Heartbeat does not ship anymore with dashboards, the --dashboards command is not needed anymore and is only confusing. I also removed all the other commands except `--ilm-policy` and `--template`. I'm not aware that `--pipelines` or `--machine-learning` would be used. Here the comparison between `./heartbeat setup -h` from before and after. Before: ``` This command does initial setup of the environment: * Index mapping template in Elasticsearch to ensure fields are mapped. * Kibana dashboards (where available). * ML jobs (where available). * Ingest pipelines (where available). * ILM policy (for Elasticsearch 6.5 and newer). Usage: heartbeat setup [flags] Flags: --dashboards Setup dashboards -h, --help help for setup --ilm-policy Setup ILM policy --machine-learning Setup machine learning job configurations --pipelines Setup Ingest pipelines --template Setup index template ``` After: ``` This command does initial setup of the environment: * Index mapping template in Elasticsearch to ensure fields are mapped. * ILM Policy Usage: heartbeat setup [flags] Flags: -h, --help help for setup --ilm-policy Setup ILM policy --template Setup index template ``` In this PR I did not include a check for the config option `setup.dashboards` to make sure they are not there like apm-server does (https://github.com/elastic/apm-server/blob/2baefab778fdfe70c47bc2fb488677b2e43e4635/beater/beater.go#L60) as I don't think it's necessary. (cherry picked from commit 176e577)
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.
Cherry-pick of PR #11856 to 7.1 branch. Original message:
The setup command until now contained all the possible options from the other Beats. As Heartbeat does not ship anymore with dashboards, the --dashboards command is not needed anymore and is only confusing. I also removed all the other commands except
--ilm-policyand--template. I'm not aware that--pipelinesor--machine-learningwould be used.Here the comparison between
./heartbeat setup -hfrom before and after.Before:
After:
In this PR I did not include a check for the config option
setup.dashboardsto make sure they are not there like apm-server does (https://github.com/elastic/apm-server/blob/2baefab778fdfe70c47bc2fb488677b2e43e4635/beater/beater.go#L60) as I don't think it's necessary.