# Index pattern routing

**URL:** <https://discuss.elastic.co/t/index-pattern-routing/256897>\
**Category:** Kibana\
**Created:** [November 27, 2020, 3:34pm UTC](https://discuss.elastic.co/t/index-pattern-routing/256897 "2020-11-27T15:34:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mats.ahlbom](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@mats.ahlbom](https://discuss.elastic.co/u/mats.ahlbom)\
**Post date:** [November 27, 2020, 3:34pm UTC](https://discuss.elastic.co/t/index-pattern-routing/256897/1 "2020-11-27T15:34:38Z")

</div>

Hi,

We have setup our cluster and we have some logs and metrics flowing in to Elastic.  
Now we have tried to add Gerrit logs and metrics.

The problem I have is the metrics-data is in both of the Kibana patterns.

I have configured Gerrit to send logs to our Logstash.

```auto
[remote "elasticsearch"]
  url = http://elk-ls01.foobar.se:5046/gerrit

```

And Metrics using Graphite-plugin in Gerrit

```auto
[graphite]
  host = elk-ls01.foobar.se
  port = 5049
  prefix = gerritmetrics

```

In Logstash I have following two pipelines:  
Gerrit-logs pipeline file.

```auto
input {
  http {
    port => 5046
    codec => json
    id => gerrit
  }
}

output {
  elasticsearch {
    hosts => ["https://elk-es01.foobar.se:9200", "https://elk-es02.foobar.se:9200", "https://elk-es03.foobar.se:9200"]
    index => "gerrit-logs-%{+YYYY.MM.dd}"
    user => "logstash_internal"
    password => "XXXXXXXX"
  }
}

```

Gerrit Metrics pipeline file.

```auto
input {
  graphite {
    id => "gerritmetrics"
    port => 5049
  }
}

output {
  elasticsearch {
    hosts => ["https://elk-es01.foobar.se:9200", "https://elk-es02.foobar.se:9200", "https://elk-es03.foobar.se:9200"]
    index => "logstash-gerrit-metrics-%{+YYYY.MM.dd}"
    user => "logstash_internal"
    password => "XXXXXXXX"
  }
}

```

In Elasic I have two Kibana pattern  
gerrit-logs-\*  
logstash-gerrit-metrics-\*

Where should I look to get this separated?

I want Gerrit log to go to gerrit-logs pattern and Gerrit metrics go to logstash-gerrit-metrics-\* pattern.

Thanks for you help!

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [November 30, 2020, 9:27am UTC](https://discuss.elastic.co/t/index-pattern-routing/256897/2 "2020-11-30T09:27:44Z")

</div>

The config looks right to me. But maybe gerrit also sends the metrics from their remote? If that's the case, you could use a filter in logstash to drop the metrics messages from the gerrit-logs indices.

---

<div class="post-metadata">

**Author:** ![mats.ahlbom](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@mats.ahlbom](https://discuss.elastic.co/u/mats.ahlbom)\
**Post date:** [November 30, 2020, 10:04am UTC](https://discuss.elastic.co/t/index-pattern-routing/256897/3 "2020-11-30T10:04:54Z")

</div>

I added gerrit-logs first and that ran for a cupule of days. There was no metrics in the gerrit-logs index.

On my first try to add Graphite I used JSON as input in Logstash, it didn't work. After changing it to Graphite input I got entry's in the indexes.  
With that in mind I think I messed it up in Logstash or somewhere down the road to Kibana index.

Can I done something wrong in some ingress settings in the cluster?

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [November 30, 2020, 10:19am UTC](https://discuss.elastic.co/t/index-pattern-routing/256897/4 "2020-11-30T10:19:10Z")

</div>

The config looks correct to me. But do ask in the Logstash part of this forum, since this is really not a Kibana issue. Kibana only shows what data you have in Elasticsearch, nothing less, nothing more.

---

<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 28, 2020, 10:19am UTC](https://discuss.elastic.co/t/index-pattern-routing/256897/5 "2020-12-28T10:19:13Z")

</div>

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