跳到正文
Skillpedia
部署与云(DevOps)35k · #8129

implementing-syslog-centralization-with-rsyslog

它能做什么

这个工具可以帮助你配置 rsyslog 系统,把多台计算机的日志集中收集到一个地方,并且做到安全、有条理。它会生成所需的配置文件,分别用于让各台计算机发送日志,以及让一台中央计算机接收日志。

适用场景

  • ✓当你需要把多台服务器的日志汇总到同一个位置时。
  • ✓当你希望日志在传输过程中是加密的,从而更加安全时。
  • ✓当你需要按计算机或程序类型整理日志时。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-syslog-centralization-with-rsyslog/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-syslog-centralization-with-rsyslog/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“帮我配置 rsyslog,让我的服务器日志集中收集,并且加密传输。”

每周 5 个新技能,1 分钟读完。

工作原理

该工具会为服务器端和客户端生成配置文件。它使用加密技术保护日志在传输过程中的安全,并按计算机对接收到的文件进行分类整理。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Implementing Syslog Centralization with Rsyslog

When to Use

  • When deploying or configuring implementing syslog centralization with rsyslog capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • Familiarity with security operations concepts and tools
  • Access to a test or lab environment for safe execution
  • Python 3.8+ with required dependencies installed
  • Appropriate authorization for any testing activities

Instructions

  1. Install dependencies: pip install jinja2 paramiko
  2. Generate TLS certificates for rsyslog server and clients using OpenSSL.
  3. Run the agent to generate rsyslog server and client configurations:
    • Server: TLS listener on port 6514, per-host directory output, JSON-format templates
    • Client: TLS forwarding with disk-assisted queues for reliability
  4. Deploy configurations to servers via SSH (paramiko).
  5. Validate TLS connectivity and log delivery.
python scripts/agent.py --server-ip 10.0.0.1 --clients 10.0.0.10,10.0.0.11 --ca-cert ca.pem --output syslog_report.json

Examples

Server Configuration (TLS)

module(load="imtcp" StreamDriver.Name="gtls" StreamDriver.Mode="1"
       StreamDriver.Authmode="x509/name")
input(type="imtcp" port="6514")
template(name="PerHostLog" type="string" string="/var/log/remote/%HOSTNAME%/%PROGRAMNAME%.log")
*.* ?PerHostLog

Client Configuration (Reliable Forwarding)

action(type="omfwd" target="10.0.0.1" port="6514" protocol="tcp"
       StreamDriver="gtls" StreamDriverMode="1"
       StreamDriverAuthMode="x509/name"
       queue.type="LinkedList" queue.filename="fwdRule1"
       queue.maxdiskspace="1g" queue.saveonshutdown="on"
       action.resumeRetryCount="-1")
常见问题

什么是 rsyslog?

它是一个帮助管理和发送系统日志消息(也就是活动记录)的程序。

什么是日志?

日志是计算机或程序中发生的事件的记录。它们可以帮助你了解发生了什么、排查问题,或者检查安全状况。

为什么要集中管理日志?

把日志集中在一起,你就能在一个地方更方便地分析、监控所有系统,并搜索其中的重要信息。

详情

作者的原始描述

Configure rsyslog for centralized log collection with TLS encryption, custom templates, and log rotation, generating server and client configuration files with GnuTLS stream drivers, x509 certificate authentication, per-host log segregation, and reliable queue settings. Use when building a centralized, encrypted syslog pipeline, hardening rsyslog client/server configs for high-availability log inf

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#8129
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能