背景:

  Ossec安装后用了一段时间的analogi作为ossec的报警信息显示平台,但是查看报警分类信息、

以及相关图标展示等方面总有那么一点点的差强人意,难以分析。因此使用逼格高一点的splunk作为

日志分析平台就变得很有必要了。

操作:

 一、ossec服务端配置

  (1)配置ossec数据转发至splunk监听端口

    [root@localhost html]# vim /opt/ossec/etc/ossec.conf

  在<ossec_config>标签下添加<syslog_output>,内容如下,

  其中server标签的IP为接受syslog记录的服务端,即安装splunk服务的主机IP。

  端口为splunk的本地监听端口。

  <syslog_output>
<server>192.168.129.134</server>
<port></port>
</syslog_output>

  (2)使syslog_output模块生效并重启ossec服务端。

[root@localhost html]# /opt/ossec/bin/ossec-control enable client-syslog
[root@localhost html]# /opt/ossec/bin/ossec-control restart

 二、下载并安装splunk

  (1)从官网下载splunk(需注册),下载文件为splunklight-6.4.2-00f5bb3fa822-linux-2.6-x86_64.rpm

  (2)安装splunk:rpm -Uvh splunklight-6.4.2-00f5bb3fa822-linux-2.6-x86_64.rpm

[root@localhost Desktop]# rpm -Uvh splunklight-6.4.-00f5bb3fa822-linux-2.6-x86_64.rpm
warning: splunklight-6.4.-00f5bb3fa822-linux-2.6-x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 653fb112: NOKEY
Preparing... ################################# [%]
Updating / installing...
:splunk-6.4.-00f5bb3fa822 ################################# [%]
complete

  (3)启动splunk:# /opt/splunk/bin/splunk start (启动时会询问是否同意许可,输入y后继续)

[root@localhost Desktop]# /opt/splunk/bin/splunk start

... ...

. FORCE MAJEURE. Splunk will not be responsible for any failure or delay in its
performance under these Terms and Conditions due to causes beyond its reasonable
control, including, but not limited to, labor disputes, strikes, lockouts,
shortages of or inability to obtain labor, energy, raw materials or supplies,
war, acts of terror, riot, acts of God or governmental action.
Do you agree with this license? [y/n]: y ... ...

  Waiting for web server at http://127.0.0.1:8000 to be available... Done

  If you get stuck, we're here to help. 
  Look for answers here: http://docs.splunk.com

  The Splunk web interface is at http://127.0.0.1:8000

  (4)Splunk的web接口为http://127.0.0.1:8000,尝试访问。

  (5)首次登录请先按着提示输入admin/changeme后,设定新的密码。之后的登录信息为admin+你设定的新密码。

  (6)登录成功

 三、配置Splunk接收来自Ossec的日志转发

  (1)splunk的默认安装路径为/opt/splunk,编辑/opt/splunk/etc/system/local/inputs.conf文件添加以下红色字体内容

    指定的ip为ossec服务器的IP地址。

[root@localhost local]# vim /opt/splunk/etc/system/local/inputs.conf 

[default]
host = localhost.localdomain [udp://192.168.129.128:10002] # IP address of OSSEC server
disabled = false
sourcetype = ossec

  (2)重启Splunk服务

# /opt/splunk/bin/splunk restart

 四、Splunk数据导入

  (1)导入页面

  

 数据已成功导入

Splunk作为日志分析平台与Ossec进行联动的更多相关文章

  1. ELK+redis搭建nginx日志分析平台

    ELK+redis搭建nginx日志分析平台发表于 2015-08-19   |   分类于 Linux/Unix   |  ELK简介ELKStack即Elasticsearch + Logstas ...

  2. 使用elk+redis搭建nginx日志分析平台

    elk+redis 搭建nginx日志分析平台 logstash,elasticsearch,kibana 怎么进行nginx的日志分析呢?首先,架构方面,nginx是有日志文件的,它的每个请求的状态 ...

  3. ELK_elk+redis 搭建日志分析平台

    这个是最新的elk+redis搭建日志分析平台,今年时间是2015年9月11日. Elk分别为 elasticsearch,logstash, kibana 官网为:https://www.elast ...

  4. linux下利用elk+redis 搭建日志分析平台教程

    linux下利用elk+redis 搭建日志分析平台教程 http://www.alliedjeep.com/18084.htm   elk 日志分析+redis数据库可以创建一个不错的日志分析平台了 ...

  5. 1002-谈谈ELK日志分析平台的性能优化理念

    在生产环境中,我们为了更好的服务于业务,通常会通过优化的手段来实现服务对外的性能最大化,节省系统性能开支:关注我的朋友们都知道,前段时间一直在搞ELK,同时也记录在了个人的博客篇章中,从部署到各个服务 ...

  6. ELK+Filebeat+Kafka+ZooKeeper 构建海量日志分析平台(elk5.2+filebeat2.11)

    ELK+Filebeat+Kafka+ZooKeeper 构建海量日志分析平台 参考:http://www.tuicool.com/articles/R77fieA 我在做ELK日志平台开始之初选择为 ...

  7. centos7搭建ELK Cluster集群日志分析平台(四):Fliebeat-简单测试

    续之前安装好的ELK集群 各主机:es-1 ~ es-3 :192.168.1.21/22/23 logstash: 192.168.1.24 kibana: 192.168.1.25 测试机:cli ...

  8. centos7搭建ELK Cluster集群日志分析平台(三):Kibana

    续  centos7搭建ELK Cluster集群日志分析平台(一) 续  centos7搭建ELK Cluster集群日志分析平台(二) 已经安装好elasticsearch 5.4集群和logst ...

  9. centos7搭建ELK Cluster集群日志分析平台(二):Logstash

    续  centos7搭建ELK Cluster集群日志分析平台(一) 已经安装完Elasticsearch 5.4 集群. 安装Logstash步骤 . 安装Java 8 官方说明:需要安装Java ...

随机推荐

  1. MyException

    自定义Exception using System; using System.Collections.Generic; using System.Linq; using System.Text; u ...

  2. centos wordpress

    How To Install Linux, nginx, MySQL, PHP (LEMP) stack on CentOS 6 https://www.digitalocean.com/commun ...

  3. Net Core开源通讯组件 SmartRoute

    Net Core开源通讯组件 SmartRoute(服务即集群) SmartRoute是基于Dotnet Core设计的可运行在linux和windows下的服务通讯组件,其设计理念是去中心化和零配置 ...

  4. error: format not a string literal and no format arguments [-Werror=format-security]

    You can put this in your Application.mk to disable treating those warnings as errors: APP_CFLAGS += ...

  5. c语言编程之栈(数组实现)

    用数组实现的顺序栈,完成了出栈入栈功能. #include"stdio.h" typedef int element; #define max 100 typedef struct ...

  6. js 正则 数值验证

    function checkTextDataForNORMAL(strValue) { // 特殊字符验证格式 var regTextChar = /([\*"\'<>\/])+ ...

  7. 不能用100%ie6不兼容

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. linux常用命令详解

    Linux提供了大量的命令,利用它可以有效地完成大量的工作,如磁盘操作.文件存取.目录操作.进程管理.文件权限设定等.所以,在Linux系统上工作离不开使用系统提供的命令.要想真正理解Linux系统, ...

  9. C#根据日期DateTime和持续时间int找到日期

    protected DateTime GetFinish(DateTime start, int duration) { return start.AddDays(duration); } prote ...

  10. C# textbox 滚动条 随文本输入 滚动

    tb_Log.SelectionStart = tb_Log.Text.Length;//设置光标位置 tb_Log.ScrollToCaret();//随文本输入 滚动