How to save and retrieve usernames and passwords from logstash config


(Murugan Mani) #1

i need to get a password to connect to database using jdbc plugin. please let me know best vault method to use inside logstash config

jdbc_connection_string => "jdbc:db2://xxxxxxxxxxxxxx:port"
	jdbc_user => "username"
	jdbc_password => "@string??/variable"
	# or jdbc_password_filepath => "/path/to/my/password_file"

(Magnus Bäck) #2

There's no support for a "vault method". The password needs to be stored in plain text, either in the config file or in the jdbc_password_filepath file.


(Murugan Mani) #3

we need better solution.. :slight_smile:


(Murugan Mani) #4

Unknown setting 'jdbc_password_filepath' for jdbc {:level=>:error}

how eaxtly we need to save in the file.. just the password saved in the first line of the file?


(Murugan Mani) #5

i m getting error when i save in plain text and pointed them using the jdbc_password_filepath


(Magnus Bäck) #6

Unknown setting 'jdbc_password_filepath' for jdbc {:level=>:error}

Do you have at least 4.0.2 of the jdbc input plugin? Check with the logstash-plugin command. Also, please show your current configuration.

how eaxtly we need to save in the file.. just the password saved in the first line of the file?

Yes.

i m getting error when i save in plain text and pointed them using the jdbc_password_filepath

What error do you get?


(Murugan Mani) #7

i have 3.0.2, and when i update, there is lot of dependencies. any easy way to update the below and install jdbc plugin to 4.0.2/latest?

  • logstash-core-plugin-api ~ depends on logstash-core
    -logstash-input-irc.. etc

(Magnus Bäck) #8

It sounds like you're running Logstash 2.3 or earlier. In that case you need to upgrade.


(Murugan Mani) #9

can we update the logstash alone. If we update them to higher version, do I
need to update elastic search and kibana? I also checked if we can update
the Gemlist and bundle update. But I don't know I can do that.
However which version of logstash supports password on file ?


(Magnus Bäck) #10

can we update the logstash alone. If we update them to higher version, do I need to update elastic search and kibana?

No.

However which version of logstash supports password on file ?

I think you need 2.4 or later, but why run anything but the latest?


(Murugan Mani) #11

Looks like cookbook we use have been based on 2.3 version of logstash.I
don't know the impact if I change the logstash version to 5. So would like
to know for all


(system) #12

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