Right configuration to send email (SES) alerts in ELK

Hello,

I'm trying to configure email notification alerts from Elasticsearch using SES SMTP server.

Elasticsearch version: 7.4.2

Configuration:

volumeMounts:
     - name: keystore
              mountPath: /usr/share/elasticsearch/config/elasticsearch.keystore
              subPath: elasticsearch.keystore
volumes:
    - name: keystore
          secret:
            secretName: elastic-keystore

I have created a secret:

kubectl create secret generic elastic-keystore --from-literal=xpack.notification.email.account.ses_account.smtp.secure_password=xxxx

and currently facing error:

Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Is a directory: SimpleFSIndexInput(path="/usr/share/elasticsearch/config/elasticsearch.keystore")
Likely root cause: java.io.IOException: Is a directory
        at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method)
        at java.base/sun.nio.ch.FileDispatcherImpl.read(FileDispatcherImpl.java:48)
        at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276)
        at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:245)
        at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:223)
        at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.readInternal(SimpleFSDirectory.java:178)
        at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:342)
        at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:54)
        at org.apache.lucene.store.BufferedChecksumIndexInput.readByte(BufferedChecksumIndexInput.java:41)
        at org.apache.lucene.store.DataInput.readInt(DataInput.java:101)
        at org.apache.lucene.codecs.CodecUtil.checkHeader(CodecUtil.java:194)
        at org.elasticsearch.common.settings.KeyStoreWrapper.load(KeyStoreWrapper.java:223)
        at org.elasticsearch.bootstrap.Bootstrap.loadSecureSettings(Bootstrap.java:234)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:305)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)

Not sure where I'm going wrong, could any help me resolve this ?

Thanks,
Vin.

The error message simple says:

is a directory rather than a simple file.

But I believe /usr/share/elasticsearch/config/elasticsearch.keystore is supposed to be file, if not what could be the correct configuration ?

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