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

Opster Team

Aug-23, Version: 6.8-6.8

Briefly, this error occurs when Elasticsearch fails to index an audit event due to insufficient permissions, network issues, or a misconfigured audit log. To resolve this, you can check the user’s permissions and ensure they have the necessary rights to index the audit event. If permissions are not the issue, check your network connectivity. Lastly, verify your audit log configuration to ensure it’s set up correctly. If the problem persists, consider increasing the log level to debug for more detailed error messages.

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

Log Context

Log “failed to index audit event: [run_as_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("run_as_granted"; action; authentication.getUser(); roleNames; new Tuple(authRealmName; lookRealmName);
                        null; message); "run_as_granted");
            } catch (final Exception e) {
                logger.warn("failed to index audit event: [run_as_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?