Linking from a Kibana plugin into the Security app using the Locator service

The following document provides excellent tips for deep linking into the Discover app from within a Kibana plugin using a locator service.

The two main considerations are:

  1. Getting a proper base path
  2. Specifying state

I want to avoid hard-coding brittle URL's within our plugin's source code when linking out to:
Security > Hosts > Events

GitHub's README, in the link above, points to the source code for the Discover app's locator contract:
kibana > src > plugins > discover > public > locator.ts

However I can't find a plugin named "security" in the repository, perhaps that's because it's simply a core service? Is there any guidance for generating robust state to be used within the URL's name/value pairs, rather than embedding an HREF like this in our source code?


@BitBite welcome back to the Discuss forum!
The security plugin is an x-pack plugin and you need to have security enabled to use any of those features.
I could only find one match to /app/security/hosts/events in the main branch and that's for a cypress test setup. Essentially, your plugin will have to depend on the security_solution xpack plugin, I'm not familiar with integrating to that one though. Maybe the README is a good starting point for that specific plugin?

As for using deep links in your app, maybe the type documentation on deep linking could give you some pointers.