# How to Differentiate Logs from a Host

**URL:** <https://discuss.elastic.co/t/how-to-differentiate-logs-from-a-host/65132>\
**Category:** Logstash\
**Created:** [November 6, 2016, 11:40am UTC](https://discuss.elastic.co/t/how-to-differentiate-logs-from-a-host/65132 "2016-11-06T11:40:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shashi\_Lanka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shashi_lanka/32/13002_2.png) [@Shashi\_Lanka](https://discuss.elastic.co/u/Shashi_Lanka)\
**Post date:** [November 6, 2016, 11:40am UTC](https://discuss.elastic.co/t/how-to-differentiate-logs-from-a-host/65132/1 "2016-11-06T11:40:18Z")

</div>

Usecase:

I have a test service instance on a host where a log-stash agent is configured. This logs are stashed to a common elastic server. Now this will be test service instance will be cleaned up and another test service instance will be installed and log-stash agent is reconfigured against the same elastic server. Now my question is whether there is a way to say that the logs from same host shown in elastic server are from specific test instance(with unique id).

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 7, 2016, 6:50am UTC](https://discuss.elastic.co/t/how-to-differentiate-logs-from-a-host/65132/2 "2016-11-07T06:50:00Z")

</div>

You could add a tag or other field to the events originating on the test instance. A mutate filter would do.

---

<div class="post-metadata">

**Author:** ![Shashi\_Lanka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shashi_lanka/32/13002_2.png) [@Shashi\_Lanka](https://discuss.elastic.co/u/Shashi_Lanka)\
**Post date:** [November 8, 2016, 1:14pm UTC](https://discuss.elastic.co/t/how-to-differentiate-logs-from-a-host/65132/3 "2016-11-08T13:14:59Z")

</div>

> [@magnusbaeck](#):
>
> mutate

Thanks. Can you please quote me some examples.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 8, 2016, 1:42pm UTC](https://discuss.elastic.co/t/how-to-differentiate-logs-from-a-host/65132/4 "2016-11-08T13:42:55Z")

</div>

The mutate filter's documentation contains examples.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 6, 2016, 1:42pm UTC](https://discuss.elastic.co/t/how-to-differentiate-logs-from-a-host/65132/5 "2016-12-06T13:42:56Z")

</div>

Closed on December 6, 2016, 1:42pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
