问题
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