Skip to content

Commit

Permalink
moving hosts line out of function
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Feb 24, 2020
1 parent f4d37ff commit a58c891
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function createFilebeatConfig(
'',
...getProcessors(results),
'output.elasticsearch:',
...getHosts(),
' hosts:["<es_url>"]',
...getUserDetails(username),
` index: "${index}"`,
` pipeline: "${ingestPipelineId}"`,
Expand Down Expand Up @@ -55,10 +55,6 @@ function getProcessors(results: any) {
return results.need_client_timezone === true ? ['processors:', '- add_locale: ~', ''] : [];
}

function getHosts() {
return [' hosts:["<es_url>"]'];
}

function getUserDetails(username: string | null) {
if (username !== null) {
return [` username: "${username}"`, ' password: "<password>"'];
Expand Down

0 comments on commit a58c891

Please sign in to comment.