Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Alerts and monitoring

Field change (2026-10-04): in application logs the logger name after the level is now the field component; message holds only the text after it. An alert that looked for a logger name in message no longer matches - TKTail lists such alerts in Problems when an application log is open or monitored. Change the condition to component.

TKTail can watch files for you - while you look at something else, with the window hidden in the notification area, and also for files you have no tab open for.

Creating an alert

  1. Select the text you want to be told about in a log (for example ERROR or an order id).
  2. Choose Tools > Add Alert… (Ctrl+Shift+A), or right-click > Add Alert for Selection…. In the Explorer, right-click a file > Add Alert….
  3. In the Alert dialog:

SectionFieldMeaning
Name, Severity, EnabledHow the alert is called in notifications and incidents; Info / Warning / Error / Critical; an alert can be kept but switched off
TriggerText in the file: Watch forThe text to look for (filled with your selection)
Regular expression / Match caseHow Watch for is matched - the same regular expressions as Find
Field conditionMatch a parsed field instead of text, e.g. level = ERROR, sc-status >= 500, OrdStatus = Rejected
A performance counterA Windows Performance Counter (Choose… opens the counter picker) over or under a threshold (90, 90 %, 4 GiB), for a number of seconds without a break (0: one sample decides) - needs the Metrics feature of your license
Evidence to keepRecords of the fileThe logical records kept before and after the record that matched (a multi-line entry counts once)
Windows eventsA log (System, Application, a channel such as Microsoft-Windows-PowerShell/Operational, or a saved .evtx), its levels, minutes before and after the trigger
MetricsA Metric Set (Host Basics, …), minutes before and after the trigger - an enabled alert keeps them collected, so their history exists when it fires
BehaviorNotifyEvery match; First match only (until re-armed); At most once per interval; First match, then a summary per interval
Interval (s)For the interval modes
Fires again withinMatches this many seconds after the last one join the same incident instead of starting a new one (0: never)
NotificationActionsWindows notification, tray icon attention, sound, bring TKTail to front
Show matching text in notificationsOff: notifications then name the alert and file but not the log line (privacy)

The line under Evidence to keep says what the alert will keep, in words. The pattern is checked when you press OK; an invalid regular expression is reported and the dialog stays open. A line that makes a pattern hit its complexity limit is skipped for that alert - the other alerts and lines go on.

Only new lines are checked - lines written after the alert exists. A text alert applies to the file it was created for; a counter alert fires once when its condition becomes true and again only after it was false in between (a sample that could not be read never counts either way).

Managing alerts

Tools > Manage Alerts… lists your alerts with their condition, what each keeps and whether it is evaluated (and why not - a disabled alert, a condition TKTail cannot watch live, a missing license feature). Check or uncheck an alert to enable or disable it; Edit… opens the Alert dialog, Delete… removes it (its incidents stay), Incidents shows its incidents, New Metric Alert… adds a counter alert. An alert created from a search (several conditions) keeps its condition as it is; its evidence and behavior can be edited. Every saved change of what an alert means is a new version - an incident names the version that fired.

When an alert fires

Depending on the alert’s actions you get a Windows notification (click it to jump to the line in TKTail), the TKTail icon in the notification area changes to the alert icon, a sound plays, or TKTail comes to the front. The notification’s title names the alert’s severity (“TKTail — Critical: CPU busy”). The status bar shows the number of unread alerts and the highest severity among the new incidents (2 new alerts · Critical; its tooltip has the count of each severity); the tray icon’s tooltip says the same. Nothing opens or takes the focus because an alert is Critical.

Every alert is written to the alert history (alerts.jsonl next to the settings, see Getting started), including the file, position and a short preview (subject to the privacy option above). The size of the history is limited by settings. Rotations of monitored files are recorded there too.

An alert made on a file whose name carries the date (app_2026-10-14.log) watches the whole series: when app_2026-10-15.log is LIVE, the alert watches it, and its incidents name the file the line was really written to - a monitored file follows its series without a tab too (Rotating dated log files).

Browse the history in the Alerts view of the bottom panel (Tools > Alert History, see Bottom panel): filter by rule or file, show unread only, open an alert at its exact position in the right file, mark alerts read. F8 / Shift+F8 go to the next / previous alert in the current file. tktail alerts history (planned).

Incidents

An alert that fires also keeps an incident: the record that matched and, by default, the 10 records before and the 10 after it in the same file - read when the alert fires and kept as they were, so they are still there after the log was rotated, truncated or deleted. A record that grows after the line that matched (a stack trace) is kept whole. Alerts that fire again and again within a minute are one incident: its match count grows instead of a new copy of the evidence being kept for each.

Investigate them in the Incidents view of the bottom panel (Tools > Incidents, see Bottom panel): what fired, each piece of evidence with its state - Complete, or Partial / Unavailable with the reason (the file had fewer records, a counter was collected for less time than asked, an event log no longer holds the start of the window, a log does not exist) - and a preview of what was kept. Acknowledging an incident marks its alert read, and marking alerts read acknowledges their incidents. Export writes an incident as a folder (a README, the kept records as a .log, events and samples as text and CSV, and the machine-readable files) to attach to a ticket.

Incidents are kept in the Incidents folder of the data folder (see Getting started), at most 1,000, 90 days and 512 MB (alerts.incidentMaxCount, alerts.incidentMaxAgeDays, alerts.incidentMaxMB in settings.ini). They follow the alert history’s privacy settings: without a persistent history (alerts.persist=0) no incident is kept, and when the history keeps only the match or no text (alerts.preview) an incident keeps the same and no log records.

Alerts you created with an earlier version moved to the Alerts folder the first time this version started - with the same names, conditions and numbers, and the severity Warning (change it in the alert editor); settings.ini keeps the old rules for an earlier version. An incident keeps the severity its alert had when it fired: making an alert Critical later does not change the incidents it already has. tktail alerts list lists your alerts, their conditions and what each keeps.

Monitoring files in the background

A file with alerts is monitored while its tab is open. To keep monitoring it without a tab (and after restarting TKTail):

  • Explorer: right-click the file > Monitor in Background (Stop Monitoring reverses it), or
  • command line: tktail monitor add C:\Logs\service.log (monitor remove, monitor list).

Closing a tab of a monitored file keeps the file monitored in the background.

A background file is watched the same way as an open one, with the same refresh mode: an alert on a local file fires as the line is written; on a network share in Auto, within about a second while the file is being written and up to ~30 s after a long quiet spell; with Poll, within the chosen interval. To choose the mode, open the file and change Monitoring > Refresh in the Inspector - it is saved with the background source. A background file on a share that cannot be reached is checked again with growing pauses (up to a minute) and continues when the share is back.

Tools > Pause All Monitoring stops all watching (no alerts) until you resume it; the tray icon shows the paused state.

The notification area (tray)

While TKTail is hidden in the notification area, monitoring and alerts go on; the icon shows unread alerts and its menu lists them - see The notification area. To start TKTail there when you sign in: Settings > Startup (Starting with Windows). Retention of the alert history and incidents: Settings > Alerts & Incidents (Settings).