Can I see only status changes in the health check logs (Only Change Logs / All Logs)?
Short answer
Yes. In the Health Checks tab and the enlarge window of the Backend Service, while Only Change Logs (default) is selected, only the records in which the status, the error type or the result information changed are shown; when All Logs is selected, the periodic record of each 5-minute slot is added to them (not every check is recorded one by one). This is a display filter; it does not change what is recorded. In Log Forwarding, while Log all health checks is off (default), only status changes are forwarded.
Problem: Status Changes Get Lost Among Periodic Records
While Enable HC Logs is on in the Backend Service, a record is written when the status changes, when the error type changes, when the result information (e.g. HTTP code, DNS answer) changes, and, even if there is no change, at the first result of each 5-minute slot. To find when the server went down and came up over a long time range, the periodic records need to be hidden and only the changes need to be listed.
Solution: 2 Methods
Method 1 filters the list in the TR7 interface; Method 2 determines the records to be forwarded to an external system.
| Your situation | Suitable method |
|---|---|
| I examine the records in the TR7 interface | Method 1: Health Checks tab and enlarge window |
| I forward the records to a SIEM or Syslog server | Method 2: Log Forwarding |
Method 1: Health Checks Tab and Enlarge Window Recommended
- How it works The switch shows the current selection: Only Change Logs lists only the change records, and All Logs lists all the records including the periodic records. When the switch is changed in the tab, the list is refreshed immediately; in the enlarge window, the selection is applied with Get Logs. The selection is stored per user and is shared by the tab and the window.
- Where it is openedLoad Balancer → Backend Services (or Backend Groups) → row → preview → Health Checks
- Requirement A Health check profile being assigned to the Backend Service and Enable HC Logs being on
- vService type All
Step-by-Step Configuration
On the Load Balancer → Backend Services screen, the Backend Service row is clicked; in the preview, the Health Checks tab is clicked.
The switch is set to the Only Change Logs position; to also see the periodic records, All Logs is selected. The list is refreshed immediately.
If a wide table is needed, the enlarge icon in the tab is clicked; the records open in the window titled Health Check Logs For.
In the window, the switch is set and the Get Logs button is clicked.
Verification
In Only Change Logs, the records in which the status, the error text or the result information changed appear; in All Logs, a periodic record is added among them every 5 minutes.
Only change recordsMethod 2: Log Forwarding
- How it works While Log All Health Checks is off (default), only the status changes are forwarded; while it is on, all the health records written on TR7 (status, error or result changes and the 5-minute periodic records) are forwarded. The records of the Backend Services with Enable HC Logs off are not forwarded.
- Where it is openedSettings → General Settings → Log Forwarding → Log Sources
- Requirement A Log Forwarding profile and a log collection system that accepts Syslog (How do I see the health check history (when a server went down/up)?)
- vService type All
Step-by-Step Configuration
The Configuration Menu is opened with the TR7 logo at the bottom left; on the Settings → General Settings → Log Forwarding screen, the profile is selected and Edit is clicked. If there is no profile, it is created with Add; Name, Route Table, Syslog Server, Port (default 514) and Protocol (default UDP) are entered (How to add?).
Health Check Logs is checked in the Log Sources field (it does not come selected by default); the Log All Health Checks switch appears.
If only status changes are to be forwarded, Log All Health Checks is left off (default); if all the health records are to be forwarded, it is turned on.
The Edit (Add in a new profile) button is clicked.
Verification
While Log All Health Checks is off, only the status change records of the Backend Services appear in the log collection system.
Status changesCommon Mistakes
- Expecting only up/down in Only Change Logs. Changes in the result information, such as the error type or the HTTP code, are also listed.
- Expecting every check in All Logs. If there is no change, a record is written once every 5 minutes; not every check is recorded.
- Forgetting Get logs in the window. In the enlarge window, a filter change is applied with Get logs.
- Assuming that every check is forwarded with Log all health checks. Only the records written on TR7 are forwarded.
How it is done in the documentation
