get_alerts
Retrieve and filter OSSEC security alerts by severity, group, time range, or keyword. Use to analyze security incidents.
Instructions
Retrieve recent OSSEC security alerts with optional filtering.
Args: limit: Maximum number of alerts to return (default: 50, max: 500). level_min: Minimum alert severity level (0-16). Level 0 = ignored, 3 = successful events, 5 = user errors, 7 = bad words, 10 = multiple failures, 12 = high importance, 15 = severe. level_max: Maximum alert severity level (0-16). group: Filter by rule group (e.g., 'syslog', 'sshd', 'authentication_failed'). search: Free-text search across alert content. time_range: Time range filter. Examples: '1h' (last hour), '24h' (last day), '7d' (last week), '30m' (last 30 minutes).
Returns: JSON array of alert objects containing timestamp, rule info, agent details, etc.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| level_min | No | ||
| level_max | No | ||
| group | No | ||
| search | No | ||
| time_range | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |