provide credentials by passing the username and password parameters for elastic user
rezacloner1372 opened this issue · 0 comments
rezacloner1372 commented
how can I provide a username and password in my code? I don't find anything related to this
if (_.get(logConfig, 'elastic.enable')) {
const Elasticsearch = require('bunyan-elasticsearch')
const {Client} = require('elasticsearch')
const client = new Client({host: logConfig.elastic.host})
const {myindexMapping} = require('./util/mapping')
const esStream = new Elasticsearch({
indexPattern: '[myindex-]YYYY.MM.DD',
type: 'logs',
host: logConfig.elastic.host
})