Linux log monitoring default checks and policies
Summarize
Summary of Linux Log Monitoring Default Checks and Policies
The Agent Client Collector in ServiceNow provides policies for monitoring Linux log files, enabling users to track critical events and warnings effectively. This monitoring is essential for maintaining system integrity and ensuring timely responses to issues within log files owned by both regular and root users.
Show less
Key Features
- util.check-logs: Monitors log files owned by regular users.
- util.check-logs-sudo: Monitors log files owned by root users.
- Flexible Matching Options: Supports case insensitive matching, encoding options, and customizable patterns for searching logs.
- File Pattern Checking: Allows for regex patterns to check multiple files, enhancing monitoring capabilities.
- Return Options: Customizes the output by returning matched lines and controlling the number of returned log entries.
Usage Examples
For monitoring log files, you can use commands like:
Regular User: check-log.rb -c 2 -w 1 -q "SEVERE|Exception" -s /tmp/cache/check-log -f /var/log/servicenow/agent-client-collector/acc.log
This command checks for critical and warning levels in the specified log file.
Root User: The usage is similar, allowing for tailored monitoring of root-owned log files.
Key Outcomes
By implementing these checks and policies, ServiceNow customers can:
- Enhance visibility into log file issues, enabling proactive management of system health.
- Receive critical alerts based on defined patterns, facilitating timely interventions.
- Customize monitoring based on specific operational needs, improving overall IT operations management.
Agent Client Collector provides the following policy for Linux log monitoring.
| Type | Check | Description | Usage and Usage Example | Output |
|---|---|---|---|---|
| Event | util.check-logs | Enables monitoring log files owned by a regular user. | Usage:
Usage example: |
CheckLog CRITICAL: 0 warnings, 8 criticals for pattern SEVERE|Exception in log file /var/log/servicenow/agent-client-collector/acc.log |
| Event | util.check-logs-sudo | Enables monitoring log files owned by a root user. | Usage:
Usage example: |
CheckLog CRITICAL: 0 warnings, 8 criticals for pattern SEVERE|Exception in log file /var/log/servicenow/agent-client-collector/acc.log |