惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

运维监控系列 on 打工人日志

skywalking python agent 安装和配置 windows-exporter 监控 skywalking APM 监控 logstash 多管道部署 nginx exporter 安装配置 prometheus grafana alertmanager 安装配置 prometheus 配置
Logstash 自动重载配置文件
2022-10-31 · via 运维监控系列 on 打工人日志

工作原理

  1. 检测到配置文件变化
  2. 通过停止所有输入停止当前pipline
  3. 用新的配置创建一个新的管道
  4. 检查配置文件语法是否正确
  5. 检查所有的输入和输出是否可以初始化
  6. 检查成功使用新的 pipeline 替换当前的pipeline
  7. 检查失败,使用旧的继续工作.
  8. 在重载过程中,jvm 没有重启.

Logstash 自动重新加载配置

为了可以自动检测配置文件的变动和自动重新加载配置文件,需要在启动的时候使用以下命令:

1./bin/lagstash -f configfile.conf --config.reload.automatic

启动 Logstash 的时候使用--config.reload.automatic-r选项来开启自动重载配置。

修改检测间隔时间

默认检测配置文件的间隔时间是3秒,可以通过以下命令改变

1--config.reload.interval <second>

如果 Logstash 已经运行并且没有开启自动重载,你可以强制 Logstash 重新载入配置文件并且重启管道通过发送一个 SIGHUP 信号。比如:

其中是正在运行的 Logstash 的进程号。

注意!!!

stdin输入插件不支持自动重启.
syslog作为输入源,当重载配置文件时,会崩溃.
解决方法