This section provides additional information that you must know while working with Elasticsearch (ES).
Reset Password for
...
ES
To reset the password,
Go to the bin folder
...
and execute the command given below:
For Windows:
Code Block |
---|
elasticsearch-reset-password.bat -u elastic --url http://localhost:9200 |
Give http or https accordingly
Refer to the sample screenshot:
...
For Linux:
Code Block |
---|
./elasticsearch-reset-password -u elastic --url http://localhost:9200 |
Give http or https accordingly
Also, refer to the link to know more about resetting password https://www.elastic.co/guide/en/elasticsearch/reference/master/reset-password.html ES Password reset.
Delete nodes from
...
ES
To delete nodes from ES,
Execute the below curl command using Postman.
Code Block |
---|
curl --location --request DELETE 'http://localhost:9200/_all' |
Sample elasticsearch.yml file for running Elasticsearch on HTTPS -
Code Block |
---|
# --------------------------------------------------------------------------------
# Enable security features
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: true
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["127.0.0.1"]
# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0
# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0
indices.query.bool.max_clause_count: 9024
action.auto_create_index: ".watches,.triggered_watches,.watcher-history-*,-zephyr*,+*"
#----------------------- END SECURITY AUTO CONFIGURATION ------------------------- |
...
Give http or https accordingly
Refer to the sample screenshot:
...