-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add url format in the index pattern #3979
Add url format in the index pattern #3979
Conversation
f94922a
to
07949eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great idea!
libbeat/_meta/fields.common.yml
Outdated
@@ -11,6 +11,11 @@ | |||
set in the configuration file, then that value is used. If it is not | |||
set, the hostname is used. To set the Beat name, use the `name` | |||
option in the configuration file. | |||
format: url | |||
params: | |||
urlTemplate: "../app/kibana#/dashboard/79ffd6e0-faa0-11e6-947f-177f697178b8?_a=(query:(query_string:(analyze_wildcard:!t,query:'beat.hostname:{{value}}')))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is is possible to give the dashboard a name that we can reference here that is not a UUID? I think that would be a little better to maintainability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to only apply this to the metricbeat-*
index pattern instead of all beats? Like other beats might want to have their own host specific dashboards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point, Andrew. Let me see if I can do that with the current functionality.
07949eb
to
d2f5f2d
Compare
This was accidentially removed in elastic#4055
…into export_index_pattern_with_url
@@ -15,6 +15,11 @@ | |||
description: > | |||
The hostname as returned by the operating system on which the Beat is | |||
running. | |||
metricbeat.format: url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible we should try not to mix beat specific things into libbeat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only solution that I found to set a different format for beat.hostname
for Metricbeat than for the other beats. Other option would be to remove it from common libbeat fields, but this is a bigger change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, lets keep it then and figure out a way in the long run how we can make this nicer. Perhaps we can somehow have it also in metricbeat in the future and merge the fields values somehow.
Do you think this will also happen to other fields then only beat.hostname
or is this hostname specific?
} else { | ||
} | ||
|
||
if t.esVersion.major >= 5 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is also part of #4079
After discussing internally, we decided to close this PR in favor of a custom widget where the user can configure the Dashboard where a field should point to. |
Add the Url format in the
fields.yml
, in order to generate an index pattern with an Url field. The Url link is needed in order to link thebeat.name
to a host-specific dashboard.Here is an example on how to make
beat.name
a link to a dashboard:As a result, the host name appears as a link to the dashboard in all the tables.
![screen shot 2017-04-10 at 7 35 00 pm](https://cloud.githubusercontent.com/assets/11757159/24874410/d40e6b18-1e24-11e7-8f69-300d2e4d55fe.png)