Search code examples
javasnmplogfilesnmp4j

centralized log files with snmp protocol



i was wondering if the SNMP protocol can help me to developpe java application to centralized log files of local network. i m not trying to monitoring the network devices,i just want to centralized the log files and analyse theme.


Solution

  • Probably not.

    You'd have to first convert the log entries on each machine into SNMP traps, and then have some system gathering the traps and putting them in a file (i.e. converting them back into a log).

    You'd be better off using a protocol designed for this usage, like syslog. If you set up a log server using a freely available application like rsyslog or syslog-ng, you can then develop your distributed Java application using a syslog library like Syslog4j. Each application instance could then log to the same syslog server. Individual servers running Linux or other Unixes can then also send their system log to the same log server.