Logmon variables fail to display in alarm message for command mode profiles
search cancel

Logmon variables fail to display in alarm message for command mode profiles

book

Article ID: 436038

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

We have observed that custom variables defined in a command mode profile are failing to resolve or are displaying incorrectly within the alarm messages. This issue specifically occurs when monitoring command output such as AIX lspath. In these instances, the disk or adapter status and identifiers are not being correctly captured by the watcher rule.

Environment

  • Product: DX Unified Infrastructure Management (Nimsoft / UIM)
  • Probe: logmon (any version)
  • OS: Linux/UNIX (e.g., AIX)

Cause

The issue is typically caused by a mismatch between the regular expression (regex) in the Match Expression and the variable definition offsets. If the regex does not correctly group the output or if the character offsets are misaligned, the probe cannot extract the required strings for dynamic substitution in the alarm message.

Resolution

To resolve this, update the logmon profile with a refined regex and explicit character-based variable offsets.

Step 1: Refine the Match Expression

Ensure the regex accurately captures the command output lines. For monitoring missing or failed disks, use a regex that handles leading/trailing whitespace and groups the identifiers.

Example Regex: /^\s*((?i)missing)\s+(hdisk\S+)\s+(\S+)\s*$/ (Matches lines like: Missing hdisk0 fscsi0)

Step 2: Define Variables with Character Offsets

Instead of relying solely on match groups, use specific character positions to ensure precise extraction from the AIX command output.

Example

Step 3: Configure the Alarm Message

Use the ${Variable_Name} syntax in the Message to Send on Match field to ensure dynamic substitution.

Example Message: AIX Disk Missing Detected: ${Disk_ID} is missing on adapter ${Adapter}

Step 4: Adjust Probe Thresholds

If the command output contains multiple lines (e.g., multiple failed disks), ensure the max_alarms setting is high enough to process all matches in a single scan interval.

Additional Information

How to configure threshold for a variable in logmon probe

How to run a logmon command parse output and if keyword/string is NOT found generate alarm