# Nagios with Elastic

**URL:** <https://discuss.elastic.co/t/nagios-with-elastic/235016>\
**Category:** Elasticsearch\
**Created:** [May 30, 2020, 12:12pm UTC](https://discuss.elastic.co/t/nagios-with-elastic/235016 "2020-05-30T12:12:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shalauras](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@shalauras](https://discuss.elastic.co/u/shalauras)\
**Post date:** [May 30, 2020, 12:12pm UTC](https://discuss.elastic.co/t/nagios-with-elastic/235016/1 "2020-05-30T12:12:56Z")

</div>

Hi, I want to implement Nagios with Elastic and I can see notifications from Nagios in Elastic (Kibana). I am trying to install following manual:

> **[Integrating Nagios Checks with Logstash](https://www.elastic.co/es/blog/integrating-nagios-checks-with-logstash)**
>
> How to use the mass of existing Nagios Checks with the Elastic Stack by ingesting check results into Logstash

But when I try last step:  
/usr/share/logstash/bin/logstash --modules nagios --setup

I receive:  
root@nagios:/etc# OpenJDK 64-Bit Server VM warning: Ignoring option UseConcMarkSweepGC; support was removed in 14.0  
OpenJDK 64-Bit Server VM warning: Ignoring option CMSInitiatingOccupancyFraction; support was removed in 14.0  
OpenJDK 64-Bit Server VM warning: Ignoring option UseCMSInitiatingOccupancyOnly; support was removed in 14.0  
WARNING: An illegal reflective access operation has occurred  
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/usr/share/logstash/logstash-core/lib/jars/jruby-complete-9.2.11.1.jar) to method sun.nio.ch.NativeThread.signal(long)  
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules  
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations  
WARNING: All illegal access operations will be denied in a future release  
WARNING: Could not find logstash.yml which is typically located in $LS\_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults  
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console  
[WARN] 2020-05-30 12:08:56.003 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[INFO] 2020-05-30 12:08:56.031 [LogStash::Runner] runner - Starting Logstash {"logstash.version"=\>"7.7.0"}  
[INFO] 2020-05-30 12:08:58.173 [Agent thread] modulescommon - Setting up the nagios module  
[ERROR] 2020-05-30 12:08:59.510 [Agent thread] kibanaclient - Error when executing Kibana client request {:error=\>#\<Manticore::SocketException: Connection refused\>}  
[ERROR] 2020-05-30 12:08:59.749 [Agent thread] kibanaclient - Error when executing Kibana client request {:error=\>#\<Manticore::SocketException: Connection refused\>}  
[ERROR] 2020-05-30 12:08:59.915 [Agent thread] sourceloader - Could not fetch all the sources {:exception=\>LogStash::ConfigLoadingError, :message=\>"Failed to import module configurations to Elasticsearch and/or Kibana. Module: nagios has Elasticsearch hosts: ["localhost:9200"] and Kibana hosts: ["localhost:5601"]", :backtrace=\>["/usr/share/logstash/logstash-core/lib/logstash/config/modules\_common.rb:124:in `block in pipeline_configs'", "org/jruby/RubyArray.java:1809:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/config/modules\_common.rb:70:in `pipeline_configs'", "/usr/share/logstash/logstash-core/lib/logstash/config/source/modules.rb:30:in `pipeline\_configs'", "/usr/share/logstash/logstash-core/lib/logstash/config/source\_loader.rb:77:in `block in fetch'", "org/jruby/RubyArray.java:2572:in `collect'", "/usr/share/logstash/logstash-core/lib/logstash/config/source\_loader.rb:76:in `fetch'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:165:in `converge\_state\_and\_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:113:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:390:in `block in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/task.rb:24:in `block in initialize'"]} [ERROR] 2020-05-30 12:08:59.935 [Agent thread] agent - An exception happened when converging configuration {:exception=>RuntimeError, :message=>"Could not fetch the configuration, message: Failed to import module configurations to Elasticsearch and/or Kibana. Module: nagios has Elasticsearch hosts: [\"localhost:9200\"] and Kibana hosts: [\"localhost:5601\"]", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/agent.rb:172:in `converge\_state\_and\_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:113:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:390:in `block in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/task.rb:24:in `block in initialize'"]}  
[INFO] 2020-05-30 12:09:00.525 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=\>9600}  
[INFO] 2020-05-30 12:09:05.302 [LogStash::Runner] runner - Logstash shut down.

How could I solve it?

I have java, logstash, elastic installed from repository (apt). Any ideas? Thanks!!!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 27, 2020, 12:12pm UTC](https://discuss.elastic.co/t/nagios-with-elastic/235016/2 "2020-06-27T12:12:56Z")

</div>

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