Logstach Aggregate Plugin installed, but cannot be found


(Sara Noori Hekmat) #1

Hi,

I installed aggregate filter plugin (using offline-packed) and now I can see it in the list of installed plugins:

/usr/share/logstash/bin/logstash-plugin list --verbose

logstash-codec-cef (4.1.4)
logstash-codec-collectd (3.0.7)
logstash-codec-dots (3.0.5)
logstash-codec-edn (3.0.5)
logstash-codec-edn_lines (3.0.5)
logstash-codec-es_bulk (3.0.5)
logstash-codec-fluent (3.1.3)
logstash-codec-graphite (3.0.4)
logstash-codec-json (3.0.4)
logstash-codec-json_lines (3.0.4)
logstash-codec-line (3.0.4)
logstash-codec-msgpack (3.0.5)
logstash-codec-multiline (3.0.7)
logstash-codec-netflow (3.5.2)
logstash-codec-plain (3.0.4)
logstash-codec-rubydebug (3.0.4)
logstash-filter-aggregate (2.7.2)
logstash-filter-cidr (3.1.1)
logstash-filter-clone (3.0.4)
...

And this is part of my config file using the plugin:
if [processing_state] == "Begin" {
aggregate {
task_id => "%{Card}"
code => "map['session_time'] = 0"
map_action => "create"
}
}
if [processing_state] == "Time" {
ruby {
code => "event.set('server_time', event.get('end').to_i - event.get('start').to_i)"
}

			aggregate {
					task_id => "%{Card}"
					code => "map['session_time'] += event.get('server_time')"
					map_action => "update"
			}
	}
	if [processing_state] == "End" {
			aggregate {
					task_id => "%{Card}"
					code => "event.set('session_time',  map['session_time'])"
					map_action => "update"
					end_of_task => true
			}
	}

But when I run logstash, I get this error in the log:

[2018-03-06T17:15:38,338][ERROR][logstash.plugins.registry] Problems loading a plugin with {:type=>"filter", :name=>"aggregate", :path=>"logstash/filters/aggregate", :error_message=>"NameError", :error_class=>NameError, :error_backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:226:in namespace_lookup'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:162:inlegacy_lookup'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:138:in lookup'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:180:inlookup_pipeline_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/plugin.rb:140:in lookup'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:103:inplugin'", "(eval):374:in initialize'", "org/jruby/RubyKernel.java:1079:ineval'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:75:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:165:ininitialize'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:286:in create_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:95:inregister_pipeline'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:313:in execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:inrun'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:204:in run'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:inrun'", "/usr/share/logstash/lib/bootstrap/environment.rb:71:in `(root)'"]}
[2018-03-06T17:15:38,344][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Couldn't find any filter plugin named 'aggregate'. Are you sure this is correct? Trying to load the aggregate filter plugin resulted in this error: Problems loading the requested plugin named aggregate of type filter. Error: NameError NameError"}

It seems that logstash cannot find the plugin while it can shows it in the list of installed plugins. Can you please advise what is the issue? Do I need to add the plugin name manually in some config/registry file?

Regards,
Sara


(system) #2

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