Hi,
I have elastic-5.4.0 (elasticsearch, logstash, and kibana) all with x-pack, and trying to get the last piece working: getting some events from logstash.
Started with --log.level debug, I see the following in logstash log:
[2017-05-09T13:43:31,826][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
[2017-05-09T13:43:32,092][DEBUG][logstash.inputs.metrics ] Metrics input: received a new snapshot {:created_at=>2017-05-09 13:43:32 -0400, :snapshot=>#<LogStash::Instrument::Snapshot:0xed3eaa7 @metric_store=#<LogStash::Instrument::MetricStore:0x6941017 @store=#<Concurrent:0x6934186d @default_proc=nil>, @structured_lookup_mutex=#Mutex:0x111ec328, @fast_lookup=#<Concurrent:0x2bcfd3a1 @default_proc=nil>>, @created_at=2017-05-09 13:43:32 -0400>}
[2017-05-09T13:43:32,094][ERROR][logstash.inputs.metrics ] Failed to create monitoring event {:message=>"For path: events", :error=>"LogStash::Instrument::MetricStore::MetricNotFound", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/instrument/metric_store.rb:225:in get_recursively'", "org/jruby/RubyArray.java:1613:in
each'", "/usr/share/logstash/logstash-core/lib/logstash/instrument/metric_store.rb:224:in get_recursively'", "/usr/share/logstash/logstash-core/lib/logstash/instrument/metric_store.rb:235:in
get_recursively'", "org/jruby/RubyArray.java:1613:in each'", "/usr/share/logstash/logstash-core/lib/logstash/instrument/metric_store.rb:224:in
get_recursively'", "/usr/share/logstash/logstash-core/lib/logstash/instrument/metric_store.rb:95:in get'", "org/jruby/ext/thread/Mutex.java:149:in
synchronize'", "/usr/share/logstash/logstash-core/lib/logstash/instrument/metric_store.rb:94:in get'", "/usr/share/logstash/logstash-core/lib/logstash/instrument/metric_store.rb:108:in
get_shallow'", "/usr/share/logstash/logstash-core/lib/logstash/instrument/metric_store.rb:157:in extract_metrics'", "org/jruby/RubyArray.java:1613:in
each'", "org/jruby/RubyEnumerable.java:852:in inject'", "/usr/share/logstash/logstash-core/lib/logstash/instrument/metric_store.rb:133:in
extract_metrics'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/x-pack-5.4.0-java/lib/monitoring/inputs/metrics.rb:191:in format_global_event_count'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/x-pack-5.4.0-java/lib/monitoring/inputs/metrics.rb:80:in
build_event'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/x-pack-5.4.0-java/lib/monitoring/inputs/metrics.rb:60:in update'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/x-pack-5.4.0-java/lib/monitoring/inputs/metrics.rb:35:in
configure_snapshot_poller'", "org/jruby/RubyProc.java:281:in call'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.0-java/lib/concurrent/executor/safe_task_executor.rb:24:in
execute'", "com/concurrent_ruby/ext/SynchronizationLibrary.java:174:in synchronize'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.0-java/lib/concurrent/executor/safe_task_executor.rb:19:in
execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.0-java/lib/concurrent/timer_task.rb:307:in execute_task'", "org/jruby/RubyProc.java:281:in
call'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.0-java/lib/concurrent/executor/safe_task_executor.rb:24:in execute'", "com/concurrent_ruby/ext/SynchronizationLibrary.java:174:in
synchronize'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.0-java/lib/concurrent/executor/safe_task_executor.rb:19:in execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.0-java/lib/concurrent/ivar.rb:170:in
safe_execute'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.0-java/lib/concurrent/scheduled_task.rb:285:in process_task'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.0-java/lib/concurrent/executor/timer_set.rb:157:in
process_tasks'", "org/jruby/RubyProc.java:281:in call'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/concurrent-ruby-1.0.0-java/lib/concurrent/executor/java_executor_service.rb:94:in
run'", "Concurrent$$JavaExecutorService$$Job_754842726.gen:13:in `run'"]}
[2017-05-09T13:43:36,825][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
configs:
cat /etc/logstash/logstash.yml
path.data: "/var/lib/logstash"
path.config: "/etc/logstash/conf.d"
path.logs: "/var/log/logstash"
xpack:
monitoring:
elasticsearch:
username: logstash_system
password: SecretPassword
pipeline:
batch:
size: 25
delay: 5
cat /etc/logstash/conf.d/basic_ls_config
input {
udp {
port => 2055
codec => netflow
}
}
output {
elasticsearch {
hosts => 127.0.0.1
user => logstash_internal
password => AnotherSecretPassword
}
}
I can authenticate with both logstash users, both internal and system:
curl -u logstash_system:SecretPassword 'http://localhost:9200/_xpack/security/_authenticate?pretty=true'
{
"username" : "logstash_system",
"roles" : [
"logstash_system"
],
"full_name" : null,
"email" : null,
"metadata" : {
"_reserved" : true
},
"enabled" : true
}
curl -u logstash_internal:AnotherSecretPassword localhost:9200/_xpack/security/_authenticate?pretty=true
{
"username" : "logstash_internal",
"roles" : [
"logstash_writer"
],
"full_name" : null,
"email" : null,
"metadata" : { },
"enabled" : true
}
But I can not GET localhost:9200/_xpack/monitoring:
curl -u elastic 'http://localhost:9200/_xpack/monitoring/?pretty=true'
Enter host password for user 'elastic':
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "No endpoint or operation is available at [monitoring]"
}
],
"type" : "illegal_argument_exception",
"reason" : "No endpoint or operation is available at [monitoring]"
},
"status" : 400
}
Please, suggest, how can I debug and fix this problem.
Regards,
Sergey