<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>You can do with ifportup also like this:</p>
    <p><a class="moz-txt-link-abbreviated" href="http://www.domain.com">www.domain.com</a>    60    IN    LUA    A "ifportup(443,
      {{'192.168.1.10'},{'192.168.2.20'}}, {timeout=5})"</p>
    <p>I suggested ifurlup because it will actually do http get request
      and verify if it responds with 200 OK message. A better health
      check for web servers.<br>
    </p>
    <div class="moz-cite-prefix">Regards<br>
      <b>Jahanzeb Arshad</b><br>
      <br>
    </div>
    <div class="moz-cite-prefix">On 20/9/22 21:18, Adrian Minta via
      Pdns-users wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:71850d69-7b1d-954b-0485-fb262ceb0097@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Thank you !</p>
      <p> I wasted 4 hours looking for a valid combination :(</p>
      <p>Is this not possible with ifportup ?<br>
      </p>
      <p><br>
      </p>
      <div class="moz-cite-prefix">On 9/20/22 15:37, Jahanzeb Arshad via
        Pdns-users wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:ecfdc96f-1624-b3b9-41d4-1461d1ada14a@nayatel.com">
        <meta http-equiv="Content-Type" content="text/html;
          charset=UTF-8">
        <p><font face="Helvetica, Arial, sans-serif">Hi,</font></p>
        <p>If its a web server I would suggest using url check instead
          of port check like below:</p>
        <p><a class="moz-txt-link-abbreviated"
            href="http://www.domain.com" moz-do-not-send="true">www.domain.com</a>   
          60    IN    LUA    A "ifurlup('<a
            class="moz-txt-link-freetext" href="https://www.domain.com"
            moz-do-not-send="true">https://www.domain.com</a>',
          {{'192.168.1.10'},{'192.168.2.20'}}, {timeout=5})"<br>
          <br>
        </p>
        <div class="moz-cite-prefix">Regards<br>
          <b>Jahanzeb Arshad</b><br>
          <br>
        </div>
        <div class="moz-cite-prefix">On 20/9/22 17:25, Adrian M via
          Pdns-users wrote:<br>
        </div>
        <blockquote type="cite"
cite="mid:CALNsb6s0_0trSQZnc7KKhY2LZjWvqFCo9k+rYbd5iqiK6rcevA@mail.gmail.com">
          <meta http-equiv="content-type" content="text/html;
            charset=UTF-8">
          <div dir="ltr">Hi,<br>
            I'm attempting to implement a simple fail-over mechanism
            between two web servers but I'm not able to find the right
            syntax.<br>
            <br>
            www  LUA     A          (";if ifportup(443,
            {'192.168.0.10'}) then "<br>
                                               "      return
            '192.168.0.10'              "<br>
                                               "else                    
                            "<br>
                                               "      return '10.0.0.10'
                            "<br>
                                               "end                    
                             ")<br>
            <div><br>
            </div>
            <div>Any suggestions are welcome !</div>
          </div>
          <br>
          <fieldset class="moz-mime-attachment-header"></fieldset>
          <pre class="moz-quote-pre" wrap="">_______________________________________________
Pdns-users mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:Pdns-users@mailman.powerdns.com" moz-do-not-send="true">Pdns-users@mailman.powerdns.com</a>
<a class="moz-txt-link-freetext" href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" moz-do-not-send="true">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a>
</pre>
        </blockquote>
        <br>
        <fieldset class="moz-mime-attachment-header"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
Pdns-users mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:Pdns-users@mailman.powerdns.com" moz-do-not-send="true">Pdns-users@mailman.powerdns.com</a>
<a class="moz-txt-link-freetext" href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" moz-do-not-send="true">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a>
</pre>
      </blockquote>
      <pre class="moz-signature" cols="72">-- 
Best regards,
Adrian Minta


</pre>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Pdns-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pdns-users@mailman.powerdns.com">Pdns-users@mailman.powerdns.com</a>
<a class="moz-txt-link-freetext" href="https://mailman.powerdns.com/mailman/listinfo/pdns-users">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a>
</pre>
    </blockquote>
  </body>
</html>