Forum Discussion
Configure a monitor/irule to check a webpage health only after login using a test credentials
- Feb 06, 2022
Finally, I did it! Staging, UA, DEV environment pools are running currently using this custom health monitor and I have been implementing this in the production environment without any issues.
Configuration:
Create new health monitor with the following settings:
From the F5 GUI:
Send string: POST /Account/SignIn HTTP/1.1\r\nHost: host.domain.com\r\nConnection: Close\r\nContent-Length:10\r\nAuthorization: Basic ZjU6ZjVwYXNzd2Q=\r\n\r\0123456789
Receive string: 302 Found
Interval: 10 seconds (use whichever is acceptable)
Timeout: 31 seconds (use whichever is acceptable)
Since we need the monitor to login to the website with the credentials we provide, do the following:
To generate the encrypted auth string like in the send string above:
- Log in to the BIG-IP command line.
- Generate an encrypted auth string by using the following syntax:
echo -n 'username:password' | base64
For example, if you used the user name f5 and the password f5passwd, the output would appear as follows:
ZjU6ZjVwYXNzd2Q=
To test the monitor before applying it to the corresponding pool on F5, you can test using the below commands:
From F5 CLI:
tmsh
run /ltm monitor http <health monitor name> destination <dest_ip>
show /ltm monitor http <health monitor name> test-resultHappy learning!
Hello vshiva.
External monitors are what you were looking for
REF - https://support.f5.com/csp/article/K31435017
REF - https://devcentral.f5.com/s/articles/External-Monitor-Information-and-Templates
REF - https://devcentral.f5.com/s/articles/ltm-external-monitors-the-basics
Regards,
Dario.
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