Okay, Wrote this before I saw Scott's post...
I think I found one of your secrets...
I tried to run "gem env" and it failed. So I found the gem binary and added that to my path.
Now it was found, but when it failed to run properly it told me more information
Code: Select all
gem env
/usr/local/nagioslogserver/logstash/vendor/jruby/bin/jruby: line 388: /usr/bin/java/bin/java: Not a directory
/usr/local/nagioslogserver/logstash/vendor/jruby/bin/jruby: line 388: exec: /usr/bin/java/bin/java: cannot execute: Not a directory
I made a file named /etc/profile.d/java.sh
Code: Select all
cat /etc/profile.d/java.sh
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64/jre
export PATH=$PATH:/usr/local/nagioslogserver/logstash/vendor/jruby/bin
Note: These work for my system - anyone else reading this in the future should make sure the locations are proper for your system.
Basically added to my path so gem will run, and told the system where java lives.
I am making progress. Now I got further along and the install syntax is trying to work. I had to modify the syntax you provided as it had a big typo in it. The perils of copy and paste I guess.
Now my error has evolved to some download error. It looks like there are dependencies that need to be installed. So this is the new error...
Code: Select all
sudo /usr/local/nagioslogserver/logstash/bin/logstash-plugin install logstash-filter-jdbc_static
Validating logstash-filter-jdbc_static
Installing logstash-filter-jdbc_static
Error Bundler::HTTPError, retrying 1/10
Network error while fetching https://rubygems.org/quick/Marshal.4.8/rest-client-1.8.0-x86-mswin32.gemspec.rz
Error Bundler::HTTPError, retrying 2/10
Network error while fetching https://rubygems.org/quick/Marshal.4.8/rest-client-1.8.0-x86-mswin32.gemspec.rz
Error Bundler::HTTPError, retrying 3/10
Network error while fetching https://rubygems.org/quick/Marshal.4.8/rest-client-1.8.0-x86-mswin32.gemspec.rz
While I waited for the 10 or 10 failure I manually downloaded the file. It takes a 'very' long time to get 10 of 10 fails for such a tiny file.
-- next story...
Maybe I don't need the JAVA_HOME and PATH stuff added. Will find out on the next server since I have 4.
-- now...
Scott - !!!
sudo /usr/local/nagioslogserver/logstash/bin/logstash-plugin install --local /tmp/logstash-filter-jdbc_static-1.0.6.gem
Validating /tmp/logstash-filter-jdbc_static-1.0.6.gem
Installing logstash-filter-jdbc_static
Installation successful
And that's that. Done in 45 seconds. wow...
okay. Lets close this and I'll move on to the next challenge. Configuring it all...
So, Thanks a Ton guys. Have a great holiday weekend. Happy 4th !
Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1