# If in output conf stop working!

**URL:** <https://discuss.elastic.co/t/if-in-output-conf-stop-working/36980>\
**Category:** Logstash\
**Created:** [December 11, 2015, 1:21pm UTC](https://discuss.elastic.co/t/if-in-output-conf-stop-working/36980 "2015-12-11T13:21:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashwin2011](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ashwin2011](https://discuss.elastic.co/u/ashwin2011)\
**Post date:** [December 11, 2015, 1:21pm UTC](https://discuss.elastic.co/t/if-in-output-conf-stop-working/36980/1 "2015-12-11T13:21:19Z")

</div>

Hi everyone,

I have configure my output conf in logstash to send to select data to different indexes but one it just stop working I dont think that I made any mistake in my codes any suggestions ?

below is my conf :

output {

```
if "_grokparsefailure" in [tags] {
  elasticsearch { host => '10.64.50.30'
                    protocol => "http"
                    cluster => "momocluster"
                   index => "grokfail"
   } }

if [host] == "indi01" {
  elasticsearch { host => '10.64.50.30'
                    protocol => "http"
                    cluster => "momocluster"
                   index => "indi01-%{+YYYY.MM}"
   } }

 if "indi02" in [host] {
  elasticsearch { host => '10.64.50.30'
                    protocol => "http"
                    cluster => "momocluster"
                   index => "indi02-%{+YYYY.MM}"
   } }

if [host] == "indi03" {
  elasticsearch { host => '10.64.50.30'
                    protocol => "http"
                    cluster => "momocluster"
                   index => "indi03-%{+YYYY.MM}"
   } }

if [host] == "indi04" {
  elasticsearch { host => '10.64.50.30'
                    protocol => "http"
                    cluster => "momocluster"
                   index => "indi04-%{+YYYY.MM}"
   } }

 if [host] == "indi05" {
  elasticsearch { host => '10.64.50.30'
                    protocol => "http"
                    cluster => "momocluster"
                   index => "indi05-%{+YYYY.MM}"
   } }

if [host] == "indi06" {
  elasticsearch { host => '10.64.50.30'
                    protocol => "http"
                    cluster => "momocluster"
                   index => "indi06-%{+YYYY.MM}"
   } }

if [host] == "indi07" {
  elasticsearch { host => '10.64.50.30'
                    protocol => "http"
                    cluster => "momocluster"
                   index => "indi07-%{+YYYY.MM}"
   } }

if [host] == "indi08" {
  elasticsearch { host => '10.64.50.30'
                    protocol => "http"
                    cluster => "momocluster"
                   index => "indi08-%{+YYYY.MM}"
   } }

    if [type] == "syslog" {
  elasticsearch { host => '10.64.50.30'
                    protocol => "http"
                    cluster => "momocluster"
                   index => "graylog2_0"
   } }

  stdout { codec => rubydebug }

```

}

On sense :

GET /indi08/ufdb/\_search :

{  
"took": 1,  
"timed\_out": false,  
"\_shards": {  
"total": 3,  
"successful": 3,  
"failed": 0  
},  
"hits": {  
"total": 0,  
"max\_score": null,  
"hits": []  
}  
}

It was working correctly, it stopped output to the indexes. In the Logs of logstash.stdout the filter is done correctly.

---

<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:** [December 11, 2015, 2:50pm UTC](https://discuss.elastic.co/t/if-in-output-conf-stop-working/36980/2 "2015-12-11T14:50:04Z")

</div>

Is indi08 an alias to all [indi08-YYYY.MM](http://indi08-YYYY.MM) indexes?

Not that it has anything to do with your problem, but you can replace your eight indiNN outputs with a single output (which also drops the `cluster` option which isn't useful for HTTP):

```auto
if [host] =~ /^indi\d{2}$/ {
  elasticsearch {
    host => '10.64.50.30'
    protocol => "http"
    index => "%{host}-%{+YYYY.MM}"
  }
}

```

---

<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:** [July 6, 2017, 5:18am UTC](https://discuss.elastic.co/t/if-in-output-conf-stop-working/36980/3 "2017-07-06T05:18:51Z")

</div>

Closed on July 6, 2017, 5:18am UTC


