Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #15802 to 7.6: Do not load dashboards where not available #15851

Merged
merged 2 commits into from
Jan 28, 2020

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Jan 27, 2020

Cherry-pick of PR #15802 to 7.6 branch. Original message:

What does this PR do?

This PR adds a new setting to Beat to indicate if it has a dashboard or not. If the Beat lacks dashboards, running setup does not attempt to load those.

Why is it important?

Running the command setup fails if the Beat does not have dashboards in the appropriate folder.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made the corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

How to test this PR locally

Both Journalbeat and Functionbeat are affected. So both Beats can/should be tested.

./functionbeat setup

Related issues

Closes #13276
Closes #11751

@@ -31,7 +31,7 @@ import (
var Version = "9.9.9"
var Name = "mockbeat"

var Settings = instance.Settings{Name: Name, Version: Version}
var Settings = instance.Settings{Name: Name, Version: Version, HasDashboards: true}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported var Settings should have comment or be unexported

@@ -31,7 +31,7 @@ import (
var Version = "9.9.9"
var Name = "mockbeat"

var Settings = instance.Settings{Name: Name, Version: Version}
var Settings = instance.Settings{Name: Name, Version: Version, HasDashboards: true}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported var Settings should have comment or be unexported

@kvch kvch force-pushed the backport_15802_7.6 branch from b47dab8 to 0f6af22 Compare January 27, 2020 16:44
kvch and others added 2 commits January 28, 2020 08:48
## What does this PR do?

This PR adds a new setting to Beat to indicate if it has a dashboard or not. If the Beat lacks dashboards, running `setup` does not attempt to load those.

## Why is it important?

Running the command `setup` fails if the Beat does not have dashboards in the appropriate folder.

## Checklist

<!-- Mandatory
Add a checklist of things that are required to be reviewed in order to have the PR approved

List here all the items you have verified BEFORE sending this PR. Please DO NOT remove any item, striking through those that do not apply. (Just in case, strikethrough uses two tildes. ~~Scratch this.~~)
-->

- [x] My code follows the style guidelines of this project
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] I have made the corresponding change to the default configuration files
- [x] I have added tests that prove my fix is effective or that my feature works

## How to test this PR locally

Both Journalbeat and Functionbeat are affected. So both Beats can/should be tested.

```sh
./functionbeat setup
```

## Related issues

Closes elastic#13276
Closes elastic#11751
(cherry picked from commit 8260623)
@kvch kvch force-pushed the backport_15802_7.6 branch from 0f6af22 to eac0fb9 Compare January 28, 2020 07:50
@kvch
Copy link
Contributor Author

kvch commented Jan 28, 2020

Failing tests are unrelated.

@kvch kvch merged commit 03967b9 into elastic:7.6 Jan 28, 2020
@andresrc andresrc added the Team:Integrations Label for the Integrations team label Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants