Redhat 上面进行fluentd mail plugin 配置并进行邮件发送

第一步: preinstallation

fluentd的官网url:https://docs.fluentd.org/ 。根据官网的推荐,需要安装配置ntp。(It’s HIGHLY recommended that you set up ntpd on the node to prevent invalid timestamps in your log.)。在安装fluentd之前,有preinstallation。需要修改一下两个文件:

    a) /etc/security/limits.conf, 修改如下内容:

      root soft nofile 65536
      root hard nofile 65536
      * soft nofile 65536
      * hard nofile 65536

    b) /etc/sysctl.conf,修改如下内容

    net.core.somaxconn = 1024
    net.core.netdev_max_backlog = 5000
    net.core.rmem_max = 16777216
    net.core.wmem_max = 16777216
    net.ipv4.tcp_wmem = 4096 12582912 16777216
    net.ipv4.tcp_rmem = 4096 12582912 16777216
    net.ipv4.tcp_max_syn_backlog = 8096
    net.ipv4.tcp_slow_start_after_idle = 0
    net.ipv4.tcp_tw_reuse = 1

    net.ipv4.ip_local_port_range = 10240 65535

执行完b步骤文件内容的修改后,需要执行sysctl -p 命令来让修改生效。通知reboot server。


第二步: installation

执行命令:curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent3.sh | sh


第三步:start fluentd

systemctl start td-agent.service / systemctl status td-agent.service / systemctl stop td-agent.service


第四步:配置td-agent.conf 文件

首先配置source:

接着进行mail的match配置


第三步:在souce配置的文件里面写入内容;

第四步: 查看邮箱


至此,所有流程已走完。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值