How to verify rsyslog TCP communication with the server from the client side?

自作多情 提交于 2019-12-24 15:29:38

问题


I want to be able to know if all of the servers that I am logging to are properly receiving my TCP messages and answering back. I don't want to have to implement anything else on the server side, just want to monitor everything in the client machine.

I want to be able to do something like a ping test but valid for a rsyslog environment, using its protocols and ports.

I also know that there is a "debug" file but I believe its too much complicated to actually debug.


回答1:


impstats can give you counters on the amount of messages send, how many went OK, how many failed and so on. You can push this information to your monitoring tool of choice, here's how we do store impstats info in Elasticsearch: http://blog.sematext.com/2015/04/13/monitoring-rsyslogs-performance-with-impstats-and-elasticsearch/

Another option (you can also use it with impstats) is to use RELP instead of plain TCP. This does exactly what you want for each message: uses application-level acknowledgements to ensure the messages was received by the server. Though this will require you to use imrelp on the server and omrelp on the client, of course.



来源:https://stackoverflow.com/questions/33402096/how-to-verify-rsyslog-tcp-communication-with-the-server-from-the-client-side

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!