Issue in configuring Nagios Appender

Anand, Sakshi sa185043 at ncr.com
Sun Mar 20 19:01:26 CET 2011


All,

I am trying to configure nagios appender for one of my applications which is using log4j to log data. Also, my NSCA configuration is running fine.

However, I am not able to send checks from the application using nagios appender.

Following is what my log4j.xml looks like (it is successfully writing to console and to log file too) -


<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>

<appender name="CA" class="org.apache.log4j.ConsoleAppender">

<layout class="org.apache.log4j.PatternLayout">

<param name="ConversionPattern" value="%-4r [%t] %-5p %c %x - %m%n" />

</layout>

</appender>

<appender name="FA" class="org.apache.log4j.FileAppender">

<param name="File" value="C:\\eclipse\\workspace2\\NSCA-PassiveChecks\\nagiosAppenderDemo\\Log4jDemo.log"/>

<layout class="org.apache.log4j.PatternLayout">

<param name="ConversionPattern" value="%-4r [%t] %-5p %c %x - %m%n" />

</layout>

</appender>

<appender class="org.apache.log4j.nagios.NagiosAppender" name="NAGIOS-Connection Monitoring">

<param name="Host" value="rpc1934.daytonoh.ncr.com"/>

<param name="Port" value="5667"/>

<param name="ServiceNameDefault" value="uContainer"/>

<param name="useMDCServiceName" value="false"/>

<param name="useMDCHostName" value="false"/>

<param name="useShortHostName" value="false"/>

<param name="Log4j_Level_ERROR" value="NAGIOS_CRITICAL"/>

<param name="Log4j_Level_FATAL" value="NAGIOS_CRITICAL"/>

<param name="ExcludeFilterEnabled" value="true"/>

<param name="PatternFilterFile" value="NagiosIncludeExcludeFilters.properties"/>

<param name="SendStartupMessageOK" value="Application Errors Cleared"/>

<layout class="org.apache.log4j.PatternLayout">

<param name="ConversionPattern" value="server: %X{Connection Monitoring}: %m%n"/>

</layout>

</appender>

<root>

<level value="DEBUG" />

<appender-ref ref="CA" />

<appender-ref ref="FA" />

</root>

</log4j:configuration>



Please help me in finding the issue and a way to debug it.



Thanks & Regards,

Sakshi Anand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110320/1e2e7cef/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list