# Logstash pipeline indexing error

**URL:** <https://discuss.elastic.co/t/logstash-pipeline-indexing-error/352388>\
**Category:** Logstash\
**Created:** [February 2, 2024, 11:29am UTC](https://discuss.elastic.co/t/logstash-pipeline-indexing-error/352388 "2024-02-02T11:29:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_ph](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@mr\_ph](https://discuss.elastic.co/u/mr_ph)\
**Post date:** [February 2, 2024, 11:29am UTC](https://discuss.elastic.co/t/logstash-pipeline-indexing-error/352388/1 "2024-02-02T11:29:22Z")

</div>

Hi team,

I am using ELK stack 8.12 for observability. I am collecting input data from SNMP plugin and filtering the data as per my requirement but while doing that i have multiple index for multiple events that I am collecting so at this time I am not able to index the data into the elasticsearch. I am creating a field named index with respective name as per the events but at the end that index is becoming like this

"index" =\> [  
[0] "index1",  
[1] "index2",  
[2] "Index3",  
[3] "index4"  
like this and my output plugin is like

output {  
elasticsearch {  
hosts =\> ["[https://elasticsaerch:9200](https://elasticsaerch:9200)"]  
ssl.certificate\_authorities : "/certs/cert"  
index =\> "%{index}"  
ssl =\> true  
ilm\_enabled =\> true  
}  
stdout{codec =\> rubydebug}  
}

but in this way i am not able to index the data.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 2, 2024, 1:37pm UTC](https://discuss.elastic.co/t/logstash-pipeline-indexing-error/352388/2 "2024-02-02T13:37:36Z")

</div>

You need to share your logstash configuration to show how you are creating the `index` field.

It cannot be an array, so something needs to be changed.

---

<div class="post-metadata">

**Author:** ![mr\_ph](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@mr\_ph](https://discuss.elastic.co/u/mr_ph)\
**Post date:** [February 12, 2024, 7:26am UTC](https://discuss.elastic.co/t/logstash-pipeline-indexing-error/352388/3 "2024-02-12T07:26:42Z")

</div>

Thank you for the response

There has an issue in the filter part. That's why its shown that way.  
Issue resolved.  
thanks

---

<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:** [March 11, 2024, 7:27am UTC](https://discuss.elastic.co/t/logstash-pipeline-indexing-error/352388/4 "2024-03-11T07:27:31Z")

</div>

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