How to change the kibana GUI login password without Xpack - elasticsearch

Need to change the Kibana GUI password. I have to change the password in the customer system so I can't install Xpack. Please provide the solution.

What ES version you are using?
What do you mean by Kibana GUI password? Is it Kibana user? or Superuser? or Some other user?
Since you are using 5.2 as mentioned in your comments, here's the documentation for ES 5.2.
The command in your case would be:
curl -XPUT -u kibana:kibanauser 'http://localhost:9200/_xpack/security/user/kibana/_password' -d '{ "password": "kibana2019"}'
In SO, as a good practise, you need to specify what you tried and what didn't work

Related

Elasticsearch Linux user

I installed an Elasticsearch 7 on CentOS 7 using rpm file. After install, elaticsearch user and group is created, user which can't be used to manage elasticsearch (no login) but from what I saw will own es data directory. I don't want to manage elasticsearch with root user. Should I create a new user for that or to modify elasticsearch user? What will be the best approach?
Thank you!
I found that, after elasticsearch is started, another user is created (elastic), owner of the elasticsearch process. This user can by added to the sudoers file and can by used to start/stop elasticsearch. But, I think the best partice is to use other user for that, added in sudoers, of cource.

Is it correct to change Heroku's PostgreSQL password using psql's \password command?

On Heroku, apparently it is possible to use psql's \password command to change a password. Is this something that is "correct"? or do you have to use the rotate credentials facility documented here?
https://devcenter.heroku.com/articles/heroku-postgresql-credentials#pg-credentials-rotate
Thanks!

Is it possible to implement Stopwords without Elasticsearch configured in magento 2.3 + How to implement stopwords in magento 2.3

I want to add stopwords to my project but I think Elasticsearch is not installed on my server. Search Engine as MYSQL is selected.
will our stopwords work or not without Elasticsearch configured?
Also, I want to make sure that elastic search is configured or not. For that I am using the command
curl -XGET 'http://localhost:9200'
and in response, I am getting output as:
curl: (7) Failed to connect to localhost:9200; Connection refused.
Does this signify that elastic search is not configured?
I got the proper solution to this question.
a) Install Elasticsearch6.0
b) Then follow the steps https://devdocs.magento.com/guides/v2.4/config-guide/elasticsearch/es-config-stopwords.html#to-change-directory-stopwords
But one thing that needs to be kept in the mind is:
Don't override the stopwords.csv file
Instead, override the stopwords_en_US.csv file i.e. according to your locale.
Your module will work perfectly.
The solution on all sites is perfect. Just we need to override the correct file for stopwords according to locale.

Secure built-in user credentials for Kibana/ElasticSearch

Setup
ElasticSearch v6.8
Context
I'm trying to build a couple of AMI's for ElasticSearch and Kibana using Packer.
I've been reading the official docs and have run into something confusing (for me at least)
I'm setting up the built-in users in ElasticSearch according to this doc. I'm using the auto option as opposed to interactive
bin/elasticsearch-setup-passwords auto
Once this is done I need to modify the kibana.yml file to use the built-in user whilst communicating with ElasticSearch. This doc describes what to do. Essentially you add these two lines:
elasticsearch.username: "kibana"
elasticsearch.password: "kibanapassword"
Questions
How can I automatically read the password output for the built in Kibana user (bin/elasticsearch-setup-passwords auto) so that I can add it to the kibana.yml file?
Is storing the password in plain text in the 'kibana.yml' file secure? I fear it is not... but is there an alternative?
Thanks
For elasticsearch-setup-passwords rather than using auto, look into --batch, so you can define the password and then use that for Kibana.
You probably want to use a keystore for Kibana.

Installing Elasticsearch

I try to index data on Elasticsearch, my problem is;after run the "elasticsearch.bat" command, I able to connect to the server, all process well done.but after that I cant write anything to the command line.Do you have any idea what is wrong?
Thats Ok, you see the ElasticSearch console output. Just open an other console to make some input. Or start ElasticSearch as a service (http://www.elastic.co/guide/en/elasticsearch/reference/1.3/setup-service-win.html)
There is no command-line input available for Elasticsearch. You can do operations on Elasticsearch by REST commands (or with a Client API in for example JAVA).
You can use CURL (application) to do REST operations in a command line.
You can use the the internet browser to do some HTTP-GET commands. You can also do other REST commands (PUT, POST, DELETE) with some Chrome plugins like POSTMAN.
There are some Elasticsearch plugins available to enable monitoring and management tooling that becomes available via the browser.
Please read the Elasticsearch documentation!
For all operations on indexes, mappings, querying, etc, the Marvel plugin has the Sense REST API interface which is fabulous. Sense is wrapped within the Marvel plugin which is free for development.
It allows you to execute all possible ES API commands as JSON. We use it both as a way to prototype commands before implementing them in our ES client, and as a way to test very specific/boundary search scenarios.
There are lots of other cool plugins to help you manage your ElasticSearch, some of which are described here.
Good luck!
When you type only elasticsearch.bat, it means you are starting Elasticsearch server in the foreground, that´s why you are seeing real-time logs in your terminal and hence you can´t type anything.
Now, leave that unclosed and open another terminal (no need to go to the Elasticsearch directory again) and just type
curl 'http://localhost:9200/?pretty' but first make sure that curl is supported in your terminal, if not, you need to use another terminal that supports it, for example Git Shell for Windows.
Afterwards you can use this second terminal to do your indexing.
Via terminal with command curl + XGET (or XPUT, XDELETE, XPOST) you can send commands to elasticsearch:
curl -XGET 'http://localhost:9200/your_index' -d '{
"query":
{
"filtered":
{
"query":
{
"match_all": {}
}
}
}
}';
You can also use the Chrome extension Sense, which can handle JSON configs (with handy history, nice highlighting).
I think you have misunderstood something:
ElasticSearch runs as a http service, that the reason why you cant still using that console.
Solution: just open another console.
But, keep in mind you dont need to use a console, you can access it using any REST Client. Take a look at "Postman - REST Client" and "Sense (Beta)". Both are Chrome extensions.

Resources