1.- Filebeat
On the manager, configure /etc/filebeat/filebeat.yml to read alerts.json and archives.json data. Adding as well a new field "event_type" for "event" or "alert" value:
filebeat:
prospectors:
- input_type: log
paths:
- "/var/ossec/logs/alerts/alerts.json"
fields:
event_type: alerts
fields_under_root: true
document_type: json
json.message_key: log
json.keys_under_root: true
json.overwrite_keys: true
- input_type: log
paths:
- "/var/ossec/logs/archives/archives.json"
fields:
event_type: archives
fields_under_root: true
document_type: json
json.message_key: log
json.keys_under_root: true
json.overwrite_keys: true
2.- Logstash
Set Logstash output configuration to use "event_type" value:
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "wazuh-%{event_type}-%{+YYYY.MM.dd}"
document_type => "wazuh"
template => "/etc/logstash/wazuh-elastic5-template.json"
template_name => "wazuh"
template_overwrite => true
}
}
3.- Elasticsearch
Check indices status to be sure there are already inserted data.
curl -XGET localhost:9200/_cat/indices/wazuh-archives*
green open wazuh-archives-2017.05.31 ZD3z28srRSara_FISH-sQg 5 0 9 0 34kb 34kb
4.- Kibana
Add a new index pattern Open Kibana WUI, go to "Management" (Gear icon, left bar).
"Index patterns", create a new one with pattern wazuh-archives-*.
Now you have three index patterns, you could pick one:
wazuh-alerts-*
wazuh-archives-*
wazuh-monitoring-*

If for some reason, you want to display all the data on same visualizations or discover tab, you could create a new index pattern with pattern "wazuh-*" which will group everything.
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/4C8E2291-6C04-4357-880B-55FF3068BDCE%40wazuh.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/CAEb-Ba873BUNTb6RUepM%2BXqoZM2%2BfDF4pqdCmG4Ko39%3D_vLeCA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/2b24575a-e62c-4086-b2e5-b1de68e453f5%40googlegroups.com.
Hi Rwagner,Your configuration looks right, still we can notice the difference between how Kibana shows _source fields for archives* and alerts*.I can see how "_source" field is present in "Selected fields" left column for wazuh-alerts-* pattern, but it is not for wazuh-archives-*.Did you try to refresh your index pattern ? for loading new fields ? Management -> Index patterns -> Choose wazuh-archives-* and click on "Refresh" icon.Best,Pedro.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/9b3c7db9-c697-49c4-a2ae-46f571708c1b%40googlegroups.com.
Hi Rwagner,Did you get it done? I can't think about this as an "issue", I believe this is standard Kibana behaviour and it is not preventing anything to work right.Still it looks ugly and I prefer the see _source field with some "labels" for fields, but I am not quite sure what is causing the "switch" from cool to ugly.Could be related to template, we could try to set up the environment without template (temporally) and pushing the events manually (using cURL to Elastic), create index-pattern, not using Wazuh App, and detect if we are causing the issue or it is just Kibana tricking us.Let us know if you figure out what is Kibana doing with the default _source field visualization on Discover.Thanks!
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/bc0aea34-6dd5-4725-b702-fb6009f80b1f%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/27aeb75a-20f8-4641-9075-32ec2818d275%40googlegroups.com.