SnapOverflow

SnapOverflow Logo SnapOverflow Logo

SnapOverflow Navigation

  • Home
  • Server
  • Ubuntu

Mobile menu

Close
  • Home
  • System Administrators
    • Hot Questions
    • New Questions
    • Tags
  • Ubuntu
    • Hot Questions
    • New Questions
    • Tags
  • Help
Home / server / Questions / 759583
Accepted
Karl Morrison
Karl Morrison
Asked: 2016-02-25 13:54:06 +0800 CST2016-02-25 13:54:06 +0800 CST 2016-02-25 13:54:06 +0800 CST

Get logstash version

  • 772

How does one get the version of Logstash?

root@elk:/usr/share/elasticsearch# bin/logstash --help
bash: bin/logstash: No such file or directory

I have Logstash running on my system. Also.

root@elk:/# logstash -V
bash: logstash: command not found

Also.

root@elk:/# ps aux | grep logstash
logstash  1725 45.3  8.5 1942860 175936 ?      SNl  22:03   0:35 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/logstash -Xmx500m -Xss2048k -Djffi.boot.library.path=/opt/logstash/vendor/jruby/lib/jni -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/logstash -XX:HeapDumpPath=/opt/logstash/heapdump.hprof -Xbootclasspath/a:/opt/logstash/vendor/jruby/lib/jruby.jar -classpath : -Djruby.home=/opt/logstash/vendor/jruby -Djruby.lib=/opt/logstash/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main --1.9 /opt/logstash/lib/bootstrap/environment.rb logstash/runner.rb agent -f /etc/logstash/conf.d -l /var/log/logstash/logstash.log
root      1777  0.0  0.0   8860   636 ?        S+   22:05   0:00 grep --color=auto logstash

More.

root@elk:/opt/logstash/bin# ls
logstash  logstash.bat  logstash.lib.sh  plugin  plugin.bat  rspec  rspec.bat  setup.bat
root@elk:/opt/logstash/bin# logstash -V
bash: logstash: command not found
ubuntu-14.04
  • 9 9 Answers
  • 52542 Views

9 Answers

  • Voted
  1. Best Answer
    Mark Henderson
    2016-02-25T14:21:57+08:002016-02-25T14:21:57+08:00

    Logstash is one of those things that just doesn't quite live where you expect it to live, and the documentation is reallllly light (read: non-existent) on where they expect you to find things, so if you've installed it from a package then it can be nigh impossible to find the expected location documented. 1

    Logstash typically lives in /opt/logstash and you can find the logstash binary in the bin folder (/opt/logstash/bin).

    From there you can run -V or --version

    ./logstash -v
    

    or

    ./logstash --version
    

    From your comments on another answer, it would appear that this is in a docker container. This is the sort of thing you should really be including in your original question.

    You will want to make use of docker exec. You will need to use docker ps to list your containers, and pass that through to your docker exec command.

    For example:

    docker exec -d elk_container /opt/logstash/bin/logstash --version
    

    1I don't want this to be misconstrued. Logstash documentation is excellent - it's just the parts about where all the different bits are expected to live that's impossible to find

    • 25
  2. Jonesome Reinstate Monica
    2017-11-15T14:17:05+08:002017-11-15T14:17:05+08:00

    On Logstash 5.x on CentOS/Red Hat:

    Location of logstash binary: /usr/share/logstash/bin/

    Then this will tell you the version: ./logstash -V

    • 8
  3. Douglas P.
    2016-02-25T14:01:37+08:002016-02-25T14:01:37+08:00

    Try find / -type f -name "logstash" 2>/dev/null to find logstash, it will take some time to return though.

    Then with the location of logstash that you find, run the binary with the --version flag.

    • 3
  4. Julian
    2017-09-20T19:41:14+08:002017-09-20T19:41:14+08:00

    My logstash on Linux 17.04, logstash was found at: /usr/share/logstash. However, the config files are found at /etc/logstash. I had to copy over the config files to the new location: /usr/share/logstash/config to get logstash to work.

    • 1
  5. EEAA
    2016-02-25T13:57:13+08:002016-02-25T13:57:13+08:00

    From the documentation:

    -V, --version Display the version of Logstash.

    (which took me all of about 30 seconds to find, by the way)

    • 0
  6. Mweya Ruider
    2018-05-21T12:01:52+08:002018-05-21T12:01:52+08:00

    Firstly, you'll need to find the path to logstash. Try searching for it by running updatedb && locate logstash/bin. I found mine in /usr/share/logstash/bin.

    Running logstash with the "-v" or "--version" flags should return the version.

    • 0
  7. user459893
    2018-03-10T03:58:06+08:002018-03-10T03:58:06+08:00

    To check logstash version from server run below command: cd /usr/share/logstash; ./bin/logstash -V

    • -1
  8. Sloomy
    2021-02-11T08:13:19+08:002021-02-11T08:13:19+08:00

    ubuntu 20.04 server

    root@server:/usr/share/logstash/bin# ./logstash --version
    
    Using bundled JDK: /usr/share/logstash/jdk
    
    logstash 7.11.0
    
    • -1
  9. user2481458
    2016-07-02T03:47:59+08:002016-07-02T03:47:59+08:00

    Logstash keeps its version identity in a ruby file i.e version.rb In Ubuntu, you can find version file at following location. So,use this cat /opt/logstash/lib/logstash/version.rb

    • -3

Sidebar

Stats

  • Questions 681965
  • Answers 980273
  • Best Answers 280204
  • Users 287326
  • Popular
  • Answers
  • Marko Smith

    Can you pass user/pass for HTTP Basic Authentication in URL parameters?

    • 5 Answers
  • Marko Smith

    Ping a Specific Port

    • 18 Answers
  • Marko Smith

    Check if port is open or closed on a Linux server?

    • 7 Answers
  • Marko Smith

    How to automate SSH login with password?

    • 10 Answers
  • Marko Smith

    How do I tell Git for Windows where to find my private RSA key?

    • 30 Answers
  • Marko Smith

    What's the default superuser username/password for postgres after a new install?

    • 5 Answers
  • Marko Smith

    What port does SFTP use?

    • 6 Answers
  • Marko Smith

    Command line to list users in a Windows Active Directory group?

    • 9 Answers
  • Marko Smith

    What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats?

    • 3 Answers
  • Marko Smith

    How to determine if a bash variable is empty?

    • 15 Answers
  • Martin Hope
    Davie Ping a Specific Port 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    Smudge Our security auditor is an idiot. How do I give him the information he wants? 2011-07-23 14:44:34 +0800 CST
  • Martin Hope
    kernel Can scp copy directories recursively? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh returns "Bad owner or permissions on ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil How to automate SSH login with password? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin How do I deal with a compromised server? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner How can I sort du -h output by size 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent How to determine if a bash variable is empty? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus How do you find what process is holding a file open in Windows? 2009-05-01 16:47:16 +0800 CST

Related Questions

Trending Tags

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Home
  • Questions
    • Hot Questions
    • New Questions
  • Tags
  • Help

Footer

SnapOverflow

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Help

© 2022 SOF-TR. All Rights Reserve