Issue in configuring Nagios Appender
Anand, Sakshi
sa185043 at ncr.com
Tue Mar 22 07:13:12 CET 2011
Thanks Lyons.
Now, after adding the appender-ref, I am getting following exception -
log4j:ERROR Parsing error on line 18 and column 94
log4j:ERROR Attribute value "NAGIOS-Connection Monitoring" of type ID must be a name.
log4j:ERROR Parsing error on line 47 and column 54
log4j:ERROR Attribute value "NAGIOS-Connection Monitoring" of type IDREF must be a name.
Does anyone have any idea about reason of this error.
Thanks & Regards,
Sakshi Anand
________________________________
From: Jarlath Lyons [mailto:Jarlath.Lyons at Tideworks.com]
Sent: Monday, March 21, 2011 8:39 PM
To: Nagios Users List
Subject: Re: [Nagios-users] Issue in configuring Nagios Appender
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:461451106 at 22032011-1FC0]
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/20110322/c2e8a8eb/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/20110322/c2e8a8eb/attachment.png>
-------------- next part --------------
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
-------------- 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