Hey all,
- I am using user-agent plugin of logstash and its working fine but in device field I am getting specific devices something like nokia , samsung-Gt, iphone, ..... etc for mobiles but here I want device value to be generic like mobiles/smartphones, desktops, tablets, tv etc.
- I checked the documentation page of ua filter plugin => here but the only option I see here is using custom regexes.yaml file to achieve what I want.
- So I tried to give path to custom regexes.yaml file in ua filter plugin but its giving me an error,
useragent { source => "agent" regexes => "/Users/a/logstash-6.5.4/sample_input_files/regexes.yaml" }
- and error for above snippet is =>
[2020-05-06T11:00:33,628][ERROR][logstash.pipeline ] Error registering plugin {:pipeline_id=>"main", :plugin=>"#<LogStash::FilterDelegator:0x6152b0a4 @metric_events_out=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: out value:0, @metric_events_in=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: in value:0, @metric_events_time=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: duration_in_millis value:0, @id="60b5a72bcc8e9a73b43c3e0ebede4ed0ecdba4d7774cef7d68b2a17ef4e66dc3", @klass=LogStash::Filters::UserAgent, @metric_events=#LogStash::Instrument::NamespacedMetric:0x5086b470, @filter=<LogStash::Filters::UserAgent regexes=>"/Users/a/logstash-6.5.4/sample_input_files/regexes.yaml", source=>"agent", id=>"60b5a72bcc8e9a73b43c3e0ebede4ed0ecdba4d7774cef7d68b2a17ef4e66dc3", enable_metric=>true, periodic_flush=>false, lru_cache_size=>100000>>", :error=>"user_agent_parsers is missing from yaml", :thread=>"#<Thread:0x30bb91d8 run>"}
-
and my regexes.yaml file is same as regexes.yaml file from the link given in the above mentioned documentation. => regexes
-
So I do have two questions =>
- can I categorize devices in 4 types like mobile, desktop, tablet and tv? using some existing functionality of logstash?
- or what is the correct way of using custom regexes.yaml file in user-agent plugin of logstash?
Thanks in advance !