zoukankan      html  css  js  c++  java
  • syslog简单配置介绍

    /etc/rsyslog.conf

    $ModLoad imfile                                加在imfile模块

    $InputFileName           filePath          监测日志路径

    $InputFilePollInterval      10               轮询时间

    $InputFileTag                  标签            监测日志的标签

    $InputFileStateFile        filePath         定义记录偏移量数据文件名

    $InputFileSeverity           info             需要发送日志等级

    $InputFileFacility         local0             设备名称

    $InputRunFileMonitor                         以示生效

    *.info;mail.none;authpriv.none;cron.none;local0.none;   /var/logmessages    将该设备不写入本地/var/log/messages,避免占用空间

    local0.none                                   @@ip:port                      接收方的ip和端口,@@为TCP,@为UDP

    接收方存储路径配置

    if $programname contains 'tagFilePath'  then -/varlog/remote_log/tagFilePath.log

  • 相关阅读:
    3.28
    03.21
    03.16
    03.15
    03.14小记
    [LC] 96. Unique Binary Search Trees
    [LC] 298. Binary Tree Longest Consecutive Sequence
    [LC] 102. Binary Tree Level Order Traversal
    [LC] 107. Binary Tree Level Order Traversal II
    [LC] 513. Find Bottom Left Tree Value
  • 原文地址:https://www.cnblogs.com/taosiyu/p/13530119.html
Copyright © 2011-2022 走看看