Hi Siddharth, Seems like your Elasticsearch is running out of memory. Please check that the host where Elasticsearch installed has enough RAM to run Elasticsearch. If that doesn't solve your issue please share with us the following information to reproduce your issue:
Wazuh version.
Steps you followed to install Wazuh.
Hardware specs of Wazuh, Elasticsearch and Kibana nodes.
Kibana/Elasticsearch logs. Check your system logs.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/422ff9c2-b969-4620-96d2-4305fb53fd86n%40googlegroups.com.
Wazuh version.---i'm using wazuh 3.13.
Steps you followed to install Wazuh--- i followed below link install and i used distributed architecture.
Hardware specs of Wazuh, Elasticsearch and Kibana node
Kibana/Elasticsearch logs. Check your system logs. --could you please help me to check this.
Hi siddharth jha,
Last message was unformatted and the attached file is empty. Sorry about that, I attach an example file again and repeat the message:
Hi siddharth jha,
In order to help you, please share with us the content of the following commands:
In your manager node: journalctl -u wazuh-manager.service -xe. If you have cluster setup, in your master node.
In your Elasticsearch node: journalctl -u elasticsearch.service -xe
In your Kibana node: journalctl -u kibana.service -xe
In your manager node cat /var/ossec/logs/ossec.log. If you have cluster setup, in your master node.
I attach example of Kibana output.
I’m waiting for your response.
Hi siddharth jha,
First of all sorry for the late reply.
I’m afraid that I tried to replicate your issue without success.
Service logs that you shared with us do not give a clear clue about the error. I’ll suggest you re-install your distributed environment with the new
Wazuh 4.1.0 that we just deployed! If you still have any error in the deployment process, don’t hesitate to ask again.
Here is the distributed installation guide for 4.1.0 https://documentation.wazuh.com/current/installation-guide/open-distro/distributed-deployment/index.html#distributed-index
Regards,
Víctor.
Hi siddharth,
You could backup your data via snapshot and then restore it in your new environment, I’ll show you an example:
You can create and restore snapshots both by using the Elasticsearch API or directly from the Kibana web interface (not in OpenDistro). For this example, we will use the API because it will work with all installations. First, we start creating a repository for the snapshots, for simplicity, we will use a local repository. Start by creating the directory where you want to store the snapshots, for example, /mount/elasticsearch backup:
mkdir -p /mount/elasticsearch backup
chown elasticsearch: /mount/elasticsearch_backup/
And add this line to /etc/elasticsearch/elasticsearch.yml:
path.repo: ["/mount/elasticsearch_backup"]
And restart Elasticsearch. Now, add the repository to Elasticsearch by using the following API call, I am using the Kibana Dev Tools console but you can also use curl for the API calls:
PUT /_snapshot/elasticsearch_backup
{
"type": "fs",
"settings": {
"delegate_type": "fs",
"location": "/mount/elasticsearch_backup",
"compress": true
}
}
Then you can take a snapshot with the following call:
PUT /_snapshot/elasticsearch_backup/new_snapshot
Then you can take a snapshot with the following call:
PUT /_snapshot/elasticsearch_backup/new_snapshot2
{
"indices": "wazuh-alerts*",
}
You can see the snapshots in your repository by running:
GET _snapshot/elasticsearch_backup/_all
Finally, to restore the snapshot in your new environment, you'll have to export the snapshot and the content in /mount/elasticsearch_backup and import it to your new environment.
POST _snapshot/my-repository/2/new_snapshot2
Here you have a couple of documents with more information about Elasticsearch snapshots.
Wazuh blog about snapshot management, here you can find how to configure Elasticsearch to periodically store snapshots and how to set your repository in different cloud services: https://wazuh.com/blog/index-backup-management/ OpenDistro documentation page about snapshots: https://opendistro.github.io/for-elasticsearch-docs/docs/elasticsearch/snapshot-restore/
About your issue with Elasticsearch, seems like your Elasticsearch is running out of ram. I’ll suggest you increase the heap size as Elasticsearch forums suggest:
Hope it helps
Hi Siddharth,
If you want to increase the JVM heap, remember that the min and max value should be the same value.
In order to do that add the following lines to your /etc/elasticsearch/jvm.options:
-Xms6g
-Xmx6g
After that restart Elasticsearch:
systemctl restart elasticsearch
Monitor your node to check if the issue still happening.
Hope it helps!
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/8b444b09-db6f-49ae-abb4-6074ed27ce3cn%40googlegroups.com.