logstash-plugins / logstash-output-influxdb

Apache License 2.0
58 stars 79 forks source link

Install influxdb output plugin offline on logstash system #68

Open jayannah opened 7 years ago

jayannah commented 7 years ago

logstash - 5.4.0

Is it possible to provide .zip file to install the influxdb output plugin offline? would like to install couple of plugins without going to internet and download during installation of logstash through automation.

hence if there is .zip file (like s3 repositor or x-pack plugin), it will be great place them in local repository and install offline during installation of logstash .

IngaFeick commented 7 years ago

I haven't tested this myself but I would assume that you can just download the gem file from rubygems and then instead of running

logstash-plugin install logstash-output-influxdb

you would do

logstash-plugin install /path/to/the/gem/that/you/downloaded.gem
jayannah commented 7 years ago

I have tried with .gem file for other plugins.. the problem again these .gem files will go through internet access to install the dependencies. Not 100% offline like .zip file available for x-pack or s3-repositor from ES.

IngaFeick commented 7 years ago

Good point. I haven't thought of those. Well, I am sorry, I am not aware of another mechanism for installation but maybe somebody else has an idea?

Kniyl commented 6 years ago

@jayannah You should follow the instructions in logstash documentation: https://www.elastic.co/guide/en/logstash/current/offline-plugins.html

Basically, you need to install the plugin on one machine using the "normal" way (through the internet) like bin/logstash-plugin install logstash-output-influxdb and then ask logstash to create an offline package (aka the zip file you are looking for) with bin/logstash-plugin prepare-offline-pack --output <path_to_the_file>.zip logstash-output-influxdb --overwrite.

kjetilhp commented 6 years ago

The offline method does not work with this plugin for some reason, it still tries to go online and do verification, the --no-verify flag does do any good either (tried on logstash-6.2.3)

sudo ./logstash-plugin install influx-plugin.zip --no-verify --local
Validating influx-plugin.zip
Unable to download data from https://rubygems.org - SocketError: Failed to open TCP connection to rubygems.org:443 (initialize: name or service not known) (https://rubygems.org/latest_specs.4.8.gz)
ERROR: Installation aborted, verification failed for influx-plugin.zip
Ultimation commented 6 years ago

@kjetilhp I have had this plugin working with a successful offline plugin as @Kniyl said, you need to build the offline pack on a online system, and then build the zip, and then install it with bin/logstash-plugin install file:///path/to/logstash-offline-pack-6.2.3.zip

kjetilhp commented 6 years ago

Hi, I'm sorry for not updating, it was my bad, I forgot to use the full local path when installing. Can be closed.