CentOS 7安装Splunk_splunk for centos

2.下载解压Splunk企业版

从Splunk官方网站下载Splunk软件,创建一个账户。
Splunk1
现在解压tar文件,将文件复制到/opt/splunk下已经创建splunk的应用程序文件夹下面。

root@server1 tmp]# tar -xvf splunk-6.4.0-f2c836328108-Linux-x86_64.tgz
[root@server1 tmp]# cp -rp splunk/* /opt/splunk/
[root@server1 tmp]# chown -R splunk: /opt/splunk/

3.安装Splunk

Splunk软件下载之后,您可以用您的Splunk用户登录运行安装脚本。我选择试用许可证,所以它会默认。

root@server1 tmp]# su - splunk
Last login: Fri Apr 29 08:14:12 UTC 2016 on pts/0

[splunk@server1 ~]$ cd bin/
[splunk@server1 bin]$ ./splunk start --accept-license

This appears to be your first time running this version of Splunk.

Copying '/opt/splunk/etc/openldap/ldap.conf.default' to '/opt/splunk/etc/openldap/ldap.conf'.
Generating RSA private key, 1024 bit long modulus
.++++++
..................++++++
e is 65537 (0x10001)
writing RSA key

Generating RSA private key, 1024 bit long modulus
................++++++
..++++++
e is 65537 (0x10001)
writing RSA key

Moving '/opt/splunk/share/splunk/search_mrsparkle/modules.new' to '/opt/splunk/share/splunk/search_mrsparkle/modules'.

Splunk> Australian for grep.

Checking prerequisites...
Checking http port [8000]: open
Checking mgmt port [8089]: open
Checking appserver port [127.0.0.1:8065]: open
Checking kvstore port [8191]: open
Checking configuration... Done.
Creating: /opt/splunk/var/lib/splunk
Creating: /opt/splunk/var/run/splunk
Creating: /opt/splunk/var/run/splunk/appserver/i18n
Creating: /opt/splunk/var/run/splunk/appserver/modules/static/css
Creating: /opt/splunk/var/run/splunk/upload
Creating: /opt/splunk/var/spool/splunk
Creating: /opt/splunk/var/spool/dirmoncache
Creating: /opt/splunk/var/lib/splunk/authDb
Creating: /opt/splunk/var/lib/splunk/hashDb
Checking critical directories... Done
Checking indexes...
Validated: _audit _internal _introspection _thefishbucket history main summary
Done
New certs have been generated in '/opt/splunk/etc/auth'.
Checking filesystem compatibility... Done
Checking conf files for problems...
Done
Checking default conf files for edits...
Validating installed files against hashes from '/opt/splunk/splunk-6.4.0-f2c836328108-linux-2.6-x86_64-manifest'
All installed files intact.
Done
All preliminary checks passed.

Starting splunk server daemon (splunkd)...
Generating a 1024 bit RSA private key
.....................++++++
...........................++++++
writing new private key to 'privKeySecure.pem'
-----
Signature ok
subject=/CN=server1.centos7-test.com/O=SplunkUser
Getting CA Private Key
writing RSA key
Done
[ OK ]

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://server1.centos7-test.com:8000

现在您可以访问您的Splunk Web界面http://IP:8000 /或http://hostname:8000,您需要确保这个端口8000在您服务器防火墙上面开放。

4.配置Splunk Web界面

我已经完成Splunk的安装,Splunk服务在我的服务器中正常运行。现在我需要设置我Splunk Web界面,使用我设置的管理员密码访问Splunk web界面。
splunks2
第一次当您访问Splunk的界面,你在页面中使用的是管理员用户和密码。一旦登录,就在下一页,它会要求更改和确认您的新密码。
splunk3
现在,您已经设置新的管理员密码。一旦您使用新密码登录,您将有准备使用的Splunk仪表板。
splunk4
在主页上列出了不同的类别,您可以选择所需的一个开始splunking。

5.添加任务

我要加入一个例子为一个简单的任务,它被添加到 Splunk 系统。只是看到我的快照,以了解我将如何添加它。我的任务是将 /var/log文件夹添加到Splunk系统的监测。

1.打开Splunk Web界面,并在设置选项卡上单击 > > 选择添加数据选项

splunk5

2.在这里我们的任务是监视文件夹,所以我们继续监视。

splunk6
在监视器选项,有下图所示的四个类别:

文件与目录:监视文件/文件夹

HTTP事件收集器:监视通过HTTP的数据流

TCP/UDP:监视服务端口

脚本:监控脚本

3.根据我们的目的,我选择文件及目录选项。

splunk7

4.从需要监视的服务器选择确切的文件夹路径。
TP的数据流

TCP/UDP:监视服务端口

脚本:监控脚本

3.根据我们的目的,我选择文件及目录选项。

[外链图片转存中…(img-hQa4BxhU-1724185132701)]

4.从需要监视的服务器选择确切的文件夹路径。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值