Forum Discussion

artl2377_166103's avatar
artl2377_166103
Icon for Nimbostratus rankNimbostratus
Nov 26, 2014

iRule to monitor dependant servers

Hi iRule noob ... Is it possible to construct a cunning iRule which monitors servers that are not in a pool, but the servers IN the pool are dependent on these downstream servers [I think Oracle db] being up and active ?

 

Thanks in advance

 

6 Replies

  • Using iRule SIDEBAND you can "interact" with external server/service (check availability in your scenario):

     

    https://devcentral.f5.com/wiki/iRules.SIDEBAND.ashx

     

    But in my opinion the best choice is to create an external monitor that will do monitoring of your external server and apply to pool members.

     

    https://devcentral.f5.com/wiki/AdvDesignConfig.ExternalMonitor.ashx

     

    You don't have to check external server availability for every connections you receive on VS, so an external monitor will be a good solution.

     

  • Another possibility is to write a healthcheck in whatever language on the web/application server, which also checks the backend database and use this healthcheck on the pool. Then, your backend server will be active only when also the database is OK.

     

    So, for example:

     

    1. F5 does a HTTP healthcheck and requests /health_check.php every 5 seconds.
    2. On the backend server, the PHP-script health_check.php performs a simple DB request. If it's ok, the script returns "ALL OK", if it fails, the script writes "NOT OK".
    3. F5 healthcheck looks for "ALL OK" in server's response. If it's there, then the pool member is active, if not, then member is disabled.
    • artl2377_166103's avatar
      artl2377_166103
      Icon for Nimbostratus rankNimbostratus
      Thanks but I need to keep the monitoring local to the F5 - the servers and how they operate are controlled by another company.
  • Another possibility is to write a healthcheck in whatever language on the web/application server, which also checks the backend database and use this healthcheck on the pool. Then, your backend server will be active only when also the database is OK.

     

    So, for example:

     

    1. F5 does a HTTP healthcheck and requests /health_check.php every 5 seconds.
    2. On the backend server, the PHP-script health_check.php performs a simple DB request. If it's ok, the script returns "ALL OK", if it fails, the script writes "NOT OK".
    3. F5 healthcheck looks for "ALL OK" in server's response. If it's there, then the pool member is active, if not, then member is disabled.
    • artl2377_166103's avatar
      artl2377_166103
      Icon for Nimbostratus rankNimbostratus
      Thanks but I need to keep the monitoring local to the F5 - the servers and how they operate are controlled by another company.
  • Best way to do is configure a monitor with Alias IP and make it transparent. In alias IP sepecify external server IP and assign the monitor to pool member or pool as per your requirement.