<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>CHECK_NRPE: No output returned with check_iptables.sh script</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi there --</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I am running the check_iptables.sh script on one of our clients, and while the script presents output whenever it is</FONT>
<BR><FONT SIZE=2 FACE="Arial">manually run on the server with the firewall, this output is not being transmitted to the Nagios server. The error message </FONT></P>
<P><FONT SIZE=2 FACE="Arial">that I am encountering is the following:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">CHECK_NRPE: No output returned from daemon. </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">The check_iptables.sh script is located in the /usr/local/nagios/libxec directory, and has been added as a definition to </FONT></P>
<P><FONT SIZE=2 FACE="Arial">the /usr/local/nagios/etc/commands.cfg file with the syntax shown below:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"># 'check_iptables.sh' command definition</FONT>
<BR><FONT SIZE=2 FACE="Arial">define command{</FONT>
<BR><FONT SIZE=2 FACE="Arial"> command_name check_iptables</FONT>
<BR><FONT SIZE=2 FACE="Arial"> command_line /usr/local/nagios/libexec/check_iptables.sh</FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">The definition for check on the Nagios server has been added to the /usr/local/nagios/etc/objects/services.cfg file</FONT>
<BR><FONT SIZE=2 FACE="Arial">with the following:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"># Service definition</FONT>
<BR><FONT SIZE=2 FACE="Arial">define service{</FONT>
<BR><FONT SIZE=2 FACE="Arial"> use generic-service ; Name of service template to use</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"> host_name <hostame></FONT>
<BR><FONT SIZE=2 FACE="Arial"> service_description Check IP Tables</FONT>
<BR><FONT SIZE=2 FACE="Arial"> is_volatile 0</FONT>
<BR><FONT SIZE=2 FACE="Arial"> check_period workhours</FONT>
<BR><FONT SIZE=2 FACE="Arial"> max_check_attempts 4</FONT>
<BR><FONT SIZE=2 FACE="Arial"> normal_check_interval 5</FONT>
<BR><FONT SIZE=2 FACE="Arial"> retry_check_interval 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> contact_groups linux-admins</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notification_interval 960</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notification_period workhours</FONT>
<BR><FONT SIZE=2 FACE="Arial"> check_command check_nrpe!check_iptables</FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">The check_iptables.sh script has been added to the /usr/local/nrpe/libexec directory on the client, and the definition</FONT>
<BR><FONT SIZE=2 FACE="Arial">of the check shown below is included in the client's nrpe.cfg file:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">command[check_iptables]=/usr/local/nrpe/libexec/check_iptables.sh</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">The client system is situated outside the company filewall in a DMZ, and connections are made through the firewall</FONT>
<BR><FONT SIZE=2 FACE="Arial">via an SSH connection. There are several other services that are monitored by the Nagios server, and the output from</FONT>
<BR><FONT SIZE=2 FACE="Arial">their respective chceks are getting through to the Nagios server.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">The NRPE client is version 2.6, while the Nagios server is running the 3.1.2 release. I checked the nagios.log and </FONT>
<BR><FONT SIZE=2 FACE="Arial">messages log files, but I did not see any errors relating to the script. What other step(s) do I need to take in order </FONT>
<BR><FONT SIZE=2 FACE="Arial">for the output that is generated on the client be transmitted to the server? Thanks.</FONT>
</P>
<font face="monospace"><br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
http://www.partners.org/complianceline . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.</font></BODY>
</HTML>