Hi @slavago,
If your Elasticsearch node is creating wazuh-alerts-3.x indices means that you have loaded the old wazuh-template.json. To check which templates your Elasticsearch node have, you could use this API call (remember to replace admin:admin with your credentials and localhost with your Elasticsearch node IP):
[root@centos7 filebeat]# curl -k -u'admin:admin' -XGET https://localhost:9200/_cat/templates
wazuh [wazuh-alerts-4.x-, wazuh-archives-4.x-] 0 1
wazuh-agent [wazuh-monitoring-*]
If you have there wazuh-alerts-3.x you could delete it using the API as well:
[root@centos7 filebeat]# curl -k -u'admin:admin' -XDELETE https://localhost:9200/_index_template/wazuh-alerts-3.x
Also, check if you have that template in your filebeat configuration and remove it. Check the template you are using in your filebeat node. In /etc/filebeat/filebeat.yml make sure you have configured the 4.x template.
setup.template.json.path: '/etc/filebeat/wazuh-template.json'
You could get more info about opendistro API and templates here https://opendistro.github.io/for-elasticsearch-docs/docs/elasticsearch/index-templates/
Hope it helps!
Víctor.
--
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/CAP6s8-rMdqWAhSe56vLO%2BZGSaUeV%3Dvemnzo0%3Dif54EfW4RSohA%40mail.gmail.com.
Hi Slava,
Please, if you upgraded Wazuh from 3.x make sure you have followed our guide https://documentation.wazuh.com/current/upgrade-guide/elasticsearch-kibana-filebeat/upgrading-open-distro.html.
Pay special attention to the 12th step where the index pattern is removed:
curl 'https://<kibana_ip>:<kibana_port>/api/saved_objects/index-pattern/wazuh-alerts-3.x-*' -X DELETE -H 'Content-Type: application/json' -H 'kbn-version: 7.10.0' -k -uadmin:admin
Hope it helps!
Víctor.
Hi Slava,
Could you please check if everything is correct in the Wazuh filebeat module? It is located in /usr/share/filebeat/module/wazuh. Please check that your file: /usr/share/filebeat/module/wazuh/alerts/manifest.yml looks like:
[root@wazuh-manager-master alerts]# cat /usr/share/filebeat/module/wazuh/alerts/manifest.yml
module_version: 0.1
var:
- name: paths
default:
- /var/ossec/logs/alerts/alerts.json
- name: index_prefix
default: wazuh-alerts-4.x-
input: config/alerts.yml
ingest_pipeline: ingest/pipeline.json
Greetings,
Víctor.