elasticsearch-audit

Configure and query Elasticsearch security audit logs via cluster settings API.

546|44|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/elastic/agent-skills --skill elasticsearch-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elasticsearch-audit
Source: https://github.com/elastic/agent-skills/tree/main/skills/elasticsearch/elasticsearch-audit
Command: npx skills add https://github.com/elastic/agent-skills --skill elasticsearch-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you enable, configure, and query Elasticsearch security audit logs to monitor and investigate security-related events within your cluster.

Core Features & Use Cases

  • Enable/Disable Audit Logging: Turn audit logging on or off via cluster settings.
  • Configure Event Types: Select specific events to record (e.g., authentication failures, access denials) or exclude noisy ones.
  • Filter Policies: Create rules to ignore specific events from certain users, realms, or indices.
  • Query Audit Events: Search for specific security events like failed logins or unauthorized access attempts.
  • Correlate with Kibana: Link Elasticsearch audit events with Kibana audit events using trace.id.
  • Use Case: Investigate a series of failed login attempts by searching audit logs for authentication_failed events within a specific time frame and from a particular IP address.

Quick Start

Enable audit logging and record all failed access and authentication events.

Frequently Asked Questions about elasticsearch-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable Elasticsearch audit logging for security events?

Configure Elasticsearch audit logs through the cluster settings API to enable security event recording. You can dynamically select specific event types such as authentication failures and access denials to monitor for incident investigation.

How do I filter noisy Elasticsearch audit events from specific users or indices?

You can filter Elasticsearch audit events by creating filter policies via cluster settings. This allows you to ignore specific events from designated users, realms, or indices to reduce noise in your audit logs.

Can I output Elasticsearch audit logs to an index instead of a logfile?

Yes, Elasticsearch audit logging supports dynamic configuration of output destinations. You can route your security audit events to either a standard logfile or an Elasticsearch index using the cluster settings API.

How do I investigate failed login attempts in Elasticsearch using audit logs?

Query Elasticsearch audit logs for authentication_failed events to investigate failed login attempts. You can filter these security events by specific time frames and IP addresses for targeted incident investigation.

How do I correlate Elasticsearch audit logs with Kibana audit logs?

You can correlate Elasticsearch and Kibana audit logs using trace.id. This shared identifier links security events across both platforms to provide a comprehensive view of security incidents.