After restarting wazuh manager, dashboard, indexer, my Discover dashboard in Wazuh UI is empty. The index pattern wazuh-alerts-* no longer shows any data.
Here’s what I’ve observed:
Environment
Wazuh Manager: working, generating alerts
Filebeat: active and running
Wazuh Indexer: reachable at https://127.0.0.1:9200
Wazuh Dashboard: loads fine, but shows no data
More info:
Hi
As you said, Wazuh Manager is getting alerts. Can you please also check the /var/ossec/logs/alerts/alerts.jso to conform if trh wazuh-manager is getting current logs.
If it is the can you please run the following command:
filebeat test output
output should be like this:
elasticsearch: https://127.0.0.1:9200...
parse url... OK
connection...
parse host... OK
dns lookup... OK
addresses: 127.0.0.1
dial up... OK
TLS...
security: server's certificate chain verification is enabled
handshake... OK
TLS version: TLSv1.2
dial up... OK
talk to server... OK
version: 7.10.2
I you see any errors, the issue can be related to configuration, connectivity, certificates, etc. In that case, you can share the error you are getting and also check Filebeat logs:
cat /var/log/filebeat/filebeat | grep -i -E "error|warn"
If this is functioning correctly, it indicates that both the Wazuh manager and Filebeat are operating smoothly, and Filebeat is successfully forwarding logs to the Wazuh indexer. Next, check the status of the Wazuh indexer to ensure it’s active:
systemctl status wazuh-indexer
Check the cluster health with:
curl -XGET -k -u user:pass "https://localhost:9200/_cluster/health"
Or on the web interface, go to Indexer management → Dev Tools and run this command:
GET _cluster/health
Check the number of shards, because if the total shards cross the limit per node (default 1000 per indexer node), the indexer stops indexing. The solution for this is:
Depending on the number of nodes, you can change the primary and replica shards and re-index the old indices: https://documentation.wazuh.com/current/user-manual/wazuh-indexer/wazuh-indexer-tuning.html#setting-the-number-of-replicas
Adding more indexer nodes: https://documentation.wazuh.com/current/user-manual/wazuh-indexer-cluster/add-wazuh-indexer-nodes.html
Deleting old indices: Use the API or CLI to delete older wazuh-alerts indices:
DELETE <index_name>
Or via cURL:
curl -k -u admin:<Indexer_Password> -XDELETE "https://<WAZUH_INDEXER_IP>:9200/wazuh-alerts-4.x-YYYY.MM.DD"
If the issue still persists, share the logs from the indexer log files:
cat /var/log/wazuh-indexer/wazuh-cluster.log | grep -i -E "error|warn"
In the cluster logs, you can find information like low disk.watermark, which indicates a low storage issue. If you see this, you need to increase the storage or delete some old logs to make space for new logs: https://wazuh.com/blog/recover-your-data-using-wazuh-alert-backups/
cat /var/log/wazuh-indexer/wazuh-cluster.log | grep -i -E "error|warn"
[2024-12-07T03:08:11,877][WARN ][o.o.s.h.HTTPBasicAuthenticator] [node-1] No 'Basic Authorization' header, send 401 and 'WWW-Authenticate Basic'
[2024-12-07T03:46:58,379][ERROR][o.o.a.a.AlertIndices ] [node-1] info deleteOldIndices
[2024-12-07T03:46:58,380][ERROR][o.o.a.a.AlertIndices ] [node-1] info deleteOldIndices
[2024-12-07T08:21:05,046][WARN ][o.o.s.a.BackendRegistry ] [node-1] Authentication finally failed for {LINUX USER} from 127.0.0.1:59848
[2024-12-07T08:33:06,929][INFO ][o.o.n.Node ] [node-1] JVM arguments [-Xshare:auto, -Dopensearch.networkaddress.cache.ttl=60, -Dopensearch.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.security.manager=allow, -Djava.locale.providers=SPI,COMPAT, -Xms1024m, -Xmx1024m, -XX:+UseG1GC, -XX:G1ReservePercent=25, -XX:InitiatingHeapOccupancyPercent=30, -Djava.io.tmpdir=/var/log/wazuh-indexer/tmp, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/wazuh-indexer, -XX:ErrorFile=/var/log/wazuh-indexer/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/wazuh-indexer/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.security.manager=allow, -Djava.util.concurrent.ForkJoinPool.common.threadFactory=org.opensearch.secure_sm.SecuredForkJoinWorkerThreadFactory, -Dclk.tck=100, -Djdk.attach.allowAttachSelf=true, -Djava.security.policy=file:///etc/wazuh-indexer/opensearch-performance-analyzer/opensearch_security.policy, --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED, -XX:MaxDirectMemorySize=536870912, -Dopensearch.path.home=/usr/share/wazuh-indexer, -Dopensearch.path.conf=/etc/wazuh-indexer, -Dopensearch.distribution.type=deb, -Dopensearch.bundled_jdk=true]
[2024-12-07T08:33:37,846][WARN ][o.o.s.c.Salt ] [node-1] If you plan to use field masking pls configure compliance salt e1ukloTsQlOgPquJ to be a random string of 16 chars length identical on all nodes
[2024-12-07T08:33:38,034][ERROR][o.o.s.a.s.SinkProvider ] [node-1] Default endpoint could not be created, auditlog will not work properly.
[2024-12-07T08:33:38,035][WARN ][o.o.s.a.r.AuditMessageRouter] [node-1] No default storage available, audit log may not work properly. Please check configuration.
[2024-12-07T08:33:40,210][WARN ][o.o.s.p.SQLPlugin ] [node-1] Master key is a required config for using create and update datasource APIs. Please set plugins.query.datasources.encryption.masterkey config in opensearch.yml in all the cluster nodes. More details can be found here: https://github.com/opensearch-project/sql/blob/main/docs/user/ppl/admin/datasources.rst#master-key-config-for-encrypting-credential-information
[2024-12-07T08:33:42,372][WARN ][o.o.g.DanglingIndicesState] [node-1] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
[2024-12-07T08:33:44,241][WARN ][o.o.p.c.s.h.ConfigOverridesClusterSettingHandler] [node-1] Config override setting update called with empty string. Ignoring.
[2024-12-07T08:33:44,453][WARN ][o.o.o.i.ObservabilityIndex] [node-1] message: index [.opensearch-observability/lZ6YXhLTSfmQp4ZDYGgFlQ] already exists
[2024-12-07T08:33:44,482][WARN ][o.o.s.SecurityAnalyticsPlugin] [node-1] Failed to initialize LogType config index and builtin log types