<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 3/17/2012 6:11 PM, Joe Vitti wrote:
    <blockquote
      cite="mid:27726BE2-3CE1-4AC8-BD62-A1AAB86058ED@gcinfotech.com"
      type="cite">This should be possible.
      <div><br>
      </div>
      <div>You setup the nagios server as a host with a service for
        check_dhcp in the nagios config. This will make it monitor
        itself. You might need the nrpe client setup as well.<br>
      </div>
    </blockquote>
    <br>
    I am using NRPE client, but only for checks that need to be run on
    remote servers like check_load.  For network protocols like DNS and
    DHCP, you can just generate the test packets straight from the
    Nagios server and test it like a real client!  Here's the command I
    have Nagios running:<br>
    <br>
    /usr/bin/sudo /usr/lib/nagios/plugins/check_dhcp -s 192.168.1.5 -s
    192.168.1.7 -i eth0<br>
    <br>
    On the Nagios server, it returns this:<br>
    <br>
    WARNING: Received 1 DHCPOFFER(s), only 1 of 2 requested servers
    responded, max lease time = 1800 sec.<br>
    <br>
    But on a third-party server that doesn't run DHCP, I get this:<br>
    <br>
    OK: Received 2 DHCPOFFER(s), 2 of 2 requested servers responded, max
    lease time = 1800 sec.<br>
    <br>
    I'd prefer to have the Nagios server run the test and generate the
    packets directly rather than rely on a third-party to be up and do
    the test for Nagios.<br>
    <br>
    <blockquote
      cite="mid:27726BE2-3CE1-4AC8-BD62-A1AAB86058ED@gcinfotech.com"
      type="cite">
      <div>
        <div apple-content-edited="true">
          <span class="Apple-style-span" style="border-collapse:
            separate; color: rgb(0, 0, 0); font-family: Helvetica;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
            -webkit-border-vertical-spacing: 0px;
            -webkit-text-decorations-in-effect: none;
            -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
            0px; font-size: medium; "><span class="Apple-style-span"
              style="border-collapse: separate; color: rgb(0, 0, 0);
              font-family: Helvetica; font-style: normal; font-variant:
              normal; font-weight: normal; letter-spacing: normal;
              line-height: normal; orphans: 2; text-align: -webkit-auto;
              text-indent: 0px; text-transform: none; white-space:
              normal; widows: 2; word-spacing: 0px;
              -webkit-border-horizontal-spacing: 0px;
              -webkit-border-vertical-spacing: 0px;
              -webkit-text-decorations-in-effect: none;
              -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
              0px; font-size: medium; ">
              <div style="word-wrap: break-word; -webkit-nbsp-mode:
                space; -webkit-line-break: after-white-space; "><span
                  class="Apple-style-span" style="border-collapse:
                  separate; color: rgb(0, 0, 0); font-family: Helvetica;
                  font-style: normal; font-variant: normal; font-weight:
                  normal; letter-spacing: normal; line-height: normal;
                  orphans: 2; text-align: -webkit-auto; text-indent:
                  0px; text-transform: none; white-space: normal;
                  widows: 2; word-spacing: 0px;
                  -webkit-border-horizontal-spacing: 0px;
                  -webkit-border-vertical-spacing: 0px;
                  -webkit-text-decorations-in-effect: none;
                  -webkit-text-size-adjust: auto;
                  -webkit-text-stroke-width: 0px; font-size: medium; ">
                  <div style="word-wrap: break-word; -webkit-nbsp-mode:
                    space; -webkit-line-break: after-white-space; "><span
                      class="Apple-style-span" style="color: rgb(125,
                      133, 243); font-family: Verdana; font-size: 10px;
                      ">_______________________________________________________________</span>
                    <div style="margin-top: 0px; margin-right: 0px;
                      margin-bottom: 0px; margin-left: 0px; color:
                      rgb(125, 133, 243); font-family: Verdana; "><font
                        class="Apple-style-span" color="#7F7F7F"><font
                          class="Apple-style-span" size="3"><span
                            class="Apple-style-span" style="font-size:
                            11px; ">Joe Vitti</span></font></font></div>
                    <div style="margin-top: 0px; margin-right: 0px;
                      margin-bottom: 0px; margin-left: 0px; color:
                      rgb(125, 133, 243); font-family: Verdana; "><font
                        class="Apple-style-span" color="#7F7F7F"
                        face="Verdana"><font class="Apple-style-span"
                          size="3"><span class="Apple-style-span"
                            style="font-size: 11px; ">Network and
                            Systems Administrator</span></font></font></div>
                    <div style="margin-top: 0px; margin-right: 0px;
                      margin-bottom: 0px; margin-left: 0px; color:
                      rgb(125, 133, 243); font-family: Verdana; "><font
                        style="font: normal normal normal 11px/normal
                        Verdana; color: rgb(127, 127, 127); "
                        color="#7f7f7f" face="Verdana">GCInfotech | 2009
                        Summer Street | </font><span
                        class="Apple-style-span" style="color: rgb(127,
                        127, 127); "><font class="Apple-style-span"
                          size="3"><span class="Apple-style-span"
                            style="font-size: 11px; ">Suite 302 |
                            Stamford, CT 06905</span></font></span></div>
                    <div style="color: rgb(125, 133, 243); font-family:
                      Verdana; "><font style="font: normal normal normal
                        11px/normal Verdana; color: rgb(128, 128, 128);
                        " color="#808080" face="Verdana">p: 203.463.7209
                        | e: <a moz-do-not-send="true"
                          href="mailto:jvitti@gcinfotech.com">jvitti@gcinfotech.com</a></font></div>
                  </div>
                </span></div>
            </span></span>
        </div>
        <br>
        <div>
          <div>On Mar 17, 2012, at 9:07 PM, Loren M. Lang wrote:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">
            <div>I am using a Nagios plug-in called check_dhcp to
              monitor both my DHCP servers.  It works by broadcasting a
              DHCPDISCOVER message and monitoring any DHCPOFFERs.  It
              reports back a Warning status if not all DHCP servers
              respond and a Critical status if no one responds.  The
              problem I am having is that the Nagios server is running
              on the same hardware as one of the DHCP servers and it
              does not seem to respond to the DHCPDISCOVER.  I can
              successfully run the plug-in on a separate computer to get
              it to respond, but I'd like to test it from the same
              server running all the Nagios checks.  Is it possible to
              send a DHCPDISCOVER to the daemon running on the same
              computer without using a separate network card tied to the
              network?<br>
              <br>
              -- <br>
              Loren M. Lang<br>
              <a moz-do-not-send="true"
                href="mailto:lorenl@north-winds.org">lorenl@north-winds.org</a><br>
              <a class="moz-txt-link-freetext" href="http://www.north-winds.org/">http://www.north-winds.org/</a><br>
              <br>
              <br>
              Public Key:
              <a class="moz-txt-link-freetext" href="ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc">ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc</a><br>
              Fingerprint: 10A0 7AE2 DAF5 4780 888A  3FA4 DCEE BB39 7654
              DE5B<br>
              <br>
              _______________________________________________<br>
              dhcp-users mailing list<br>
              <a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
              <a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
dhcp-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Loren M. Lang
<a class="moz-txt-link-abbreviated" href="mailto:lorenl@north-winds.org">lorenl@north-winds.org</a>
<a class="moz-txt-link-freetext" href="http://www.north-winds.org/">http://www.north-winds.org/</a>


Public Key: <a class="moz-txt-link-freetext" href="ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc">ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc</a>
Fingerprint: 10A0 7AE2 DAF5 4780 888A  3FA4 DCEE BB39 7654 DE5B
</pre>
  </body>
</html>