<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]><style id=owaTempEditStyle>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">It appears the appender is correctly defined, but just not linked to the root logger ….<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Try this …<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><root>
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><level value="DEBUG" />
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><appender-ref ref="CA" />
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><appender-ref ref="FA" /><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><appender-ref ref="NAGIOS-Connection Monitoring" /><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"></root>
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Jar Lyons<br>
Senior Software Engineer<br>
Tideworks Technology, Inc.<br>
(206) 344-3016 <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><img width="200" height="51" id="Picture_x0020_1" src="cid:image001.png@01CBE79F.38BC6C40" alt="cid:image001.gif@01C8E1BC.4F6ACE00"></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Anand, Sakshi [mailto:sa185043@ncr.com]
<br>
<b>Sent:</b> Monday, March 21, 2011 5:14 AM<br>
<b>To:</b> Nagios Users List<br>
<b>Subject:</b> Re: [Nagios-users] Issue in configuring Nagios Appender<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">Plz help.</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">Regards,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">Sakshi Anand</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Anand, Sakshi
<br>
<b>Sent:</b> Sunday, March 20, 2011 11:31 PM<br>
<b>To:</b> Nagios-users@lists.sourceforge.net<br>
<b>Subject:</b> [Nagios-users] Issue in configuring Nagios Appender</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">All,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">However, I am not able to send checks from the application using nagios appender.
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">Following is what my log4j.xml looks like (it is successfully writing to console and to log file too) -
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"> <o:p></o:p></span></p>
</div>
<div>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><?xml version="1.0" encoding="UTF-8" ?>
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><appender name="CA" class="org.apache.log4j.ConsoleAppender">
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><layout class="org.apache.log4j.PatternLayout">
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="ConversionPattern" value="%-4r [%t] %-5p %c %x - %m%n" />
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"></layout>
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"></appender>
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><appender name="FA" class="org.apache.log4j.FileAppender">
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="File" value="C:\\eclipse\\workspace2\\NSCA-PassiveChecks\\nagiosAppenderDemo\\Log4jDemo.log"/>
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><layout class="org.apache.log4j.PatternLayout">
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="ConversionPattern" value="%-4r [%t] %-5p %c %x - %m%n" />
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"></layout>
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"></appender><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><appender class="org.apache.log4j.nagios.NagiosAppender" name="NAGIOS-Connection Monitoring"><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="Host" value="rpc1934.daytonoh.ncr.com"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="Port" value="5667"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="ServiceNameDefault" value="uContainer"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="useMDCServiceName" value="false"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="useMDCHostName" value="false"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="useShortHostName" value="false"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="Log4j_Level_ERROR" value="NAGIOS_CRITICAL"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="Log4j_Level_FATAL" value="NAGIOS_CRITICAL"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="ExcludeFilterEnabled" value="true"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="PatternFilterFile" value="NagiosIncludeExcludeFilters.properties"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="SendStartupMessageOK" value="Application Errors Cleared"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><layout class="org.apache.log4j.PatternLayout"><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><param name="ConversionPattern" value="server: %X{Connection Monitoring}: %m%n"/><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"></layout>
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"></appender><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><root>
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><level value="DEBUG" />
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><appender-ref ref="CA" />
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"><appender-ref ref="FA" /><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"></root>
<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"></log4j:configuration><o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"> <o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">Please help me in finding the issue and a way to debug it.<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black"> <o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">Thanks & Regards,<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black">Sakshi Anand<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>