I haven't installed anything on the webservers (yet), but I do wish to via snmp do load, cpu, etc. or if there is a better way like a client daemon, feel free to let me know. I am still reading/understanding what each is used for (service.cfg, commands.cfg, etc.) but I have the following all for that check;<br>
<br>services.cfg<br>define service {<br>        service_description             check_s1<br>        use                             generic-service<br>        hostgroup_name                  s1_WebServers<br>        check_command                   check_s1!3!5<br>
}<br><br>check_commands.cfg<br>define command {<br>        command_name                    check_s1<br>        command_line                    $USER1$/check_http -H <a href="http://www.site1.com">www.site1.com</a> -w "$ARG1$" -c "$ARG2$"<br>
}<br><br>command.cfg has;<br>command[check_s1]=/usr/local/groundwork/nagios/libexec/check_http -H <a href="http://www.site1.com">www.site1.com</a> -I $HOSTADDRESS$<br><br>As for where the local command was run, yes it was local to the groundwork (nagios) server from the following location;<br>
<br>root@groundwork:/usr/local/groundwork/nagios/libexec/check_http -H <a href="http://www.site1.com">www.site1.com</a> -I 192.168.50.101<br>HTTP OK HTTP/1.1 200 OK - 14351 bytes in 0.249 seconds |time=0.249456s;;;0.000000 size=14351B;;;0<br>
<br>I am not sure what the NRPE plugin is but just looking at the options, it looks like it's run on the client as there is no spot for IP, when run local it simply says connection refused by host for the <a href="http://site1.com">site1.com</a> domain.<br>
<br>Thanks.<br><br><div class="gmail_quote">On Thu, Oct 22, 2009 at 4:59 AM, Martin Melin <span dir="ltr"><<a href="mailto:mmelin@gmail.com">mmelin@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;">
Hi,<div><br></div><div>Where did you define the check_s1 command? On which host? It looks like an NRPE config so is this on one of the web servers or on your Nagios host?</div><div><br></div><div>Where did you try running the command from the shell? On the Nagios host or the web server?</div>

<div><br></div><div>Please show the command definition from Nagios for check_s1 as well.</div><div><br></div><div>Make sure that you've edited the correct NRPE config file, reloaded nrped if you're not using inetd. To check that the check works from the command line, run the check_nrpe command from Nagios, not check_http from Nagios or the webserver.</div>

<div><br></div><div>Regards,</div><div>Martin Melin</div><div><br><div class="gmail_quote"><div><div></div><div class="h5">On Thu, Oct 22, 2009 at 3:32 AM, lance raymond <span dir="ltr"><<a href="mailto:lance.raymond@gmail.com" target="_blank">lance.raymond@gmail.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">Hi all, well I am running GroundWork open source and really happy with the layout, etc. and now comes the nagios things.  My goal is to setup things neatly, organized and learn as I go rather than asking stupid q's along the way.  So with that, the 1st task;<br>


<br>I have 8 webservers all host numerous sites, a few host only select.  So I have created some hostgroups, adding the servers that belong to each, and wonderfully it works.  I can select a server, see the group, click the group, see the servers (did I mention I'm good)  :)<br>


<br>Anyway, I want to setup 2 seperate checks one for each website, then associate them with the groups, so for example;<br>ws1 (site1, site2)<br>ws2 (site1)<br>ws3 (site1, site2)<br>ws4 (site2)<br><br>Pretty simple.  So I copied the check_http command where I saw it used and have the following;<br>


<br>command[check_http]=/usr/local/groundwork/nagios/libexec/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$<br>command[check_s1]=/usr/local/groundwork/nagios/libexec/check_http -H <a href="http://www.site1.com" target="_blank">www.site1.com</a> -I $HOSTADDRESS$<br>


command[check_s2]=/usr/local/groundwork/nagios/libexec/check_http -H <a href="http://www.site2.com" target="_blank">www.site2.com</a> -I $HOSTADDRESS$<br><br>The services.cfg has the following (will only show 1 for space)<br>

<br>define service {<br>
        service_description      check_s1<br>        use                            generic-service<br>        hostgroup_name         s1_WebServers<br>        check_command        check_s1!3!5<br>}<br><br>Now after the above setup and a restart, I have happy to see the check_s1 listed but it's showing critical with the following error;<br>


CRITICAL - Socket timeout after 10 seconds <br><br>At the command line check it does work;<br> ./check_http -H <a href="http://www.site1.com" target="_blank">www.site1.com</a> -I 192.168.50.101<br>HTTP OK HTTP/1.1 200 OK - 14398 bytes in 0.090 seconds |time=0.089949s;;;0.000000 size=14398B;;;0<br>


<br>I am looking through where people are increasing the timeout, but the response time is not even a second, so there must be something else I am missing.  So I am looking forward to learning more, welcome any ideas, suggestions, or anything else I should know about using nagios under groundwork.<br>


<br>This is running under ubuntu-8.10 server, Program Version:3.0.6, let me know what else I can or need to provide on this.<br><br>
<br></div></div>------------------------------------------------------------------------------<br>
Come build with us! The BlackBerry(R) Developer Conference in SF, CA<br>
is the only developer event you need to attend this year. Jumpstart your<br>
developing skills, take BlackBerry mobile applications to market and stay<br>
ahead of the curve. Join us from November 9 - 12, 2009. Register now!<br>
<a href="http://p.sf.net/sfu/devconference" target="_blank">http://p.sf.net/sfu/devconference</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">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></div>
<br>------------------------------------------------------------------------------<br>
Come build with us! The BlackBerry(R) Developer Conference in SF, CA<br>
is the only developer event you need to attend this year. Jumpstart your<br>
developing skills, take BlackBerry mobile applications to market and stay<br>
ahead of the curve. Join us from November 9 - 12, 2009. Register now!<br>
<a href="http://p.sf.net/sfu/devconference" target="_blank">http://p.sf.net/sfu/devconference</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>