Elasticsearch
brew tap elastic/tapbrew install elastic/tap/elasticsearch-fullbrew services start elasticsearch-fullelasticsearch -dbrew services stop elasticsearch127.0.0.1:9200 查看
Kibana
brew tap elastic/tapbrew install elastic/tap/kibana-fullbrew services start kibana-fullbrew services restart kibana-full127.0.0.1:5601 访问 kibana
Logstash
brew tap elastic/tapbrew install elastic/tap/logstash-fullbrew services start elastic/tap/logstash-full -f *.conf
Plugin
// IK分词器elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.16.2/elasticsearch-analysis-ik-7.16.2.zip// analysis-icuelasticsearch-plugin install analysis-icuelasticsearch-plugin remove analysis-icu
FileBeat
filebeat -e -c /joyingbox/filebeat/filebeat.yml
filebeat.yml 配置文件
filebeat.inputs:- type: logenabled: truepaths:- /joyingbox/joyingbox-service/logs/allLog.logexclude_lines: ['DEBUG']exclude_files: ['.gz$']fields:appname: "joyingbox-erpedi-g"zxip: "172.17.24.18"multiline.pattern: '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d* 'multiline.negate: truemultiline.match: afterharvester_buffer_size: 16384 #默认16384max_bytes: 40960 #一条日志消息可以具有的最大字节数。 max_bytes之后的所有字节都将被丢弃并且不发送。默认10mbignore_older: 20m #ignore_older设置为大于close_inactiveclose_inactive: 10m #没有新日志多长时间关闭文件句柄,默认5分钟可改短一些clean_inactive: 60m #多久清理一次registry文件,默认值为0,运行时间长可能会导致该文件变大带来性能问题。clean_inactive must be > ignore_older + scan_frequencyscan_frequency: 60s #扫描间隔,默认10s,不建议过低max_procs: 1filebeat.config.modules:path: ${path.config}/modules.d/*.ymlreload.enabled: falsesetup.template.settings:index.number_of_shards: 1setup.kibana:output.elasticsearch:hosts: ["172.17.21.195:9200", "172.17.21.196:9200", "172.17.21.197:9200"]index: "fb-%{[fields.appname]}-%{+yyyy.MM.dd}"setup.ilm.enabled: falseilm.enabled: falsesetup.template.name: "fb-%{[fields.appname]}"setup.template.fields: "fields.yml"setup.template.overwrite: falsesetup.template.enabled: falseprocessors:- drop_fields:fields: ["input","source","offset","prospector","agent",'ecs',"log.offset"]logging.level: info
