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

Do not load dashboards where not available #15802

Merged
merged 4 commits into from
Jan 27, 2020

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Jan 24, 2020

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

@kvch kvch requested a review from blakerouse January 24, 2020 08:39
@kvch kvch requested a review from a team as a code owner January 24, 2020 08:39
@kvch kvch added the needs_backport PR is waiting to be backported to other branches. label Jan 24, 2020
Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Looks good to me.

This is a good improvement because from the command output I would expect that functionbeat was supposed to have a dashboard but it was just missing in the released files. From this change I can tell that actually it doesn't have a dashboard at all so those messages should not be shown in the case of functionbeat (also in the case for some others).

@@ -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 fix-libbeat-do-not-load-dashboards branch from 07a2998 to 5f5ea30 Compare January 24, 2020 16:21
@kvch kvch merged commit 8260623 into elastic:master Jan 27, 2020
kvch added a commit to kvch/beats that referenced this pull request Jan 27, 2020
## 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 added v7.7.0 and removed needs_backport PR is waiting to be backported to other branches. labels Jan 27, 2020
@kvch kvch added the v7.6.0 label Jan 27, 2020
kvch added a commit that referenced this pull request Jan 27, 2020
## 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 #13276
Closes #11751
(cherry picked from commit 8260623)
kvch added a commit to kvch/beats that referenced this pull request Jan 28, 2020
## 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 added a commit that referenced this pull request Jan 28, 2020
…#15851)

* Do not load dashboards where not available (#15802)

## 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 #13276
Closes #11751
(cherry picked from commit 8260623)

* fix changelog again
@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
Team:Integrations Label for the Integrations team v7.6.0 v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Functionbeat 7.1 using setup command failing hard on dashboard loading Journalbeat 7.0.0 setup dashboard
4 participants