# Logstash memcached not returning value

**URL:** <https://discuss.elastic.co/t/logstash-memcached-not-returning-value/241649>\
**Category:** Logstash\
**Created:** [July 17, 2020, 1:31pm UTC](https://discuss.elastic.co/t/logstash-memcached-not-returning-value/241649 "2020-07-17T13:31:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WhensTheWeekend](https://avatars.discourse-cdn.com/v4/letter/w/e47c2d/32.png) [@WhensTheWeekend](https://discuss.elastic.co/u/WhensTheWeekend)\
**Post date:** [July 17, 2020, 1:31pm UTC](https://discuss.elastic.co/t/logstash-memcached-not-returning-value/241649/1 "2020-07-17T13:31:41Z")

</div>

Hi, New to memcached and am using is as a filter in logstash as follows;  
memcached {  
id=\>"getconditionterminology"  
hosts =\> ["${memcacheserver}"]  
namespace =\> "code\_concept"  
get =\> {  
"%{rsnstcode}" =\> "[mm\_rsnstcode]"  
"%{stsexpected}" =\> "[mm\_stsexpected]"  
"%{pbmtycode}" =\> "[mm\_pbmtycode]"  
"%{pmstycode}" =\> "[mm\_pmstycode]"  
"%{statuscode}" =\> "[mm\_statuscode]"  
"%{pondtcode}" =\> "[mm\_pondtcode]"  
}  
}

The problem is that if 2 of the variables have the same value e.g. pbmtycode and pmstycode have the same value (e.g. CC\_PRBCOMPLI) then the second returns a value of N/A rather than the value associated with the key - such as ....

[2020-07-17T11:30:00,945][INFO][logstash.filters.ruby][condition\_pipeline] pbmtycode: {"value"=\>"CC\_PRBCOMPLI"}  
[2020-07-17T11:30:00,945][INFO][logstash.filters.ruby][condition\_pipeline] mm\_pbmtycode: {"value"=\>"Complications"}  
[2020-07-17T11:30:00,945][INFO][logstash.filters.ruby][condition\_pipeline] pmstycode: {"value"=\>"CC\_PRBCOMPLI"}  
[2020-07-17T11:30:00,945][INFO][logstash.filters.ruby][condition\_pipeline] mm\_pmstycode: {"value"=\>"N/A"}

Why is this occuring and is there any setting so that if I ask for the same key twice I get the correct value each time? 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:** [August 14, 2020, 1:31pm UTC](https://discuss.elastic.co/t/logstash-memcached-not-returning-value/241649/2 "2020-08-14T13:31:44Z")

</div>

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