Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)35k · #8129

implementing-syslog-centralization-with-rsyslog

Skill này làm gì

Công cụ này giúp cấu hình hệ thống rsyslog để thu thập nhật ký từ nhiều máy tính về một nơi, an toàn và có tổ chức. Nó tạo các tệp cấu hình cần thiết để máy tính gửi nhật ký và để một máy trung tâm nhận chúng.

Khi nào nên dùng

  • ✓Khi bạn cần thu thập nhật ký từ nhiều máy chủ về một vị trí duy nhất.
  • ✓Khi bạn muốn bảo đảm nhật ký được gửi an toàn (được mã hóa).
  • ✓Khi bạn cần sắp xếp nhật ký theo máy tính hoặc loại chương trình.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-syslog-centralization-with-rsyslog/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy cấu hình rsyslog để tập trung và mã hóa nhật ký từ các máy chủ của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ tạo tệp cấu hình cho máy chủ và máy khách. Nó dùng mã hóa để bảo vệ nhật ký khi truyền đi và sắp xếp các tệp nhận được theo từng máy tính.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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")
Câu hỏi thường gặp

rsyslog là gì?

Đây là chương trình giúp quản lý và gửi các thông điệp nhật ký (bản ghi hoạt động) của hệ thống.

Nhật ký (logs) là gì?

Đó là bản ghi các sự kiện xảy ra trên máy tính hoặc chương trình. Chúng hữu ích để biết chuyện gì đã xảy ra, khắc phục sự cố hoặc kiểm tra bảo mật.

Vì sao phải tập trung nhật ký?

Tập trung nhật ký giúp dễ phân tích, giám sát và tìm kiếm thông tin quan trọng trên tất cả hệ thống ở một nơi.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#8129
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự