Forum Discussion
Need to create a custom scripted monitor
I need to be able to create a custom health monitor that will follow the sequence of steps below. Is this possible in an iRule, or would I create a script and call it with an iRule. This type of monitor is new to me.
a. Connect to servername b. Send the [Enter] key c. Wait for “initialization” text to appear d. Send “searchf5,standard,” and the [Enter] key e. Wait for “/Search” text to appear f. Send “quit” and the [Enter] key
Thanks
2 Replies
- Kevin_Stewart
Employee
I think that should be possible. Try this:
-
Create a text file in /config/eav (the following is an example telnet to a web server):
send "GET / HTTP/1.1\r\n" send "Host: test.foo\r\n" send "\n" expect "HTTP/1.1 200 OK" -
Create a Scripted monitor and assign the above text file (path not required).
-
Assign the monitor to your pool.
-
Optionally check the debug option in the monitor config and observe the traffic flow in /var/log - the file will start with "SCRIPTED__".
So in your case, the monitor might look something like this:
send "\n" expect “initialization” send “searchf5,standard,\r\n” expect “/Search” send “quit\r\n”You don't need to create the connection as the Scripted monitor will do that for you, and I'm not 100% sure that you need the "quit" at the end. Testing will tell for sure.
-
- DaveC_53879
Nimbostratus
Kevin,
This is exactly what I need and it's already working. Thanks very much for you help.
Dave
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