Issue in configuring Nagios Appender
Jarlath Lyons
Jarlath.Lyons at Tideworks.com
Mon Mar 21 16:09:04 CET 2011
It appears the appender is correctly defined, but just not linked to the root logger ....
Try this ...
<root>
<level value="DEBUG" />
<appender-ref ref="CA" />
<appender-ref ref="FA" />
<appender-ref ref="NAGIOS-Connection Monitoring" />
</root>
Jar Lyons
Senior Software Engineer
Tideworks Technology, Inc.
(206) 344-3016
[cid:image001.gif at 01C8E1BC.4F6ACE00]
From: Anand, Sakshi [mailto:sa185043 at ncr.com]
Sent: Monday, March 21, 2011 5:14 AM
To: Nagios Users List
Subject: Re: [Nagios-users] Issue in configuring Nagios Appender
Plz help.
Regards,
Sakshi Anand
________________________________
From: Anand, Sakshi
Sent: Sunday, March 20, 2011 11:31 PM
To: Nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Issue in configuring Nagios Appender
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/20110321/a4b59856/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 8228 bytes
Desc: image001.png
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110321/a4b59856/attachment.png>
-------------- 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