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.

How it fits together

Conditionwhat to look for: text or a regular expression, a field condition (level = ERROR), or Performance Counter thresholds (Metrics, Trial / Pro; several combined with AND / OR) - tested on the new, complete lines of the files the alert names, written after the alert exists
Alert definitionthe saved rule - what you configure: the condition, a severity (Info, Warning, Error, Critical), how often to notify, which evidence to keep, when it runs and what it activates. Every change of its meaning is a new version. Tools > Manage Alerts lists them
Notificationa Windows notification, the tray icon, a sound or TKTail brought to the front - at most one per second. The status bar and the tray say 2 new alerts · Critical; nothing interrupts you with a dialog
Alert eventone time an alert fired - the line (or counter) that matched, when, in which file. Tools > Alert Events lists them (the alert history)
Incidentan alert event with what was kept for it: New until you acknowledge it; pin the ones to keep. Tools > Incidents lists them
Evidencekept with the incident: the trigger record and the records around it (10 before and 10 after by default; a multi-line record whole), and - when the alert asks for them - the Windows events and the metric samples of that moment. It stays when the log is rotated, truncated or deleted, and after a restart
Evaluation tracewhy the alert fired: each condition, whether it held and whether it contributed (Why did it fire?)

From an alert event you get to everything about it: its definition, its incident, why it fired and its relationships (Working from an alert event).

Not in this version: alerts on sequences, on Windows Event Logs (an event log is evidence only), on whole folders or on all open files; e-mail, webhook or script actions.

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…. In Tools > Manage Alerts…, Add Alert… does the same for the log in front (This Log) or for any other log file (Another Log File… - watched without a tab), and Add Metric Alert… makes a counter 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; Test… tries the pattern on your own sample, a line or the whole record as the alert reads it (Testing a regular expression)
Whole recordLook in the whole entry written so far (a header with its stack trace or payload), not just one line: the alert fires at most once per entry, on the line that completes the match. An entry is read up to 1 MB; why an alert fired says when an entry was longer
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)
Activation…When the alert runs - always, on a schedule, or only when another alert (or you) activates it - and what it activates when it fires (Trial / Pro; Conditional and scheduled monitoring)

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 (for a dated file that TKTail follows: its series); 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… is the one place for your alert definitions: add, edit, enable, delete, and see how each one relates to the others.

  • The list shows each alert with Activation now (Always Active, Scheduled Active, Triggered Active, Manually Active, Active - 2 reasons, Inactive, Blocked, Disabled), its condition, what it keeps and whether it is Evaluated - Yes - u_ex261106.log (no tab) names the file it reads now; Waiting - … says that its file is not there yet (TKTail opens it when it is); No - … why not (a disabled alert, a condition TKTail cannot watch live, a missing license feature).
  • Add Alert… (a log file alert: the log in front or another one) and Add Metric Alert… (a performance counter) open the alert editor; the new alert is selected when you press OK.
  • Edit… (Enter or double-click), Enable / Disable (the check box, Space), Delete… (Del - its incidents stay), Incidents (its incidents in the bottom panel), Stop Activation (ends what other alerts and you started). Shift+F10 or a right-click offers all of them. The buttons that need an alert stay unavailable until one is selected. 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.

Relationships and runtime - below the list, for the selected alert (Alt+R moves there; the arrow keys walk it, Shift+F10 opens its menu):

SectionWhat it says
Alert definitionthe alert, its number, version and severity (Enter: edit it)
Base activationwhen it normally runs: Always, Scheduled with its windows (Mon-Fri 08:00-18:00, every day 22:00-06:00 (next day), a one-off window’s exact start and end), or Only when activated
Activation nowits state now and every reason, each on its own line: the schedule window and until when, each alert occurrence that activated it (Triggered by alert “API Failure” (#1) - its incident …, until 06:42), your manual start; why it is blocked (it needs your approval as a Heavy target) or what it waits for. A window that ended while an activation still runs it shows only that activation - the alert keeps running
Triggered bythe alerts that activate this one when they fire, and for how long
When this alert fireswhat it activates: another alert, a Metric Set monitor (its set and interval), a source monitor (its file) - each for its duration or until revoked, with that target’s state now; a target deleted since is said
Activations of this alert in this sessioneach one: active, ended, stopped or refused with the reason (a cycle - A activates B activates A -, deeper than three steps, a Heavy target without your approval)

Go To (or Enter, or a double-click) follows a line: an alert is selected in the list (its own relationships show), a monitor opens Conditional Monitoring at that monitor, an incident opens in the Incidents view. Opened from an alert event (Show Relationships), the event’s own activation path is shown first: why the alert was running when it fired and what it activated. In Forensic Mode the tree says that activations - until revoked too - and changes last for this session only. Help (or F1) opens this page. See Conditional and scheduled monitoring for setting activations up.

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 - also with no tab open and after a restart (Rotating dated log files).

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

Working from an alert event

An alert event is a starting point, not a dead end. Enter or a double-click opens its trigger record in the file; right-click (or Shift+F10) offers the rest - each found by the event’s own alert number and incident, never by a name:

ItemOpens
Edit Alert Definition…the alert editor on the alert that fired
Manage Alert…Manage Alerts with that alert selected
Enable / Disable Alertswitches the alert on or off
Show RelationshipsManage Alerts at that alert, its relationships and runtime, and first this event’s own activation path
View Incidentthe incident in the Incidents view
View Evaluation Trace (Why It Fired)a window with the evaluation trace and the activation of this incident
Open Incident Evidence as Logthe kept records as a log tab

The view’s header has buttons for the most used ones (edit the definition, the incident, the relationships). An item that cannot apply is unavailable - an event whose alert was deleted since, or one without an incident (the history is off, or the alert keeps none) - and the status bar says why when a button is used.

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. Right-click an incident for View Evaluation Trace (Why It Fired), Edit Alert Definition… and Show Alert Relationships too. 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.

Why did it fire?

Each condition of an alert has a short, stable name: C1, C2, … for conditions and G1, G2, … for their groups - so ERROR AND (timeout OR cancelled) is C1 AND (C2 OR C3). A condition keeps its name when you edit the alert (a changed threshold too); a removed condition’s name is never given to another one.

An incident’s details (and the README of its export, and View Evaluation Trace on an alert event or incident) have an EVALUATION TRACE: every condition by its name, whether it held, and whether it contributed to the alert firing - in C1 AND (C2 OR C3) on the line ERROR timeout on orders, C1 and C2 contributed, C3 did not hold. For a log condition you see where it matched in the trigger record; for a Performance Counter condition the threshold, the observed value, the samples it was decided on with their minimum, maximum, average and last value. A performance-counter alert can combine several counters (“CPU over 90 % for 30 s and available memory under 500 MB”), each condition decided on its own counter; such an alert is made by an AI client you allowed to manage alerts (AI access) - the alert editor sets one counter condition and keeps a combined one as it is.

Under each chart in the details, ^C1 marks where a contributing condition was decided and *A7 the moment alert #7 fired; marks at the same moment are stacked on lines of their own, and a legend says what each one is. The charts are drawn from the samples themselves: the export keeps them as CSV (trace-C1 CPU (total).csv) and in manifest.json. When the proof could not be kept whole - the log changed at the trigger line before TKTail read it, for example - the trace says INCOMPLETE and what is missing, and the incident is Partial, never Complete. Incidents recorded by an earlier version have no trace (“not recorded”).

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

An enabled alert keeps its file watched while TKTail runs - with or without a tab, hidden in the notification area too; for a dated series, its newest file. Disabling or deleting the alert ends that watch. To keep a file watched for its own sake, with a refresh mode or a format of your choice (and remembered in the settings):

  • 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.

An AI assistant can set up and check alerts with you - propose the condition, check it with TKTail, save it only with Allow AI to manage alerts and your yes, then report whether it is running and which file it reads (Alerts with an assistant).

The notification area (tray)

Alerts run only while TKTail runs. The Hide to Notification Area button in the title bar, right before minimize (the arrow dropping into a tray; also File > Hide to Notification Area) takes the window off the desktop with one click: monitoring, LIVE tabs and alerts go on, nothing is reloaded, and the icon in the notification area brings the window back. The icon shows unread alerts and its menu lists them - see The notification area. Exiting while alerts are enabled asks first - Closing TKTail stops 4 active alerts: Keep Running in the Notification Area (the default), Close and Stop Alerts, or Cancel (Closing the window). To start TKTail there when you sign in: Settings > Startup (Starting with Windows). Retention of the alert history and incidents: Settings > Alerts & Incidents (Settings).

What survives a restart?

After a restart
Your alertsKept - the same alerts, enabled or disabled as you left them, with their conditions, evidence and versions. Alerts made by earlier versions of TKTail (1.0.0 - 1.1.0) are read as they are and behave as before
WatchingEnabled alerts start watching again by themselves - a dated series on its newest file, also one that appeared while TKTail was not running
Conditional monitoringSchedules are worked out again from the clock; an activation for a while ends at its time (also while TKTail was not running), one until revoked continues (Conditional and scheduled monitoring)
What was already readNot read again: a file is watched from its end when TKTail opens it, so nothing fires twice because of a restart. Lines written while TKTail was not running are not checked
Incidents and the alert historyKept, with their evidence, acknowledgements and pins, and the TKTail run that captured them
The workspaceRestored: tabs, splits, the active tab, positions, LIVE / PAUSED, Event Log and Metrics views, dated series (Viewing logs)
Settings, monitored files, Saved Searches, Metric Sets, formatsKept
Evidence packages, pinned searchesKept: packages until you delete them; up to 20 pinned searches with their results (Saving evidence)
Running searches, exports and index jobs, terminal sessions, linked windowsNot resumed: they end with TKTail - run a search again (or pin it first), start a terminal again