在Windows上的Flume中通过控制台监视文件
我正试图将Windows上的Flume用作课堂作业,我首先在Ubuntu上进行了练习,但没有任何问题。 在Windows上,我已经安装了Coreutils在Windows上使用Linux命令。 代理可以运行,但陷入了EXEC源,然后检查执行文件是否已更新。 我使用以下代码: 它正在显示c:/logs/log..txt中的文件的内容,并在CMD中显示。
Ag_Monitor.sources = s1
Ag_Monitor.sinks = k1
Ag_Monitor.channels = c1
Ag_Monitor.sources.s1.type = exec
Ag_Monitor.sources.s1.command = tail -F C:\logs\log.txt
Ag_Monitor.sources.s1.shell = cmd.exe /c
Ag_Monitor.sources.s1.channels = c1
Ag_Monitor.sinks.k1.type = logger
Ag_Monitor.sinks.k1.channel = c1
Ag_Monitor.channels.c1.type = memory
除了执行尾部命令外,我还上传了问题的图像,因为它指示了另一个目录。
我使用PowerShell修改了文件: get -content c:\ logs \ log.txt -tail 10 powershell.exe /c
I'm trying to use flume on Windows as a class assignment, I did the exercise first on Ubuntu and I didn't have any problems.
On windows I have installed coreutils to use linux commands on windows.
The agent gets to run but gets stuck at Exec source started and then checks to see if the execute file has been updated.
I use the following code:
It is displaying the content of a file inside C:/logs/log.txt and displays it in cmd.
Ag_Monitor.sources = s1
Ag_Monitor.sinks = k1
Ag_Monitor.channels = c1
Ag_Monitor.sources.s1.type = exec
Ag_Monitor.sources.s1.command = tail -F C:\logs\log.txt
Ag_Monitor.sources.s1.shell = cmd.exe /c
Ag_Monitor.sources.s1.channels = c1
Ag_Monitor.sinks.k1.type = logger
Ag_Monitor.sinks.k1.channel = c1
Ag_Monitor.channels.c1.type = memory
I upload an image of the problem in addition to executing the tail command incorrectly since it indicates another directory.
I have used powershell modifying the file with :
Get-Content C:\logs\log.txt -Tail 10
powershell.exe /c
I have the following result:
has executed it well but it does not appear on the screen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论