Skip to content

Conversation

muthu-mps
Copy link
Contributor

@muthu-mps muthu-mps commented Apr 7, 2025

  • Bug

Proposed commit message

Add a new field region_name to map the location.state data to this field. Initially this was mapped to country_name which is not appropriate.

Added script to drop the null/empty values in the document and updated with more descriptive on_failure error message.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

Install the integration and verify the signin logs captures the state in region_name field instead of country_name.

@muthu-mps muthu-mps self-assigned this Apr 7, 2025
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@muthu-mps muthu-mps marked this pull request as ready for review April 7, 2025 09:19
@muthu-mps muthu-mps requested review from a team as code owners April 7, 2025 09:19
@muthu-mps muthu-mps requested a review from zmoog April 7, 2025 09:19
@andrewkroh andrewkroh added Integration:azure Azure Logs Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] labels Apr 7, 2025
@muthu-mps muthu-mps added the bugfix Pull request that fixes a bug issue label Apr 7, 2025
Copy link
Contributor

@zmoog zmoog left a comment

Choose a reason for hiding this comment

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

LGTM

Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
@muthu-mps
Copy link
Contributor Author

/test

@agithomas
Copy link
Contributor

@muthu-mps , could you check the dependency of the removed field on the dashboard, especially :

kibana/dashboard/azure-91224490-f1a6-11ec-a5a8-bf965bcd5646.json ?

@agithomas
Copy link
Contributor

Suggestion:

I understand that the field geo.country_name is having the value intended for the geo.region_name.

As with the case mentioned here, to minimize the impact, do you want to consider first deprecating the field geo.country_name and then later removing this field?

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
69.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @muthu-mps

@muthu-mps
Copy link
Contributor Author

@muthu-mps , could you check the dependency of the removed field on the dashboard, especially :

kibana/dashboard/azure-91224490-f1a6-11ec-a5a8-bf965bcd5646.json ?

  • The file which you have pointed above has a valid reference which is either source.geo.country_name or destination.geo.name.

  • I was checking the dashboard and found the geo.country_name field reference in the Caller IP table chart of the Activity logs data stream in this dashboard kibana/dashboard/azure-87095750-f05a-11e9-90ec-112a988266d5.

This is not related to the sign-in logs data stream.

Do we have similar filed mapping issue for activity logs?

While looking into the ingest processor there is no incorrect mapping to the state field. Eventually, we need to revisit the activity logs data stream as well but not as part of this PR.

Screenshot 2025-04-10 at 1 41 53 PM

@muthu-mps
Copy link
Contributor Author

Suggestion:

I understand that the field geo.country_name is having the value intended for the geo.region_name.

As with the case mentioned here, to minimize the impact, do you want to consider first deprecating the field geo.country_name and then later removing this field?

I am not sure that we can remove this field. This is kept for backward compatibility as mentioned here.

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

LGTM for security-service-integrations owned files.

Copy link
Contributor

@agithomas agithomas left a comment

Choose a reason for hiding this comment

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

LGTM!

@muthu-mps muthu-mps merged commit 27d5cd9 into elastic:main Apr 11, 2025
6 of 7 checks passed
@muthu-mps muthu-mps deleted the fix_signin_logs_country_mapping branch April 11, 2025 07:28
@elastic-vault-github-plugin-prod

Package azure - 1.23.1 containing this change is available at https://epr.elastic.co/package/azure/1.23.1/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Pull request that fixes a bug issue Integration:azure Azure Logs Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants