Logstash memcached filter plugin can not open more then 4 connection

Hi Team,
Need help on logstash Memcached filter plugin.
I see the logstash memcached filter plugin can not open more than 4 connections to Memcached server.

is there any configuration required for this memcached filter plugin?

thanks in advance

Regards,
Rama

Need help on this

Hello,

It is not clear what your issue is, can you provide more information?

What is your configuration? What is not working? Do you have any errors in your logs? How are you counting the connections?

Hello Leandro,
Thank you for looking into my issue. Below is my logstash Memcached plugin filter.

filter {
grok {
   match => {
       patterns_dir => "${LOGSTASH_HOME}/patterns/"
       "message" => "%{HOSTNAME:host}"
           }
  }
###################### memecached begin #############################
    mutate {
           add_field => { "host_key" => "%{host}" }
    }
    fingerprint {
            source => ["host_key"]
            target => ["memcache_value"]
    }
 
    memcached {
 
           hosts => [ "xx.xx.xx.xx:19663" ]
            get => {
                "%{host_key}" => "field1"
            }
            id => "memcached-get"
     }
 
    if [field1] != [memcache_value] {
            memcached {
            hosts => [ "xx.xx.xx.xx:19663" ]
            ttl => 18000
            set => {
                     "[memcache_value]" => "%{host_key}"
                    }
            id => "memcached-set"
            }
    }
    mutate { remove_field => [ "host_key", "memcache_value" ] }
 
###################### memecached end #############################

}
'''

**Logstash configuration**

* workers: 8
* batch_size : 500
* batch_delay : 1000
* consumer thread: 5
* No of topic partition: 5

in the Memcached top tool ( https://github.com/eculver/memcache-top ). I see  only 4 connection connection 

'''
memcache-top v0.7       (default port: 19663, color: on, refresh: 3 seconds)

INSTANCE                USAGE   HIT %   CONN    TIME    ITEMS   EVICT/s GETS/s  SETS/s  READ/s  WRITE/s
10.17.186.165:19663     1.4%    0.0%    4       2.1ms   236.3K  0.0     1642    1833    257.7K  39.2K

AVERAGE:                1.4%    0.0%    4       2.1ms   236.3K  0.0     1642    1833    257.7K  39.2K



TOTAL:          28.4MB/ 2.0GB           4       2.1ms   236.3K  0.0     1642    1833    257.7K  39.2K
(ctrl-c to quit.)
'''

same see in below  in screenshot,
![image|690x131](upload://uWZAuaAA9m03KilTyXZlcWY09sv.png)


on the other side where logstash is running we see below result,
![image|690x74](upload://c2kv9p8tOOfoX8y06O2QfP1DtDL.png)



Let me know if you need further information

The issue is similar to me,

Hello Leandro,
Did you get a chance to look into it?

Regards,
Rama

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