Audit Logging Issue


I made an entry in the elasticsearch.yml file : true

After this i am able to see the logs in the elasticsearch_access.log

Again i edited the elasticsearch.yml file and made the following entry to log the index to a particular log file: true [ aircel-db, airceldblogger_access.log ]

Now the Elasticsearch itself is not starting, it is crashing with the following error:

2017-07-05T15:38:37,233][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [] fatal error in thread [main], exiting
java.lang.Error: security initialization failed
        at org.elasticsearch.xpack.XPackPlugin.createComponents( ~[?:?]
        at org.elasticsearch.node.Node.lambda$new$7( ~[elasticsearch-5.4.0.jar:5.4.0]
        at$7$1.accept( ~[?:1.8.0_121]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining( ~[?:1.8.0_121]
        at ~[?:1.8.0_121]
        at ~[?:1.8.0_121]
        at$ReduceOp.evaluateSequential( ~[?:1.8.0_121]
        at ~[?:1.8.0_121]
        at ~[?:1.8.0_121]
        at org.elasticsearch.node.Node.<init>( ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.node.Node.<init>( ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Bootstrap$6.<init>( ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup( ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Bootstrap.init( ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init( ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.bootstrap.Elasticsearch.execute( ~[elasticsearch-5.4.0.jar:5.4.0]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute( ~[elasticsearch-5.4.0.jar:5.4.0]

Please help me in resolving this issue..... Thanks in advance..

Those are not valid options for the audit outputs setting.

From the documentation [ index, logfile ]

The allowable values are literally index and logfile.
You cannot specify an index name or file name in that setting, you just specify whether you want to output your audit records to an index, a logfile, or both.

Thanks Tim.... for confirming.
But how should i log for a particular index in a particular log file?

Eg: [ aircel-db, airceldblogger_access.log ]

I want to log "aricel-db" index to a "airceldblogger_access.log" log file.

Could you please suggest me on this.

It is not possible to explicitly configure X-Pack to audit to different locations based on the index - many of the audit records are not index specific.

If you want to write all audit records to a specific file then from the documentation:

Thanks Tim for reply and suggestion.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.