Path for custom ruby gems?


(Horst Birne) #1

Hey folks,

currently i am trying to implement a caching solution via memcache to cache our netbios name lookups.

/usr/share/logstash/bin/logstash --version
logstash 5.5.0

For this task i installed a ruby plugin called memcached.

gem list --local |grep memca
memcached (1.8.0)

As i am trying to initialize it on logstash startup

ruby {
       init => "
        require 'memcached'
        $cache = Memcached.new('localhost:11211')
        "
       code => "
       ip = event.get('src')
       var = 'value.#{ip}'
       value = $cache.get 'var'
       "
  }

I get the error "LoadError: no such file to load -- memcached".

In which file i can tell logstash that the module is located in "/var/lib/gems/2.1.0/gems/memcached-1.8.0/" ?

On a side node - anyone maybe knows a working memcache filter or any other RAM buffering solution for logstash? There is one https://github.com/coolacid/logstash-filter-cache-memcached but it seems heavily outdated and not working with newer Logstash versions.

Any input is appreciated.

Regards


(system) #2

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