Skip to content

Commit

Permalink
get the indexPatternName for the ML job from the set of user-definned…
Browse files Browse the repository at this point in the history
… indices
  • Loading branch information
ogupte committed Jul 6, 2020
1 parent 2dca952 commit 12c55d0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function createAnomalyDetectionJobs(
environments: string[],
logger: Logger
) {
const { ml, config } = setup;
const { ml, indices } = setup;
if (!ml) {
logger.warn('Anomaly detection plugin is not available.');
return [];
Expand All @@ -46,7 +46,7 @@ export async function createAnomalyDetectionJobs(
`Creating ML anomaly detection jobs for environments: [${environments}].`
);

const indexPatternName = config['apm_oss.transactionIndices']; // TODO [ML] - Do we want to use the config index name?
const indexPatternName = indices['apm_oss.transactionIndices'];
const responses = await Promise.all(
environments.map((environment) =>
createAnomalyDetectionJob({ ml, environment, indexPatternName })
Expand Down

0 comments on commit 12c55d0

Please sign in to comment.