<div dir="ltr"><div><font face="Helvetica, Arial, sans-serif">ifurlup it is.</font></div><div><font face="Helvetica, Arial, sans-serif">Thank you for your help !<br></font></div><div><font face="Helvetica, Arial, sans-serif"><br></font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 21, 2022 at 7:53 AM Jahanzeb Arshad via Pdns-users <<a href="mailto:pdns-users@mailman.powerdns.com">pdns-users@mailman.powerdns.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p><font face="Helvetica, Arial, sans-serif">Hmmm my mistake. I
        assumed that the syntax for addresses for ifportup should be the
        same for ifurlup. Checked on my server with version 4.6.3 and
        its also giving me error.</font></p>
    <p><font face="Helvetica, Arial, sans-serif">So would suggest using
        the ifurlup check for failover.</font><br>
    </p>
    <div>Regards<br>
      <b>Jahanzeb Arshad</b><br>
      <br>
    </div>
    <div>On 20/9/22 22:29, Adrian Minta via
      Pdns-users wrote:<br>
    </div>
    <blockquote type="cite">
      
      <p>Yes, of course http get is a better option for web servers.</p>
      <p>Strangely the ifportup line doesn't seems to work on my server.
        I get "Host ... not found: 2(SERVFAIL)"</p>
      <p>Could this be the caused by my server version, 4.4.1  ?</p>
      <br>
      <div>On 9/20/22 19:33, Jahanzeb Arshad via
        Pdns-users wrote:<br>
      </div>
      <blockquote type="cite">
        
        <p>You can do with ifportup also like this:</p>
        <p><a href="http://www.domain.com" target="_blank">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>Regards<br>
          <b>Jahanzeb Arshad</b><br>
          <br>
        </div>
        <div>On 20/9/22 21:18, Adrian Minta via
          Pdns-users wrote:<br>
        </div>
        <blockquote type="cite">
          
          <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>On 9/20/22 15:37, Jahanzeb Arshad
            via Pdns-users wrote:<br>
          </div>
          <blockquote type="cite">
            
            <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 href="http://www.domain.com" target="_blank">www.domain.com</a>   
              60    IN    LUA    A "ifurlup('<a href="https://www.domain.com" target="_blank">https://www.domain.com</a>',
              {{'192.168.1.10'},{'192.168.2.20'}}, {timeout=5})"<br>
              <br>
            </p>
            <div>Regards<br>
              <b>Jahanzeb Arshad</b><br>
              <br>
            </div>
            <div>On 20/9/22 17:25, Adrian M via
              Pdns-users wrote:<br>
            </div>
            <blockquote type="cite">
              
              <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></fieldset>
              <pre>_______________________________________________
Pdns-users mailing list
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a>
<a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a>
</pre>
            </blockquote>
            <br>
            <fieldset></fieldset>
            <pre>_______________________________________________
Pdns-users mailing list
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a>
<a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a>
</pre>
          </blockquote>
          <pre cols="72">-- 
Best regards,
Adrian Minta


</pre>
          <br>
          <fieldset></fieldset>
          <pre>_______________________________________________
Pdns-users mailing list
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a>
<a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a>
</pre>
        </blockquote>
        <br>
        <fieldset></fieldset>
        <pre>_______________________________________________
Pdns-users mailing list
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a>
<a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a>
</pre>
      </blockquote>
      <pre cols="72">-- 
Best regards,
Adrian Minta


</pre>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Pdns-users mailing list
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a>
<a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a>
</pre>
    </blockquote>
  </div>

_______________________________________________<br>
Pdns-users mailing list<br>
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a><br>
<a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" rel="noreferrer" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br>
</blockquote></div>