python uses filebeat, the purpose is to collect logs
Project description
filebeat
介绍
python 项目使用filebeat
示例
import filebeat
# 加载配置,
# is_linux=True 使用Linux版的filebeat
# is_linux=False 使用Mac版的filebeat
fb = filebeat.load_config('filebeat.yml', is_linux=False)
# 运行
fb.run()
filebeat.yml 示例
filebeat.inputs:
- type: filestream
paths:
- /log/xx.log**
parsers:
- ndjson:
keys_under_root: true
overwrite_keys: true
add_error_key: true
expand_keys: true
output.logstash:
# Boolean flag to enable or disable the output module.
enabled: true
# The Logstash hosts
hosts: ["0.0.0.0:5144"]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
filebeat-0.0.2.tar.gz
(66.3 MB
view details)
File details
Details for the file filebeat-0.0.2.tar.gz
.
File metadata
- Download URL: filebeat-0.0.2.tar.gz
- Upload date:
- Size: 66.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d399194dee2760ec098888bd0825c31ef312f07da1cce7b46f16e96a6d9a5197 |
|
MD5 | e063a8c3a600a99abf1b025fd155d4ce |
|
BLAKE2b-256 | c5fb1bd2456615c94a39e6234fc0b0dbdd429bd92117539a8d3fe19176292a0b |