这个是配置文件
Filebeat Configuration Example
filebeat.inputs:
type: log
enabled: false
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
setup.template.settings:
index.number_of_shards: 3
#index.codec: best_compression
#_source.enabled: false
-setup
CLI flag or the setup
command.setup.kibana:
# Kibana Host
# Scheme and port can be left out and will be set to the default (http and 5601)
# In case you specify and additional path, the scheme is required: http://localhost:5601/path
# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
#host: "localhost:5601"
# Kibana Space ID
# ID of the Kibana Space into which the dashboards should be loaded. By default,
# the Default Space will be used.
#space.id:
output.elasticsearch.hosts
andsetup.kibana.host
options.cloud.id
in the Elastic Cloud web UI.output.elasticsearch.username
andoutput.elasticsearch.password
settings. The format is <user>:<pass>
.# Array of hosts to connect to.
# Enabled ilm (beta) to use index lifecycle management instead daily indices.
#ilm.enabled: false
# Optional protocol and basic auth credentials.
#protocol: "https"
#username: "elastic"
#password: "changeme"
output.logstash:
# The Logstash hosts
hosts: ["192.168.0.6:5044"]
# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"
# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"
processors:
这个是日志
2020-02-04T22:51:30.451-0500 INFO instance/beat.go:611 Home path: [/usr/local/elk/filebeat-6.8.6-linux-x86_64] Config path: [/usr/local/elk/filebeat-6.8.6-linux-x86_64] Data path: [/usr/local/elk/filebeat-6.8.6-linux-x86_64/data] Logs path: [/usr/local/elk/filebeat-6.8.6-linux-x86_64/logs]
2020-02-04T22:51:30.451-0500 INFO instance/beat.go:618 Beat UUID: 05bebefc-da2d-424f-adf7-801057c33454
2020-02-04T22:51:30.451-0500 INFO [seccomp] seccomp/seccomp.go:116 Syscall filter successfully installed
2020-02-04T22:51:30.452-0500 INFO [beat] instance/beat.go:931 Beat info {"system_info": {"beat": {"path": {"config": "/usr/local/elk/filebeat-6.8.6-linux-x86_64", "data": "/usr/local/elk/filebeat-6.8.6-linux-x86_64/data", "home": "/usr/local/elk/filebeat-6.8.6-linux-x86_64", "logs": "/usr/local/elk/filebeat-6.8.6-linux-x86_64/logs"}, "type": "filebeat", "uuid": "05bebefc-da2d-424f-adf7-801057c33454"}}}
2020-02-04T22:51:30.452-0500 INFO [beat] instance/beat.go:940 Build info {"system_info": {"build": {"commit": "4fa63eb23a94bf23650023317bdff335c4705fc2", "libbeat": "6.8.6", "time": "2019-12-13T16:15:17.000Z", "version": "6.8.6"}}}
2020-02-04T22:51:30.452-0500 INFO [beat] instance/beat.go:943 Go runtime info {"system_info": {"go": {"os":"linux","arch":"amd64","max_procs":4,"version":"go1.10.8"}}}
2020-02-04T22:51:30.453-0500 INFO [beat] instance/beat.go:947 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2020-02-04T22:07:52-05:00","containerized":false,"name":"localhost.localdomain","ip":["127.0.0.1/8","::1/128","192.168.0.6/24","fe80::923b:e421:5b93:e6d7/64"],"kernel_version":"3.10.0-1062.el7.x86_64","mac":["00:0c:29:b0:e7:c4","00:0c:29:b0:e7:ce"],"os":{"family":"redhat","platform":"centos","name":"CentOS Linux","version":"7 (Core)","major":7,"minor":7,"patch":1908,"codename":"Core"},"timezone":"EST","timezone_offset_sec":-18000,"id":"f311bc113c004dafbdc84930c66e7be0"}}}
2020-02-04T22:51:30.454-0500 INFO [beat] instance/beat.go:976 Process info {"system_info": {"process": {"capabilities": {"inheritable":null,"permitted":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend"],"effective":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend"],"bounding":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend"],"ambient":null}, "cwd": "/home/centos/shell", "exe": "/usr/local/elk/filebeat-6.8.6-linux-x86_64/filebeat", "name": "filebeat", "pid": 1918, "ppid": 1917, "seccomp": {"mode":"filter","no_new_privs":true}, "start_time": "2020-02-04T22:51:30.080-0500"}}}
2020-02-04T22:51:30.454-0500 INFO instance/beat.go:280 Setup Beat: filebeat; Version: 6.8.6
2020-02-04T22:51:33.458-0500 INFO add_cloud_metadata/add_cloud_metadata.go:340 add_cloud_metadata: hosting provider type not detected.
2020-02-04T22:51:33.461-0500 DEBUG [publish] pipeline/consumer.go:137 start pipeline event consumer
2020-02-04T22:51:33.461-0500 INFO [publisher] pipeline/module.go:110 Beat name: localhost.localdomain
2020-02-04T22:51:33.465-0500 INFO [monitoring] log/log.go:117 Starting metrics logging every 30s
2020-02-04T22:51:33.465-0500 INFO instance/beat.go:402 filebeat start running.
2020-02-04T22:51:33.465-0500 INFO registrar/registrar.go:134 Loading registrar data from /usr/local/elk/filebeat-6.8.6-linux-x86_64/data/registry
2020-02-04T22:51:33.466-0500 INFO registrar/registrar.go:141 States Loaded from registrar: 0
2020-02-04T22:51:33.466-0500 WARN beater/filebeat.go:367 Filebeat is unable to load the Ingest Node pipelines for the configured modules because the Elasticsearch output is not configured/enabled. If you have already loaded the Ingest Node pipelines or are using Logstash pipelines, you can ignore this warning.
2020-02-04T22:51:33.466-0500 INFO crawler/crawler.go:72 Loading Inputs: 1
2020-02-04T22:51:33.466-0500 INFO crawler/crawler.go:106 Loading and starting Inputs completed. Enabled inputs: 0
2020-02-04T22:51:33.466-0500 INFO cfgfile/reload.go:150 Config reloader started
2020-02-04T22:51:33.467-0500 INFO cfgfile/reload.go:205 Loading of config files completed.
2020-02-04T22:52:03.472-0500 INFO [monitoring] log/log.go:144 Non-zero metrics in the last 30s {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":70,"time":{"ms":75}},"total":{"ticks":90,"time":{"ms":97},"value":90},"user":{"ticks":20,"time":{"ms":22}}},"handles":{"limit":{"hard":65535,"soft":65535},"open":5},"info":{"ephemeral_id":"b0f46c2d-cfc2-4646-b404-fbf9ad9c36b6","uptime":{"ms":33029}},"memstats":{"gc_next":4194304,"memory_alloc":2021200,"memory_total":4978312,"rss":17391616}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0},"reloads":1},"output":{"type":"logstash"},"pipeline":{"clients":0,"events":{"active":0}}},"registrar":{"states":{"current":0}},"system":{"cpu":{"cores":4},"load":{"1":0.01,"15":0.05,"5":0.02,"norm":{"1":0.0025,"15":0.0125,"5":0.005}}}}}}
2020-02-04T22:52:33.474-0500 INFO [monitoring] log/log.go:144 Non-zero metrics in the last 30s {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":80,"time":{"ms":13}},"total":{"ticks":100,"time":{"ms":13},"value":100},"user":{"ticks":20}},"handles":{"limit":{"hard":65535,"soft":65535},"open":5},"info":{"ephemeral_id":"b0f46c2d-cfc2-4646-b404-fbf9ad9c36b6","uptime":{"ms":63036}},"memstats":{"gc_next":4194304,"memory_alloc":2308136,"memory_total":5265248}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0}},"pipeline":{"clients":0,"events":{"active":0}}},"registrar":{"states":{"current":0}},"system":{"load":{"1":0.01,"15":0.05,"5":0.02,"norm":{"1":0.0025,"15":0.0125,"5":0.005}}}}}}
2020-02-04T22:53:03.474-0500 INFO [monitoring] log/log.go:144 Non-zero metrics in the last 30s {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":90,"time":{"ms":11}},"total":{"ticks":110,"time":{"ms":15},"value":110},"user":{"ticks":20,"time":{"ms":4}}},"handles":{"limit":{"hard":65535,"soft":65535},"open":5},"info":{"ephemeral_id":"b0f46c2d-cfc2-4646-b404-fbf9ad9c36b6","uptime":{"ms":93029}},"memstats":{"gc_next":4194304,"memory_alloc":2572664,"memory_total":5529776}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":0}},"pipeline":{"clients":0,"events":{"active":0}}},"registrar":{"states":{"current":0}},"system":{"load":{"1":0,"15":0.05,"5":0.01,"norm":{"1":0,"15":0.0125,"5":0.0025}}}}}}
filebeat.inputs:
type: log
enabled: false
paths:
/var/log/*.log
--------------------------
enabled没有换成true