Failed to index audit event access granted – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-6.8

Briefly, this error occurs when Elasticsearch is unable to index an audit event named “accessgranted”. This could be due to a variety of reasons such as insufficient permissions, incorrect index settings, or network issues. To resolve this, you can check the permissions of the Elasticsearch user, verify the index settings, or troubleshoot network connectivity. Additionally, ensure that the Elasticsearch cluster has enough resources to handle the indexing operation.

This guide will help you check for common problems that cause the log ” Failed to index audit event: [access_granted] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index and plugin.

Log Context

Log “Failed to index audit event: [access_granted]” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                 final String lookRealmName = authentication.getLookedUpBy() == null ? null : authentication.getLookedUpBy().getName();
                final String[] roleNames = (String[]) authorizationInfo.asMap().get(LoggingAuditTrail.PRINCIPAL_ROLES_FIELD_NAME);
                enqueue(message("access_granted"; action; user; roleNames; new Tuple(authRealmName; lookRealmName); indices(msg);
                        msg); "access_granted");
            } catch (final Exception e) {
                logger.warn("failed to index audit event: [access_granted]"; e);



How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?