Skip to content

Conversation

@Utkarsh-Aga
Copy link
Contributor

Description

Adds a logging in case there are no matching indices. Have added a Noisy marker also, as this log can appear multiple times due to Partition Creation

Issues Resolved

Resolves #6341

Check List

  • [ ] New functionality includes testing.
  • [] New functionality has a documentation issue. Please link to it in this PR.
    • [ ] New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

}
}
if (matchCount == 0) {
LOG.info(NOISY, "No indices matched the configured regex patterns after applying include/exclude filters");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a warn log?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially thought to have it at warn level, but then thought since the include_name_regex and exclude_name_regex are user configured, so this log line just provides a information that based on the filters there are no matching index, hence kept it at INFO level. I am open to suggestion, if we should move it to warn log ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Utkarsh-Aga , Do you think there is particular value in running this without finding any indexes? We generally use WARN level for configuration problems in the pipeline. This seems like it would indicate that the user configured their pipeline incorrectly to me.

@graytaylor0 , Any thoughts on this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do lean towards agreeing with @dlvenable here. It's unlikely someone would configure a pipeline that has no existing indexes matching the pattern on startup.

Technically, they could have a new index get created that matches the pattern after the pipeline starts, but we would then process an empty or near empty index since it's a one-time migration via point in time. Either way, if someone intends that, then WARN can't hurt. It is far more likely that someone misconfigures the pattern.

@dlvenable
Copy link
Member

@Utkarsh-Aga , Let's change the log level to WARN. You can keep the metrics as-is since we have another metric we can use here.

Signed-off-by: Utkarsh Agarwal <126544832+Utkarsh-Aga@users.noreply.github.com>
@Utkarsh-Aga
Copy link
Contributor Author

Okay sure, I have updated the log level to warn

Copy link
Member

@dlvenable dlvenable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Utkarsh-Aga !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Logging for OpenSearch Source when there are no matching indices.

3 participants