你提到的 CentOS 的 extract 配置,常见可能有以下几种含义,我分别说明,你可以对照自己的场景:
比如用脚本或工具从文件、日志、数据库中抽取数据:
tar 解压(extract)配置tar -xvf file.tar
tar -xzvf file.tar.gz
tar -xjvf file.tar.bz2
unzipunzip file.zip
extract(EPEL 中的小工具)CentOS 可通过 EPEL 安装:
yum install extract -y
extract file.xyz
常见于日志抽取:
filebeat.inputs:
- type: log
paths:
- /var/log/*.log
output.elasticsearch:
hosts: ["http://localhost:9200"]
input {
file {
path => "/var/log/messages"
start_position => "beginning"
}
}
filter {
grok {
match => { "message" => "%{SYSLOGTIMESTAMP:time} %{HOSTNAME} %{WORD:prog}" }
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
}
}
比如数据抽取(ETL):
mysqldump -u user -p dbname > db.sql
expdp user/pass directory=DATA_PUMP_DIR dumpfile=test.dmp
rpm2cpio package.rpm | cpio -idmv
请告诉我:
我可以直接给你对应配置文件示例。