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

  • 相关阅读:
    WPF 便签项目
    .NET下WPF学习之Socket通信
    DEV控件
    字符串位数补足
    VS2008设置断点不命中
    错误描述: 242000021
    关闭Win10自带的 Windows Defender
    启用与关闭 Ad Hoc Distributed Queries
    Date工具类
    数据字段脱敏
  • 原文地址:https://www.cnblogs.com/taosiyu/p/13530119.html
Copyright © 2011-2022 走看看