# Logstash input multiple files output one index elasticsearch failure

**URL:** <https://discuss.elastic.co/t/logstash-input-multiple-files-output-one-index-elasticsearch-failure/72898>\
**Category:** Logstash\
**Created:** [January 26, 2017, 1:03pm UTC](https://discuss.elastic.co/t/logstash-input-multiple-files-output-one-index-elasticsearch-failure/72898 "2017-01-26T13:03:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maher.Glenza](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@Maher.Glenza](https://discuss.elastic.co/u/Maher.Glenza)\
**Post date:** [January 26, 2017, 1:03pm UTC](https://discuss.elastic.co/t/logstash-input-multiple-files-output-one-index-elasticsearch-failure/72898/1 "2017-01-26T13:03:51Z")

</div>

hi ,  
plz i m trying to receive multiple logs then after filteriing i want to have one index containing all filtered logs but i failed this is my config file

input {  
file {  
path =\>"C:\elk\pvin"  
type =\> "pvin"  
start\_position =\> beginning  
sincedb\_path =\> "C:\elkstack\ELK\logstash-5.1.2-Pvin\data\plugins\inputs\file.sincedb\_5eed3ff4207ce42c69ff2b34b669aa79"

}  
file {  
path =\>"C:\elk\router"  
type =\> "router"  
start\_position =\> beginning  
sincedb\_path =\> "C:\elkstack\ELK\logstash-5.1.2-Pvin\data\plugins\inputs\file.sincedb\_5eed3ff4207ce42c69ff2b34b669aa78"

}  
file {  
path =\>"C:\elk\pvout"  
type =\> "pvout"  
start\_position =\> beginning  
sincedb\_path =\> "C:\elkstack\ELK\logstash-5.1.2-Pvin\data\plugins\inputs\file.sincedb\_5eed3ff4207ce42c69ff2b34b669aa77"

}  
}

filter {

```
if [type] == "router"{

```

mutate {  
gsub =\> ["message","|"," "]  
}

```
grok {

        match => ["message","%{TIMESTAMP_ISO8601:dateRouter} : %{UUID:idFlux} %{NUMBER:dateconsommationrouter} %{NUMBER:datefintraitrouter} %{NUMBER:delai} %{WORD:nomFlux} %{WORD:evt} %{GREEDYDATA:messageGenere} %{NUMBER:reforigin} %{NOTSPACE:contractoidval} %{DATA:useroidval} %{NOTSPACE:servname}"]

}
}

else if [type] == "pvin"

{

```

mutate {  
gsub =\> ["message","|"," "]  
}

```
grok {
		
		match => ["message","%{TIMESTAMP_ISO8601:datePvin} : %{UUID:id} %{NUMBER:daterecepPvin} %{NUMBER:datefintraitPvin} %{NUMBER:delai} %{WORD:nomFlux} %{GREEDYDATA:evts} %{WORD:BU} %{NUMBER:reforigin} %{NOTSPACE:contractoidval} %{DATA:useroidval} %{DATA:errorStatus} %{GREEDYDATA:errorDesc} %{NOTSPACE:servname}"]

}

}

else if [type] == "pvout"{

```

mutate {  
gsub =\> ["message","|"," "]  
}

```
grok {
	
		match => ["message","%{NUMBER:messagId} %{NUMBER:dateEnvoiMsgPvout} %{NUMBER:dateRecepRetourPvout} %{NUMBER:delai} %{WORD:nomFlux} %{WORD:evt} %{NUMBER:reforigin} %{WORD:nomBePays} %{NOTSPACE:contractoidval} %{DATA:useroidval} %{DATA:errorStatus} %{NOTSPACE:errorCode} %{NOTSPACE:errorType} %{GREEDYDATA:errorDesc}"]

}
}

```

}

output {  
elasticsearch {  
hosts =\> "localhost:9200"  
index =\> "promise-%{+YYYY.MM.dd}"  
document\_id =\> "%{[idFlux]}"

```
}

```

}

and this is my inputs:  
2017-01-18 16:02:24,166 : 1e045e2f-a06b-40c9-954e-cc26b0ead93a|20170118160224|20170118160224|84|CACC|CONTRACT\_CREATION|[912296384,aur][912296385,sui]|44|0x7125838BA5F500010001D64F||inpmsrtr1n

912300867|20170118154716095|20170118154716126|31|CUSE\_OFR|USER\_CREATION|44|erbOFR|0x7125838ba5f600010001d6bf|0x7125838ba5f600010001d6ef|OK||

2017-01-18 16:02:23,362 : 1e045e2f-a06b-40c9-954e-cc26b0ead93a|20170118160223|20170118160223|154|CACC|[CONTRACT\_CREATION]|OFR|44|0x7125838BA5F500010001D64F||OK|||inpmsvin1n

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 27, 2017, 1:54am UTC](https://discuss.elastic.co/t/logstash-input-multiple-files-output-one-index-elasticsearch-failure/72898/2 "2017-01-27T01:54:18Z")

</div>

Failed how?

---

<div class="post-metadata">

**Author:** ![Maher.Glenza](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@Maher.Glenza](https://discuss.elastic.co/u/Maher.Glenza)\
**Post date:** [January 27, 2017, 9:08am UTC](https://discuss.elastic.co/t/logstash-input-multiple-files-output-one-index-elasticsearch-failure/72898/3 "2017-01-27T09:08:39Z")

</div>

no i had a krok fail i replaced it and it works now but i fail to make join between logs now

---

<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:** [February 24, 2017, 9:08am UTC](https://discuss.elastic.co/t/logstash-input-multiple-files-output-one-index-elasticsearch-failure/72898/4 "2017-02-24T09:08:43Z")

</div>

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