1


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.

CodCad
  • 13
  • 2
  • Sorry your questions is unclear to me, but in general SNMP isn't really a good fit for log files... it's a UDP protocol which isn't really designed for bulk data transfer and doesn't support compression. Perhaps you can log to a database? – Matt Coubrough May 31 '14 at 11:23
  • unclear what you are asking – Govind Singh May 31 '14 at 11:37
  • 1
    Centralizing log files is a large topic. You might utilize SNMP to do portion of the tasks, but SNMP obviously won't give you all. – Lex Li Jun 01 '14 at 01:24
  • We used to do this years ago, where various real-time processes would generate SNMP traps at regular rates (1 per min) to be collected by operations terminals. You could configure the Operations terminals to look at various statistics (messages / sec), queue depths, etc., although I'm not sure anyone does it anymore. There were issues from what I remember traversing lan segments and firewalls, etc.. I think newer tools like log4j can be setup in a distributed manner for true logging. Statistics gathering might still be a good fit for SNMP though, depends on your requirements. – Mike Jun 04 '14 at 14:17

1 Answers1

0

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.

Jolta
  • 2,620
  • 1
  • 29
  • 42