This project encompasses a custom appender for log4j, intended for system administrators and/or developers interested in using the log4j architecture to push messages to Nagios, via the Nagios nsca server. Release 1.5.0 contains a class (Nsca.java) that
Be the first to post a text review of NagiosAppender. Rate and review a project by clicking thumbs up or thumbs down in the right column.
- Fixed a bug associated with using the MDC facility for defining the HOST attribute for the nagios alert. The bug manifests itself as a stack trace in the console like ... log4j:ERROR MDC lookup for hostname failed ... key = nagios_host_name java.lang.Exception: MDC lookup for hostname failed ... key = nagios_host_name at org.apache.log4j.nagios.NagiosAppender.getHostName(NagiosAppender.java:1420) Also, the alert that gets delivered to Nagios was arriving with HOST = 'NOT_SET' This bug had to do with the indeterminant order in which the bean attributes are called, so you may or may not have experienced the problem if you are currently using this facility. - Changed layout requirement from false to true. Since layouts are not optional (at least with properties based configurations), we need to set this to true to support MDC in layouts.
1.5.0 Added a new class which provides the equivalent API of the nsca_send.c program without the dependence on log4j (Nsca.java) Nsca nsca = new Nsca(); nsca.setConfigFile("conf/nsca_send_clear.cfg"); nsca.send_nsca("localhost", "5667", "production", "MyApplication", "something bad just happened", 1, 0); System.out.println("send complete!!");
Nsca.java allows clients to send messages directly to the nsca server without any dependence on Log4j
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?
Thanks for your review!
Get credit for your review by logging in via OpenID. Click your account provider: