Hi Juki,<br><br>As I understand it, you can either (1) 'hard-code' your NRPE checks in the nrpe.cfg file on the monitored host (so that the checks are explicitly defined), or (2) set up NRPE on the monitored host in such a way that you can pass arguments in your NRPE checks. It looks like you're landing somewhere between the two with your configuration.<br>
<br>I would either go the Option (1) way, having something like this in your nrpe.cfg file on the monitored host:<br><font face="tahoma,sans-serif"><i style="color: rgb(255, 0, 0);">command[check_root]=/usr/local/nagios/libexec/check_disk -w 30% -c 15% -p /<br>
</i></font><font face="tahoma,sans-serif"><i style="color: rgb(255, 0, 0);">command[check_var]=/usr/local/nagios/libexec/check_disk -w 30% -c 15%</i></font><font face="tahoma,sans-serif"><i style="color: rgb(255, 0, 0);"> -p /var<br>
</i></font><font face="tahoma,sans-serif"><i style="color: rgb(255, 0, 0);">command[check_server1]=/usr/local/nagios/libexec/check_disk -w 30% -c 15%</i></font><font face="tahoma,sans-serif"><i style="color: rgb(255, 0, 0);"> -p /var/opt/BGw/Server1<br>
</i></font><font face="tahoma,sans-serif"><i style="color: rgb(255, 0, 0);">command[check_ora]=/usr/local/nagios/libexec/check_disk -w 30% -c 15%</i></font><font face="tahoma,sans-serif"><i style="color: rgb(255, 0, 0);"> -p /var/opt/mediation/ora</i></font><br>
<br>, and then having services on the nagios host like this:<br><br><font face="tahoma,sans-serif"><span style="color: rgb(0, 0, 0);"><i style="color: rgb(255, 0, 0);">define service{<br>
        use                             generic-service         ; Name of service template to use<br>        host_name                       emm4<br>        service_description             Root Partition<br>        check_command                   check_nrpe!check_root<br>

        }</i></span></font><br><br>Alternatively, for the Option (2) method, on the monitored host, in nrpe.cfg:<br><br><font face="tahoma,sans-serif"><i style="color: rgb(255, 0, 0);">command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$</i></font><br>
<br>, and a service example on the nagios host:<br><br><font face="tahoma,sans-serif"><span style="color: rgb(0, 0, 0);"><i style="color: rgb(255, 0, 0);">define service{<br>
        use                             generic-service         ; Name of service template to use<br>        host_name                       emm4<br>        service_description             Root Partition<br>        check_command                   check_nrpe!check_disk!30!15!/<br>

        }</i></span></font><br><br>I may not have the syntax in the 'check_command' of that last service exactly right, but that's the general idea.<br><br>To go down the Option 2 road, you have to have configured the NRPE daemon on the monitored host with '--enable-command-args', and have to have a line in your nrpe.cfg file that says 'dont_blame_nrpe=1'. This is because allowing command arguments in this fashion can be a security risk. The default nrpe.cfg file has some comments that refer to this.<br>
<br>HTH,<br>Guy.<br><br><br><div class="gmail_quote">On Wed, Jul 15, 2009 at 7:24 AM, Juki <span dir="ltr"><<a href="mailto:juki.emma@gmail.com">juki.emma@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font face="tahoma,sans-serif">Hello again,<br><br>Thanks for the tips so far. Now some responses;<br><br>On the monitored host, I have setup nrpe.cfg and therein I have set the option "allowed_hosts=<IP of monitoring server>" and also revised the format as shown below;<br>

<br><br><i style="color: rgb(255, 0, 0);">#specific commands#<br>command[check_disk]=/usr/local/nagios/libexec/check_disk -w 30% -c 15% -p / -p /var -p /var/opt/BGw/Server1 -p /var/opt/mediation/ora <br>command[check_swap]= /usr/local/nagios/libexec/check_swap -a -w 10% -c 5%<br>

command[check_procs]=/usr/local/nagios/libexec/check_procs -w 300 -c 400<br>command[check_ssh]=/usr/local/nagios/libexec/check_ssh -4 -t 10 -p 22 localhost<br>command[check_ftp]=/usr/local/nagios/libexec/check_ftp -t 5<br>

<br></i><span style="color: rgb(0, 0, 0);">Then on the monitoring server, I have also setup the monitored host file (host.cfg) with the service description as follows;<br><br><i style="color: rgb(255, 0, 0);">define service{<br>

        use                             generic-service         ; Name of service template to use<br>        host_name                       emm4<br>        service_description             Root Partition<br>        check_command                   check_nrpe!check_disk!15%!10%!<br>

        }</i><br></span><i style="color: rgb(255, 0, 0);"><br></i><span style="color: rgb(0, 0, 0);">After setting up all this, I refreshed the nrpe client on the monitored host and also restarted the nagios service on the monitoring server, this is after I checked that there were no errors whatsoever in the nagios configuration files. </span></font><font style="color: rgb(0, 0, 0);" face="tahoma,sans-serif">And
yes, I logged into the monitored host as the nagios user and was able
to verify that the check_nrpe command definition does run successfully.</font><br style="color: rgb(0, 0, 0);"><font style="color: rgb(0, 0, 0);" face="tahoma,sans-serif"><br>When I log into the nagios web GUI, I'm able to see the alerts, warnings and details for the check_swap, check_procs, check_ssh and for check_ftp. For the case of check_disk, I only see alerts/warnings and details only for the root (/) partition and NOT those for the /var, </font><font style="color: rgb(0, 0, 0);" face="tahoma,sans-serif">/var/opt/BGw/Server, </font><font face="tahoma,sans-serif"><span style="color: rgb(0, 0, 0);">/var/opt/mediation/ora. This is despite the fact that these partitions are defined in the nrpe.cfg file on the monitored host as shown above.<br>

<br>This is still puzzling....</span><i style="color: rgb(255, 0, 0);"><br><br></i></font>
<br>------------------------------------------------------------------------------<br>
Enter the BlackBerry Developer Challenge<br>
This is your chance to win up to $100,000 in prizes! For a limited time,<br>
vendors submitting new applications to BlackBerry App World(TM) will have<br>
the opportunity to enter the BlackBerry Developer Challenge. See full prize<br>
details at: <a href="http://p.sf.net/sfu/Challenge" target="_blank">http://p.sf.net/sfu/Challenge</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>