What does Enable HC Logs do; should I turn it off?
Short answer
Enable HC Logs turns on keeping the health check results of the Backend Service as records on TR7 and forwarding them with Log Forwarding; it is on by default and is displayed only while a Health Check profile is selected. The records are stored permanently on the TR7 disk and are viewed from the Health Checks tab in the Backend Service preview. When it is turned off, the check, the health status, removal from traffic and the Dashboard charts continue to work; only new records are not kept and forwarding stops. Leaving it on is recommended for troubleshooting; turning it off does not reduce the check requests sent to the server.
How Does It Work?
| Enable HC Logs on | Off | |
|---|---|---|
| Health check and removal from traffic | Works | Works |
| Health indicator, Health Check charts on the Dashboard | Updated | Updated |
| Records in the Health Checks tab | New records are written | New records are not written; previous records are preserved |
| Forwarding with Log Forwarding | Done (if the Health Check Logs source is selected) | Not done |
| Check requests sent to the server | Unchanged | Unchanged |
When is a record written? Not every check is recorded separately: a record is written when the status, the error type or the result information (e.g. HTTP code, DNS answer) changes, and on the first result of every 5-minute slot (minutes :00, :05, :10… of the hour) (When records are written).
Where Are the Records Kept, Where Are They Viewed?
- Storage: The records are kept on the TR7 disk per Backend Service (in a Backend Group, separately for each server in the group). The records are permanent: they are not deleted automatically after a certain period, they are not within the scope of disk cleanup operations, and there is no retention period to be set.
- Cluster: Each device writes its own check results to its own disk; during listing, the records of the two devices are fetched together, and the device name appears in a record that comes from the peer device.
- Health Checks tab: On the Load Balancer → Backend Services (or Backend Groups) screen, the row is clicked; the Health Checks tab is opened in the preview on the right. The same tab is also found in the preview of the Backend Service Dashboard opened from the Left Monitor Panel (Viewing health check logs).
- Enlarge window: The enlarge icon in the tab opens the records in a table titled Health Check Logs For; here they are filtered and downloaded as Excel, CSV or PDF with Export (Listing screen).
- External system: If Health Check Logs is selected in the Log Sources field of a Settings → General Settings → Log Forwarding profile, the records are forwarded to the Syslog server; while Log All Health Checks is off (default), only status changes are sent.
In TR7
- Backend Service: Load Balancer → Backend Services → Edit → Enable HC Logs; the field is displayed only while a profile is selected in the Health Check field.
- Backend Group: The setting is at the group level and applies to all servers in the group (Backend Groups · Enable HC Logs).
- WEB-CLI:
lb backend update id <backend-id> --enableHcLog false; for more than one Backend Service,lb backend update-many target selected --enableHcLog false(lb backend · The Health Check Fields). - When is it turned off? Only if the health history of that Backend Service is never needed, or if the log volume sent to the external system is to be reduced. The past records are the main way to find when and why the server went down (How do I see the health check history (when a server went down/up)?).
Common Misconceptions
- "If I turn it off, the health check requests sent to the server decrease." The check continues to run at the same frequency.
- "If I turn it off, the Dashboard charts become empty." The Health Check State and Health Check Time charts continue to be updated.
- "While it is on, every check is logged." Changes and the first result of the 5-minute slots are recorded.
- "When it is turned off, the old records are deleted." The records written before it was turned off are preserved and continue to appear in the Health Checks tab.
How it is done in the documentation
