T Techclick ← All lessons
F5 · LTM · Module 5 · Interactive lesson

F5 LTM Module 5 monitors, iRules & policies

ICMP is not application health. HTTP monitors need Host and a recv string. Use LTM Policies before iRules. HTTP_REQUEST never fires without an HTTP profile.

20 min read · L2 primary · Quiz at end

After this page you can

Lessons · F5 LTM series · Module 5

F5 LTM recorded course · 7 modules

Same lab numbers on every page: client 198.51.100.50, VIP 192.0.2.100, Self IPs 192.0.2.10 / 10.20.20.10, members 10.20.20.101–103.

  1. Hub · Course map
  2. M1 · Fundamentals & admin
  3. M2 · Networking & traffic flow
  4. M3 · Virtual Servers & pools
  5. M4 · Profiles, SNAT, SSL
  6. M5 · Monitors, iRules, policies ← you are here
  7. M6 · High availability
  8. M7 · Troubleshooting

Next → M6 · High availability

Recorded course + workbooks: My Courses · syllabus F5 LTM / GTM / ASM

Green pool, broken app

ICMP replies. TCP 443 is open. HTTP is 500. A TCP monitor still paints the member green. That is the Module 5 lesson: monitor the thing the user needs, then use LTM Policies before iRules for simple L7 steering.

Hero · probe vs 500
Health probe hitting three servers, one failing
The probe is TMM-generated. It is not a client request. It still needs the Host header the vhost expects.
Quick answer

Use an HTTP/HTTPS monitor with a real GET, a Host header, and a recv string. Prefer an LTM Policy for host/URI routing. Write an iRule when you need events the policy cannot express. Never log cookies or passwords in iRules.

Monitor scope and iRule events

Flow 1 · probe lifecycle
GenerateTMM probeSendto IP:portMatchrecv stringStateup / down

Timeout is usually 3× interval + 1 (interval 5 → timeout 16). Mark down only after failed probes, not after one blip.

ScopeChecksMisses
Node monitorHost (often ICMP)Service port / app
Member monitorThat IP:portOther ports on the same node
Pool monitorAll members the same waySpecial snowflake members — override per member
Gateway ICMPPath to a gatewayAny application
Say this out loud

HTTP_REQUEST only fires if an HTTP profile is on the VS. CLIENTSSL_HANDSHAKE only fires if Client SSL is attached. Events are not a continuous script.

Policy vs iRule

NeedUseWhy
If Host is app.example.com → pool XLTM PolicyDraft → publish; readable; fast
HTTP→HTTPS redirectiRule or policy redirectCommon iRule; still keep it tiny
Header inject / strip XFF safelyiRuleReplace client-supplied XFF; do not trust it
Complex Tcl branchingiRuleLast resort — every line is a future outage
Journey · L7 policy
HTTP request, match host, redirect or pool, response
Policies are draft then published. Only published policies attach to a Virtual Server.

Runbook — HTTP monitor then a tiny iRule

Side A · monitor

https://192.168.100.10/tmui/Control/jspmap/tmui/locallb/monitor/create
Training mock · not live

Local Traffic > Monitors > Create

New HTTP Monitor

mon_web_health
HTTP / http
5 / 16
GET /health HTTP/1.1 | Host: app.example.com | Connection: close | blank line
APP_STATUS=READY

Incomplete Send (missing Host or final blank line) is the classic false-down. Source: Module 5 PDF.

TMSH · HTTP monitor
tmsh create ltm monitor http mon_web_health defaults-from http interval 5 timeout 16 \
  send "GET /health HTTP/1.1\r\nHost: app.example.com\r\nConnection: close\r\n\r\n" \
  recv "APP_STATUS=READY"
tmsh modify ltm pool WEB_POOL monitor mon_web_health
tmsh show ltm pool WEB_POOL detail

Side B · iRule (only if policy cannot)

https://192.168.100.10/tmui/Control/jspmap/tmui/locallb/rule/create
Training mock · not live

Local Traffic > iRules > iRule List > Create

New iRule

rule_host_pool
HTTP_REQUEST
when HTTP_REQUEST / if HTTP::host eq app.example.com / pool APP_POOL

Attach the iRule on the Virtual Server Resources tab. HTTP profile required.

Tiny iRule — Module 5 PDF
when HTTP_REQUEST {
  if { [HTTP::host] eq "app.example.com" } {
    pool APP_POOL
  }
}

Events cheat-sheet: CLIENT_ACCEPTED (TCP accepted), CLIENTSSL_HANDSHAKE (TLS done, SNI available), HTTP_REQUEST (headers parsed), LB_SELECTED (member chosen), SERVER_CONNECTED (server TCP up).

Side C · prove the monitor, not the ping

  1. Break the recv string in lab

    Member goes down in tmsh show ltm pool WEB_POOL detail.

  2. Restore it

    Member returns; Slow Ramp (Module 3) should protect it.

  3. tcpdump the probe

    You will see BIG-IP's Self IP as source — not the client.

Ops · monitor and iRule traces
Health-monitor results and event traces
If the monitor source cannot route to the member, every member goes down together — that is a network problem, not an app problem.

Runtime

Flow 2 · client vs probe
User HTTPVS profilesPolicy/iRulemaybe re-poolMemberif monitor upProbeSelf IP → member

Probes keep using the server-side path even when no user is connected.

Traps + proof

FailureSymptomFix
ICMP/TCP monitor onlyGreen pool, HTTP 500HTTP recv string
Missing HostAll members down on vhostsSend String includes Host
Gateway ICMP as app healthPath up, app deadNever substitute
iRule without HTTP profileNothing firesAttach http + (for HTTPS) Client SSL
Log HTTP cookies or tokensSecret in /var/log/ltmLog host/URI only
You are done with Module 5 when

Knowledge check

Health and L7 — green is not a personality trait.

Q1

TCP monitor up and users get HTTP 500. Next:

Correct: b. Deeper monitor.
Q2

Gateway ICMP proving the app is:

Correct: b. PDF warning.
Q3

HTTP_REQUEST requires:

Correct: b. Events need profiles.
Q4

Simple Host → pool mapping should be:

Correct: b. iRule is the exception.
Q5

Monitor send missing the final blank line often causes:

Correct: b. Incomplete HTTP request.
Q6

Safe iRule logging includes:

Correct: b. Never log secrets.

Sources

Related: Course hub · Syllabus · My Courses · F5 LTM interview