我怎样才能configuration日志作为数据源从远程UNIX服务器splunk?

我怎样才能configuration远程unix服务器上的日志文件splunk?

通常我login到腻子到一个Linux服务器,从那里我SSH到另一个公司的服务器,我浏览目录,并执行我的操作主要是catzcat等与grepfilter。 例如:

  1. 用puttylogin到example_server
  2. ssh到ssh_server
  3. CD请求目录
  4. 执行猫等,

ssh_server不会直接允许从puttylogin,我必须先login到example_server,然后login到ssh_server。

我如何configuration这些日志文件被splunk用来search一个string,与我如何使用grep类似。 我已经在我的笔记本电脑上安装了splunk,并通过单击add data > filesdir > add new它显示数据字段的完整path,我应该填充什么path?

  1) I can't do any modification to server(have no rights), so i couldn't use splunk universal forwarder 2)There's no way i can open port to write to and make splunk listen to it, as i said my higher-ups won't allow, if something goes wrong, it will cost my job if there's anyway i can write to port securely ,that might help. 3) I can run shell scripts FYI 4)It will help if anyone suggest how i can securely connect to log servers, download data files(not manually) a python script or .bat file, and will use this local directory in splunk :) 

假设您已经在某处设置了Splunk实例,则可以通过多种方法将日志数据转发到中央位置。

首先最简单的方法是将系统日志消息发送到远程日志服务器。 这只适用于具有必要的权限和权限的情况下,并且可以将所需的日志写入系统日志。

如果您有安装权限,则可以在远程盒子上设置Splunk转发器实例。 这在Linux,Unix和Windows上可能更多。

还有其他工具可用于转发日志,包括Epilog和转发系统日志。

无法在服务器上安装任何东西我已经设置了脚本来有效地尾部输出文件,并将结果转储到对Splunk服务器打开的TCP或UDP连接。

编辑 – 因为你回应说你没有权利安装到这个盒子,你可以看看通过SSH复制你的文件,并将副本的目标文件夹添加到你的Splunk索引。 安排这个工作通过cron执行。 这并不理想 – 它允许在您的日志被发送之前进行一定程度的篡改 – 但它是function性的。

编辑 – 在你的情况下,我会build议使用NC命令,如果你有它可用。 这是日志的无安装监视的好方法。

 tail /your/log/file -f | nc <your.server.ip.addr> <yourport> 

使用Linux系统和大多数日志pipe理解决scheme,您只需修改Linux服务器上的syslog或rsyslogconfiguration,将所有数据发送到日志logging服务器。

sudo vi /etc/syslog.conf @XXXX sudo / sbin / service syslog restart

具有此configuration将通过端口514将所有日志发送到您设置的Splunk日志logging服务器。 您只需确保已设置Splunk以允许入站stream量。 大多数情况下,这是通过设置允许X IP将stream量发送到机器的各种主机来完成的。

其他日志logging实现(如OSSEC)允许您在计算机上安装代理,因此您不必修改系统日志。