there is a way to do this, however it would probably force you to re-index your windows index in order to have the same consistent name across your whole data. Otherwise you'll still see your Host two times.
I will give you a small write-up on how I achieved the shortname instead of the FQDN for my windows host:
What you need:
Winlogbeat
Logstash
Elasticsearch
winlogbeat.yml
Configure your Winlogbeat to send to a logstash instance.
Add a tag to identify this specific hosts logs.
processors:
- add_tags:
tags: "WindowsHost"
Logstash
You need a logstash instance to make use of the mutate filter, more specifically its Update Module.
Define a pipeline that looks for beat inputs. Mine looks like this:
Disclaimer: You will need to create a pipeline.yml file in order to tell logstash where your pipeline is located.
The input part is rather self explanatory. It's looking for any beat input coming in through port 5044 (default logstash port)
In the filter section we first check if the log has the Tag "WindowsHost", if that is the case we apply two different mutate filters.
First we update the field host.name (it is imperative that you write it as [host][name], it will NOT work with host.name) with "YOUR_SHORTNAME".
Second, this is optional, we remove the WindowsHost tag
The output part just points the transformed log to your elasticsearch instance and the index I set up for it.
Beware that I am using environment variables here.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.