ES - 6.2
LS - 6.2
Filebeat - osquery module
OS - Mac
2 questions
-
What is the benefit of running a module instead of just a prospector? Besides the auto index creation and visualizations. If those are not needed then why use a module?
-
I am testing the osquery module for filebeat. I have everything working but all of my fields are prepended with
json.<fieldname>
.
Example:
json.columns.cmdline| |/Applications/Microsoft Excel.app/Contents/MacOS/Microsoft Excel -psn_0_827594|
|---|---|---|
json.columns.cpu_time_kernel| | 4170|
json.columns.cpu_time_user| | 5420|
How can I remove the json.
from the front of all my field names?
modules.d/osquery.yml
- module: osquery
result:
enabled: true
var.paths: ["/var/log/osquery/osqueryd.results.log"]
# If true, all fields created by this module are prefixed with
# `osquery.result`. Set to false to copy the fields in the root
# of the document. The default is true.
var.use_namespace: false
filebeat.yml
#=========================== Filebeat prospectors =============================
filebeat.prospectors:
tags: ["osquery_filebeat_test"]
processors:
- drop_fields:
fields: ["beat.name", "beat.hostname", "beat.version", "beat", "host", "input_type", "source", "prospector.type"]
#============================= Filebeat modules ===============================
filebeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
# Set to true to enable config reloading
reload.enabled: false
# Period on which files under path should be checked for changes
#reload.period: 10s
#================================ Outputs =====================================
#--------------------------- Logstash output -------------------------------
output.logstash:
hosts: ["DOMAIN.com:443"]
ssl.certificate_authorities: ["/Applications/Filebeat/certs/cert.crt"]
loadbalance: true
# ttl: 300
#================================ Logging =====================================
logging.level: info
logging.to_files: true