-1

I am looking for a easy way to check application logs on multiple servers. How can I search for error string in multiple Linux application servers remotely?

e.g.

Need to search a string pattern in application log, this application deployed on multiple Linux boxes. Each server nodes storing logs in each node itself and not in NAS.

Could you please share the best way to achieve this? I tried SSH and it is asking me to enter password for each node. I am looking for single program (shell, perl etc) can connect to each boxes and grep my patter and return results.

4

1 回答 1

1

你可以使用类似ansible的东西。使用密钥身份验证进行设置并将主机添加到配置文件后,您可以执行以下操作:

ansible -m shell -a "cat /var/log/messages|grep -i 错误"

它有大量的选项和模块,使用起来超级简单。

于 2013-03-01T01:06:46.867 回答