Failed to index audit event run as denied – 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 named “runasdenied”. This could be due to insufficient permissions, a misconfigured audit log, or a problem with the index itself. To resolve this issue, you can check and adjust the permissions of the user trying to index the event, ensure the audit log is properly configured, or check the health of the index and fix any issues found. 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: [run_as_denied] ” 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: [run_as_denied]” classname is IndexAuditTrail.java.
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_denied"; action; authentication.getUser(); roleNames; new Tuple(authRealmName; lookRealmName);
                        null; message); "run_as_denied");
            } catch (final Exception e) {
                logger.warn("failed to index audit event: [run_as_denied]"; e);
            }
        }
    }

    
Override



 

 [ratemypost]