OBLYTECH Logo
OBLYTECH Logo

Influence anomaly detection with lexical keywords

To influence anomaly detection with lexical keywords, manage the words and phrases Health Log Analytics looks for in log data. The application compares keyword frequency for a source with a threshold based on normal occurrence patterns. Adjusting keyword matching and source coverage helps align this detection with the issues your team investigates.

Understand what a lexical keyword changes

A lexical keyword represents meaningful text in a log message. Words such as crashed or failed can point to a condition worth investigating. Health Log Analytics identifies occurrences of the keyword and generates an alert when its frequency for a source exceeds the applicable threshold. Finding the text and detecting an unusual frequency are connected parts of that process.

A keyword is different from a field name in a log entry. For example, Hostname identifies a key whose value describes a host. A keyword carries meaning through the text itself. When planning a detection change, start with the messages that describe the failure, rather than treating the names of structured fields as failure indicators.

The application includes default global keywords and supports adding, editing, and deleting global keywords or phrases. Those global definitions apply across source types, with source coverage controls available on the form. A keyword associated with a particular source type is managed through source type capabilities. Decide which scope fits the issue before changing a shared definition.

This work sits within ServiceNow ITOM AIOps, where Health Log Analytics is documented. Treat a keyword change as a detection change: identify the condition it should expose, the sources it should cover, and the evidence an operator would use to judge the resulting alert.

Inspect the current keywords before adding another

Open the list from All > Health Log Analytics > Log Anomaly Detection > Lexical Keywords. Adding, editing, or deleting keywords requires evt_mgmt_operator or evt_mgmt_admin. The Lexical Keywords table shows global keywords by default. Check the controls on your instance and release before following the workflow below.

A keyword match does not produce an alert on its own. When matching text for a source exceeds the specified count threshold, Health Log Analytics identifies an anomaly and generates an alert. An expression can therefore match the right messages and still stay silent if those messages occur less often than the threshold allows, so the matching check and the frequency check are separate steps.

Review the existing definitions against the actual messages you want to detect. Look for a keyword that already represents the condition, then examine its matching expression and source coverage. A new name does not necessarily mean a new detection need; two differently named definitions may describe substantially overlapping text.

Prepare a small review set before editing. Include messages from a known issue, ordinary messages from the same source, and similar messages from another source type. This is an operating recommendation for evaluating the change. It helps distinguish a matching problem from a scope problem without assuming that an alert count alone explains the result.

  • Record the current keyword name and expression so the proposed change can be compared with its starting point.
  • Identify whether the relevant message is missing from the intended match or whether ordinary messages are included.
  • List the source types that need the keyword and those where the same text has a different meaning.
  • Agree on the investigation evidence that would make a resulting alert actionable.

Influence anomaly detection with lexical keywords on the form

Adding, editing, or deleting lexical keywords requires evt_mgmt_operator or evt_mgmt_admin. To add a global keyword from the Lexical Keywords list, select New. Enter a unique, descriptive Name and a Regular expression that defines the text to match. Select Submit after completing the relevant fields.

The form asks for a Name, which should be unique and descriptive, and a Regular expression that defines the matches. Exact match and Case-sensitive are options that control how the expression matches. Range of analysis selects All source types or a Specified source type, and Excluded source types lists the source types whose log data Health Log Analytics does not search for that keyword.

Choose the expression from observed log messages. A recognizable exception name may be a better starting point than a broad word that appears during both successful and unsuccessful operations. That choice depends on the messages your application emits; review representative examples before deciding that a term reliably describes a failure condition.

Check Exact match and Case-sensitive together

Exact match is automatically set to True. Its behavior matters when a short expression appears within a longer term: the expression exception does not match NullPointerException in the example represented by this setting. Do not assume that a fragment of the desired message will behave as a complete match.

Case-sensitive is automatically set to False. Review capitalization in the messages you collected and decide whether capitalization should distinguish the intended matches. Keep that decision separate from exact matching. Changing one setting does not remove the need to understand what the other setting does to your chosen expression.

Write down the expected outcome for each sample message before saving. For example, an application exception message might be intended to match while a routine status message is not. This makes review concrete and gives the next operator a reason for the expression, beyond a name that merely sounds relevant.

Set source coverage deliberately

Range of analysis offers All source types and Specified source type. Excluded source types identifies source types whose log data Health Log Analytics does not search for that keyword. Review these fields alongside the expression, because a well-chosen term still needs appropriate coverage.

Global keywords suit conditions whose wording carries a consistent operational meaning across source types. Source-specific keywords belong in source type capabilities. Avoid assuming that the default global list is an inventory of source-specific definitions; its default view is limited to global keywords.

Consider a term that describes a failed application operation but also appears in routine messages from another component. As a review exercise, compare those contexts before expanding coverage. The decision is whether the shared wording represents the same condition, not whether both components happen to produce the same letters.

Keep a short scope note with the change record: intended source types, excluded source types, and the reason for each exception. If a source team later changes message wording, that note helps explain whether to revisit the expression, its scope, or both. For help planning this work, see ServiceNow implementation.

Edit and remove definitions with a clear review trail

To edit a global keyword, open it from the list, change the relevant fields, and select Update. Review the saved definition against the intended expression and coverage. Prefer a focused change with a written reason, so later observations can be connected to a specific matching or scope decision.

To delete global keywords, select their rows. In Actions on selected rows at the bottom of the page, select Delete, then select OK. Before doing this, record why the definitions are no longer needed and who reviewed the decision. Deleting a definition removes the keyword being managed, so the decision deserves the same attention as adding one.

Avoid combining unrelated cleanup with a detection correction. If the immediate issue is an expression that misses the intended text, evaluate that expression first. A separate review can address obsolete definitions. Smaller changes are easier for the operating team to explain and assess when log volume or application behavior also changes.

Evaluate the result at the source level

After changing a keyword, assess the relevant source and messages rather than counting alerts without context. The detection mechanism depends on keyword frequency exceeding a threshold based on normal occurrence patterns. A message containing the keyword does not, by itself, establish that its frequency is anomalous.

Use three checks in your review: whether the intended text fits the expression, whether the source falls within the chosen coverage, and whether the observed frequency explains the alert behavior. Keep those questions distinct in investigation notes. Otherwise, a team may broaden an expression when the real uncertainty concerns source scope or the frequency of the matching text.

The application also has a related task for viewing the lexical keywords that generate alerts. Use that view to see which keywords are producing alerts for the source under review, and compare the list with the keywords you intend to keep before changing any expression.

When an investigation concerns numerical time-series behavior, use ITOM anomaly detection and Metric Intelligence as the adjacent topic. Keeping the detection question clear helps the team choose the right investigation path. Keyword tuning starts from the language in log messages and the frequency of that language for a source.

Once the team can explain the signal and its operational meaning, assess AIOps automation opportunities. As a working recommendation, establish who investigates the alert and what they check before designing a downstream action. A detection the team understands is easier to attach a response to.