Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This section provides additional information you must know while working with Elasticsearch (ES).

Reset Password for Elasticsearch

To reset the password,

  1. Go to the bin folder.

  2. Execute the command given below:

./elasticsearch-reset-password -u elastic --url http://localhost:9200

Also, refer to the link to know more about resetting password https://www.elastic.co/guide/en/elasticsearch/reference/master/reset-password.html

Delete nodes from Elasticsearch

To delete nodes from ES,

Execute the below curl command using Postman.

curl --location --request DELETE 'http://localhost:9200/_all'

Sample elasticsearch.yml file for running Elasticsearch on HTTPS -

# --------------------------------------------------------------------------------

# 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 -------------------------


Sample elasticsearch.yml file for running Elasticsearch on HTTP -

# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: false

xpack.security.enrollment.enabled: false

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: false
  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 -------------------------

  • No labels