Forum Discussion
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
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.
- Andreas_Lampre1Nimbostratus
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:
- F5 does a HTTP healthcheck and requests /health_check.php every 5 seconds.
- 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".
- 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_166103NimbostratusThanks but I need to keep the monitoring local to the F5 - the servers and how they operate are controlled by another company.
- Andreas_LamprecNimbostratus
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:
- F5 does a HTTP healthcheck and requests /health_check.php every 5 seconds.
- 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".
- 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_166103NimbostratusThanks but I need to keep the monitoring local to the F5 - the servers and how they operate are controlled by another company.
- Pratik_125797Nimbostratus
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.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com