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

Wazuh app doesn't open under custom spaces #1234

Closed
rossengeorgiev opened this issue Feb 12, 2019 · 14 comments
Closed

Wazuh app doesn't open under custom spaces #1234

rossengeorgiev opened this issue Feb 12, 2019 · 14 comments
Assignees
Labels
reporter/community Issue reported by the community type/bug Bug issue

Comments

@rossengeorgiev
Copy link

rossengeorgiev commented Feb 12, 2019

As you know, 6.x introduced spaces as a way to manage collections of visualization, dashboards, etc. Selecting a custom space, and trying to open the wazuh app yields a blank screen. See screenshot below.

Wazuh 3.7.2 + Kibana 6.5.4

image

@jesusgn90 jesusgn90 added type/bug Bug issue reporter/community Issue reported by the community labels Feb 12, 2019
@jesusgn90 jesusgn90 added this to To do in Wazuh 3.9.x - 6.6.x via automation Feb 12, 2019
@jesusgn90
Copy link
Contributor

You are right @rossengeorgiev , we've added this to our roadmap and it will be fixed soon, thanks for your feedback. I'll copy here our progress dealing with Kibana spaces.

Best regards

@jesusgn90 jesusgn90 moved this from To do to In progress in Wazuh 3.9.x - 6.6.x Mar 21, 2019
@jesusgn90 jesusgn90 added this to To do in Wazuh 3.9.x - 6.7.x via automation Apr 2, 2019
@jesusgn90 jesusgn90 removed this from In progress in Wazuh 3.9.x - 6.6.x Apr 2, 2019
@jesusgn90 jesusgn90 removed this from To do in Wazuh 3.9.x - 6.7.x Apr 11, 2019
@jesusgn90 jesusgn90 added this to To do in Wazuh TBD via automation Apr 11, 2019
@rhysxevans
Copy link

Hi

Will this fix allow the Wazuh app to "default" to a specified wazuh-alerts index ?

I am investigating the option of multitenancy via spaces , now that some of the security has been released into the basic subscription

Or do we still need to run multiple Kibana instances to get this done? (using searchguard)

Thanks

@jesusgn90 jesusgn90 added this to To do in Wazuh 3.10.0 via automation May 23, 2019
@jesusgn90 jesusgn90 removed this from To do in Wazuh TBD May 23, 2019
@jesusgn90 jesusgn90 moved this from To do to In progress in Wazuh 3.10.0 May 23, 2019
@jesusgn90
Copy link
Contributor

Hi @rhysxevans ,

I think it will filter index patterns, so it will filter indices too, but it won't disable the index pattern creation menu from Kibana.

In any case, we are working on it right now, I'll update this issue with any news into this.

Thanks for your patience.

Regards

@jesusgn90 jesusgn90 self-assigned this May 23, 2019
@jesusgn90
Copy link
Contributor

Related: #1450

@jesusgn90
Copy link
Contributor

For refreshing the known fields, we must add a condition for custom spaces.

Before:

await wzWrapper.updateIndexPatternKnownFields('index-pattern:' + item.id);

After:

 const prefix = item.namespace ? `${item.namespace}:index-pattern:` : 'index-pattern:';
 await wzWrapper.updateIndexPatternKnownFields(`${prefix}${item.id}`);

@jesusgn90
Copy link
Contributor

More news, the Wazuh monitoring pattern under custom spaces is now being created if it's missing (eb1eacf).

Right now this is the status for custom spaces:

  • The app doesn't crash regardless of the namespace being used.
  • Monitoring pattern is created if it's missing for that space.
  • Alert patterns known fields are being refreshed as expected under custom spaces.
  • Monitoring pattern known fields are not being refreshed under custom spaces.
  • The Wazuh app is filtering the patterns depending on the current namespace (@migruiz4).

@rhysxevans you'll have a Wazuh app working under custom spaces soon! In addition, we want to say that we still remember the "multitenancy" question you did, let me continue with the implementation and we'll update you as soon as we can.

@jesusgn90 jesusgn90 added this to the 22th week sprint milestone May 24, 2019
@jesusgn90
Copy link
Contributor

Hi @rhysxevans ,

Today we've fixed the two timelion visualizations under Management > Cluster for custom spaces -> ace891f

We've also fixed the top agent request for Agents preview -> 2ce377c

The task is still in progress but I think the next minor version of Wazuh may include it.

Regards

@jesusgn90
Copy link
Contributor

Here d6307eb we propagate the namespace as a field for new monitoring patterns, otherwise, the app would think it doesn't exist and would try to create a new one.

@jesusgn90
Copy link
Contributor

With 8300144, the reporting module can handle custom namespaces too just adding the proper parameter when searchWazuhAlertsWithPayload is called from the module.

@jesusgn90
Copy link
Contributor

Current status:

  • The app opens regardless of the active space.
  • Monitoring pattern is created if missing regardless of the active space.
  • Default alerts pattern is not created if missing for custom spaces.
  • Alerts patterns known fields are being refreshed for all spaces.

At this point, the task is almost done but a lot of testing is needed.

@jesusgn90
Copy link
Contributor

@juankaromo
Copy link
Contributor

juankaromo commented Jun 12, 2019

Some testing

When testing the branch in a development environment, the following error appears.

image

The first time you access the app with a newly created space [awesome] (now in a production environment) the following error appears. (Cannot find index patterns)

image

The monitoring index-pattern is not created automatically.

image

After creating the wazuh-alerts index pattern the app loads correctly.

@juankaromo
Copy link
Contributor

Update testing

All tests have been performed with the default .kibana index.

Index patterns

  • wazuh-alerts-3.x-* is not created automatically, but is expected behavior ✅
  • wazuh-monitoring-3.x-* is not created automatically, and is not created until you access Overview (created when you build the visualizations). It would be necessary to correct it because in the health check it fails. ⚠
  • After creating it, the app loads correctly. ✅

API management checks
All tests have been carried out successfully. ✅

Basic functions in dashboards and overviews (General and Agents) checks (included Filter checks)
All tests have been carried out successfully. ✅

Management tab checks
All tests have been carried out successfully. ✅

Agents tab checks
All tests have been carried out successfully. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reporter/community Issue reported by the community type/bug Bug issue
Projects
No open projects
Wazuh 3.10.0
  
Done
Development

No branches or pull requests

4 participants