Issue in configuring Nagios Appender
Anand, Sakshi
sa185043 at ncr.com
Wed Mar 23 17:07:23 CET 2011
Lyons,
I do have access to the server too. However, I am not able to understand which line in the below file tells which encryption scheme needs to be used.
Please confirm.
Thanks & Regards,
Sakshi Anand
________________________________
From: Jarlath Lyons [mailto:Jarlath.Lyons at Tideworks.com]
Sent: Wednesday, March 23, 2011 8:46 PM
To: Nagios Users List
Subject: Re: [Nagios-users] Issue in configuring Nagios Appender
You need to make sure that you tell send_nsca to use the same encryption scheme that the server is using. Since you're the client, you don't control this .... The server will have it's own file specified .....
On my server .....
[root at jlyonslx test_harness]# cat /etc/xinetd.d/nsca
# default: on
# description: The nsca service can deliver nagios commands to the nagios server
service nsca
{
disable = no
flags = REUSE
port = 5667
socket_type = stream
protocol = tcp
wait = no
user = nagios
group = nagios
passenv = PATH
server = /usr/local/nagios/addons/nsca/nsca
# env = HOME=/usr/local/nagios
server_args = -c /usr/local/nagios/addons/nsca/nsca.cfg --inetd
# bind = 127.0.0.1
}
The simplest thing to do is copy the nsca.cfg file to anywhere you need it when running the client .....
Jar Lyons
Senior Software Engineer
Tideworks Technology, Inc.
(206) 344-3016
[cid:819560416 at 23032011-1FE3]
From: Anand, Sakshi [mailto:sa185043 at ncr.com]
Sent: Tuesday, March 22, 2011 9:35 PM
To: Nagios Users List
Subject: Re: [Nagios-users] Issue in configuring Nagios Appender
Thanks Again. It helped.
Now, I am stuck with following exception -
Received invalid packet type/version from client - possibly due to client using wrong password or crypto algorithm?
I am not using any password and the decryption_method is set to 0 in nsca.cfg file.
What can be the possible cause of the error then?
Thanks & Regards,
Sakshi Anand
________________________________
From: Jarlath Lyons [mailto:Jarlath.Lyons at Tideworks.com]
Sent: Tuesday, March 22, 2011 8:48 PM
To: Nagios Users List
Subject: Re: [Nagios-users] Issue in configuring Nagios Appender
Try shortening the name you are using, and at least remove the space between Connection and Monitoring.
Jar Lyons
Senior Software Engineer
Tideworks Technology, Inc.
(206) 344-3016
[cid:819560416 at 23032011-1FE3]
From: Anand, Sakshi [mailto:sa185043 at ncr.com]
Sent: Monday, March 21, 2011 11:13 PM
To: Nagios Users List
Subject: Re: [Nagios-users] Issue in configuring Nagios Appender
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:819560416 at 23032011-1FE3]
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/20110323/27d1a1e3/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/20110323/27d1a1e3/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