Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
This application allows users to export their Nagios Log Server data or query results to raw JSON and CSV formats.
Current Version
See GitHub
Last Release Date
2016-12-08
Owner
Matt Capra
Website
https://github.com/mcapra/nagios-nlsexport/
Download URL
https://github.com/mcapra/nagios-nlsexport/raw/master/nlsexport.jar
Compatible With
Please visit the github for usage instructions. If you encounter a problem with this plugin or have questions, please use the github.
If this application is used from the NLS machine, this is no problem; Just use localhost or 127.0.0.1 for the -host argument. However, if we are using this application from a remote machine, the Elasticsearch API must be front-facing. BE AWARE THAT MAKING YOUR ELASTICSEARCH API FRONT-FACING CAN BE DANGEROUS.
The easiest way to do this:
edit /usr/local/nagioslogserver/elasticsearch/config/elasticsearch.yml change the http.host setting from localhost to 0.0.0.0, save the changes service elasticsearch restart give elasticsearch time to start up
Be sure to revert these changes once you are done exporting your data. If you do not change your http.host setting back to localhost afterwards, your Nagios Log Server machine may become unstable.
Hello Matt! Excellent work, I need your help with one thing, after looking for additional documentation for your tool anywhere but not finding any. We are trying to narrow down our exported logs by time as well as day, plus we wanted to exclude some sources. So we created a filter for it in the Elastic Search Dasboard in NLS. With your tool using a command like this java -jar nlsexport.jar -host=localhost -date_start=2017.09.19 -date_end=2017.09.19 -output_path=/root/logs/ -output_format=csv gives us everything for that day. If we wanted to use the query parameter that is included in your tool, how would we go about it? Let's say for example that our filter has the following conditions 1) querystring mustNot query : 127.0.0.1 2) querystring must query : host = 10.132.1.5 3) time must field : @timestamp from : 2017-09-19T04:39:43.682Z to : 2017-09-19T04:50:51.144Z What would that look like in the above command line string? The one included in the example -query='{"query":{"query_string":{"query":"my query string"}}}' is not very helpful I am afraid, I can't figure out what to replace with what, especially for the time. Any help would be appreciated. Thanks!
You must be logged in to submit a review.
To:
From: