logstash配置syslog外发

2023-12-06 18:59
文章标签 配置 syslog logstash 外发

本文主要是介绍logstash配置syslog外发,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

需求:logstash收到的syslog日志发往elasticsearch和深信服日志审计设备。

本以为直接写outside就可以解决问题,启动时报错,logstash默认情况下未安装logstash-output-syslog组件,需先安装此组件才能正确启动。

syslog {

facility => …

host => …

port => …

severity => …

}

启动时有如下报错:

Couldn’t find any output plugin named ‘syslog’. Are you sure this is correct? Trying to load the syslog output plugin resulted in this error: no such file to load

 

安装后使用下列配置文件启动即可。

input{

syslog {

type => “rsyslog”

port => 514

}

}

filter{

}

output{

elasticsearch {

hosts => [“127.0.0.1:9200”]

flush_size => 1

index => “syslog-%{+YYYY.MM.dd}”

}

syslog {

facility => [“kernel”]

host => “1.2.3.4”

port => 514

severity => [“debug”]

}

}

附logstash-output-syslog配置文件说明:

 

Details

 

appname
  • Value type is string
  • Default value is "LOGSTASH"

application name for syslog message

codec
  • Value type is codec
  • Default value is "plain"

The codec used for output data. Output codecs are a convenient method for encoding your data before it leaves the output, without needing a separate filter in your Logstash pipeline.

facility
  • This is a required setting.
  • Value can be any of: kerneluser-levelmaildaemonsecurity/authorizationsyslogdline printernetwork newsuucpclocksecurity/authorizationftpntplog auditlog alertclocklocal0local1local2local3local4local5local6local7
  • There is no default value for this setting.

facility label for syslog message

host
  • This is a required setting.
  • Value type is string
  • There is no default value for this setting.

syslog server address to connect to

message
  • Value type is string
  • Default value is "%{message}"

message text to log

msgid
  • Value type is string
  • Default value is "-"

message id for syslog message

port
  • This is a required setting.
  • Value type is number
  • There is no default value for this setting.

syslog server port to connect to

procid
  • Value type is string
  • Default value is "-"

process id for syslog message

protocol
  • Value can be any of: tcpudp
  • Default value is "udp"

syslog server protocol. you can choose between udp and tcp

rfc
  • Value can be any of: rfc3164rfc5424
  • Default value is "rfc3164"

syslog message format: you can choose between rfc3164 or rfc5424

severity
  • This is a required setting.
  • Value can be any of: emergencyalertcriticalerrorwarningnoticeinformationaldebug
  • There is no default value for this setting.

severity label for syslog message

sourcehost
  • Value type is string
  • Default value is "%{host}"

source host for syslog message

timestamp (DEPRECATED)
  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value type is string
  • Default value is "%{@timestamp}"

timestamp for syslog message

workers
  • Value type is number
  • Default value is 1

The number of workers to use for this output. Note that this setting may not be useful for all outputs.

本文链接地址: logstash配置syslog外发


http://www.taodudu.cc/news/show-8380969.html

相关文章:

  • 网页制作必备之初级代码
  • linux之openssh协议
  • WebSocket之ServerEndPoint
  • 已发生的、正发生的和尚未发生的
  • 关于Color的三个问题
  • sql查询——查询排名为m~n的学生
  • 三星推QLED 8K电视 LG表示8K和OLED更配
  • 三星QLED彻底击败LG OLED电视,华为将加入QLED阵营
  • 三星发布QLED TV新品,用AI与IoT技术定义下一代电视 | 速递
  • 冷热交替的电视市场,QLED甩开了OLED一段路程
  • mysql dbuild_config_mysqld config
  • C语言学习随笔记之EOF用法
  • Dynamo For Revit: CurtainPanel 幕墙嵌板
  • IISWeb应用防火墙WAF
  • Java实现 蓝桥杯VIP 算法提高 前10名
  • freeotp 安装及使用过程
  • 安全工具-WAF网络防火墙探测工具(WAFw00f)安装
  • 一个让程序员撞了南墙才回头的8句话!(摘自互联网:出处不明)
  • 讲解C++中的深度优先搜索(DFS)
  • 信息学奥赛一本通 166:The Castle
  • python培训感想800字
  • 腾讯研究院发布《中国分享经济全景解读报告》
  • 知识付费的发展困境和发展趋势
  • 思维的万丈深涯-控制不住的自己
  • Cocos2d-x for WindowsPhone:万丈高楼亦可不需平地起
  • 云深不知处
  • Python疫起学习·万丈高楼平地起Day01(精简版|浓缩就是精华)内附两行代码解决某数字各个位数字,计算三角形第三边长
  • Python疫起学习·万丈高楼平地起Day04(精简版|浓缩就是精华)列表随机分配办公人员商品购物
  • 万丈高楼平地起之socket篇
  • 【前端体系】从地基开始打造一座万丈高楼
  • 这篇关于logstash配置syslog外发的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



    http://www.chinasem.cn/article/462945

    相关文章

    mybatis映射器配置小结

    《mybatis映射器配置小结》本文详解MyBatis映射器配置,重点讲解字段映射的三种解决方案(别名、自动驼峰映射、resultMap),文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定... 目录select中字段的映射问题使用SQL语句中的别名功能使用mapUnderscoreToCame

    Linux下MySQL数据库定时备份脚本与Crontab配置教学

    《Linux下MySQL数据库定时备份脚本与Crontab配置教学》在生产环境中,数据库是核心资产之一,定期备份数据库可以有效防止意外数据丢失,本文将分享一份MySQL定时备份脚本,并讲解如何通过cr... 目录备份脚本详解脚本功能说明授权与可执行权限使用 Crontab 定时执行编辑 Crontab添加定

    Java使用jar命令配置服务器端口的完整指南

    《Java使用jar命令配置服务器端口的完整指南》本文将详细介绍如何使用java-jar命令启动应用,并重点讲解如何配置服务器端口,同时提供一个实用的Web工具来简化这一过程,希望对大家有所帮助... 目录1. Java Jar文件简介1.1 什么是Jar文件1.2 创建可执行Jar文件2. 使用java

    SpringBoot 多环境开发实战(从配置、管理与控制)

    《SpringBoot多环境开发实战(从配置、管理与控制)》本文详解SpringBoot多环境配置,涵盖单文件YAML、多文件模式、MavenProfile分组及激活策略,通过优先级控制灵活切换环境... 目录一、多环境开发基础(单文件 YAML 版)(一)配置原理与优势(二)实操示例二、多环境开发多文件版

    Vite 打包目录结构自定义配置小结

    《Vite打包目录结构自定义配置小结》在Vite工程开发中,默认打包后的dist目录资源常集中在asset目录下,不利于资源管理,本文基于Rollup配置原理,本文就来介绍一下通过Vite配置自定义... 目录一、实现原理二、具体配置步骤1. 基础配置文件2. 配置说明(1)js 资源分离(2)非 JS 资

    MySQL8 密码强度评估与配置详解

    《MySQL8密码强度评估与配置详解》MySQL8默认启用密码强度插件,实施MEDIUM策略(长度8、含数字/字母/特殊字符),支持动态调整与配置文件设置,推荐使用STRONG策略并定期更新密码以提... 目录一、mysql 8 密码强度评估机制1.核心插件:validate_password2.密码策略级

    ShardingProxy读写分离之原理、配置与实践过程

    《ShardingProxy读写分离之原理、配置与实践过程》ShardingProxy是ApacheShardingSphere的数据库中间件,通过三层架构实现读写分离,解决高并发场景下数据库性能瓶... 目录一、ShardingProxy技术定位与读写分离核心价值1.1 技术定位1.2 读写分离核心价值二

    QT Creator配置Kit的实现示例

    《QTCreator配置Kit的实现示例》本文主要介绍了使用Qt5.12.12与VS2022时,因MSVC编译器版本不匹配及WindowsSDK缺失导致配置错误的问题解决,感兴趣的可以了解一下... 目录0、背景:qt5.12.12+vs2022一、症状:二、原因:(可以跳过,直奔后面的解决方法)三、解决方

    SpringBoot路径映射配置的实现步骤

    《SpringBoot路径映射配置的实现步骤》本文介绍了如何在SpringBoot项目中配置路径映射,使得除static目录外的资源可被访问,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一... 目录SpringBoot路径映射补:springboot 配置虚拟路径映射 @RequestMapp

    Nginx中配置使用非默认80端口进行服务的完整指南

    《Nginx中配置使用非默认80端口进行服务的完整指南》在实际生产环境中,我们经常需要将Nginx配置在其他端口上运行,本文将详细介绍如何在Nginx中配置使用非默认端口进行服务,希望对大家有所帮助... 目录一、为什么需要使用非默认端口二、配置Nginx使用非默认端口的基本方法2.1 修改listen指令