Windows
- Ensure the Watchlog agent is installed on your Windows server.
- Open the log-watchlist configuration file:
C:\Program Files\watchlog-agent\log-watchlist.json - Define the logs you want to monitor. For example:
{ "logs": [ { "name": "Nginx Access Logs", "path": "/var/log/nginx/access.log", "service": "nginx", "format": "auto" }, { "name": "Redis Logs", "path": "/var/log/redis/redis.log", "service": "redis", "format": "custom", "pattern": "^(\\d{2} \\w{3} \\d{2}:\\d{2}:\\d{2}) (\\w+): (.*)$" } ] } - Explanation of fields:
name: A friendly name for this log stream.path: Full filesystem path to the log file.service: The service name used for categorization.format:auto: Watchlist auto-detects common log formats.custom: Use thepatternfield to define a regular expression.
pattern: A regex with three capture groups for:- Date/Time
- Log Level (e.g., INFO, ERROR, DEBUG)
- Message content.
- Save the file and reload the agent:
Restart-Service -Name "WatchlogAgent"
