Forum Discussion
Authentication irule to calculate authentication response time
We have to build a script to monitor the service availability by simulating the browser actions like invoke the service, submit the credentials etc. The script needs to do the following
1)Request for login page (eg:- Get- https://x.x.x.x/servicemon ) 2)A dynamic URL will be returned, which is the login page. 3)Input username and password. There are 2 sets of usernames and passwords. One from CODE1 and the other from CODE2. The username and password has to supplied alternatively. 4)Once the username and password is supplied, click on the login button. The timer should start here. 5)Capture the response, if the response contain , stop the timer. – Otherwise Log “error” in log file. 6)The total time taken for authentication needs to be calculated and stored in a log file. 7)Verify that the HTML page returned has “OK” message in it. – Otherwise Log “error” in log file.
3 Replies
- John_Alam_45640Historic F5 Account
This is doable via an iCall Script and Handler combination. An icall script is essentially a TMSH script. Click here for more on iCalls.
The script first sends a GET /servicemon and analyzes the response. If code 1, then it sends a POST (to the URI specified as the form action) with username1 & Password1, if code2 send username2/password2. In both cases the response can be analyzed by the same iCall script and the log updated accordingly.
To finish the job, you would use a "Prepetual" iCall Handler. The handler is like a daemon which runs periodically and executes the iCall script.
There are other ways to do this via an external script and a cron job but, the setup would not be saved with the BigIP configuration.
Note, iCalls are possible as of 11.3 but full support is in 11.4.
- Amit_4274
Nimbostratus
Thanks John to start with. Is is possible to help me to write script for this requirement?
- John_Alam_45640Historic F5 Account
Amit There are similar scripts here on devcentral. Look under code share for monitors. they will still have to be modified to fit your requirements.
I would check out the F5 pro-services team, they can produce a script tailored to your needs. Ask your sales team to put you in touch with pro-services.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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