Skip to content

[QNAP NAS]: grok fails on Users field with asterisks in user.name parsing - #19177

Merged
vinit-chauhan merged 2 commits into
elastic:mainfrom
vinit-chauhan:fix/18841-in-the-shared-pattern-definition-line-69-74306048
May 28, 2026
Merged

[QNAP NAS]: grok fails on Users field with asterisks in user.name parsing#19177
vinit-chauhan merged 2 commits into
elastic:mainfrom
vinit-chauhan:fix/18841-in-the-shared-pattern-definition-line-69-74306048

Conversation

@vinit-chauhan

Copy link
Copy Markdown
Contributor

Proposed commit message

WHAT: Changed %{USER:user.name} to %{DATA:user.name} in the SHARED grok pattern definition inside the QNAP NAS ingest pipeline (default.yml, line 69). The built-in USER grok pattern matches only [a-zA-Z0-9._-]+, which excludes the asterisk character (*).

WHY: QNAP NAS logs can contain asterisks in the Users field in two real-world scenarios: Active Directory machine account names (e.g., DOMAIN\PC-TEST-0001*) and obfuscated/masked usernames (e.g., **test*ldap***). Any such log line caused the grok processor to fail entirely, dropping the event. Switching to %{DATA} captures any character sequence up to the next delimiter, preserving all surrounding pattern structure while correctly handling these username formats.

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

  • Confirm grok change does not regress any existing test fixtures
  • Confirm new fixtures (AD machine account TESTDOMAIN\PC-TEST-0001* and masked username **test*ldap***testhost-smb-abc123**lower*test**.w.n) are included in expected output

How to test this PR locally

cd packages/qnap_nas
elastic-package test 

Verify that all existing fixtures still pass and the two new fixtures parse user.name (and user.domain where applicable) correctly.

Related issues

Screenshots

N/A — pipeline-only change, no UI or dashboard impact.

…isks; relax user.name capture to allow “*” (masked usernames and AD machine accounts)
@vinit-chauhan
vinit-chauhan requested a review from a team as a code owner May 22, 2026 21:42
@vinit-chauhan vinit-chauhan changed the title fix: #18841 — [QNAP NAS]: grok fails on Users field with asterisks in user.name parsing May 22, 2026
@vinit-chauhan vinit-chauhan self-assigned this May 22, 2026
@vinit-chauhan vinit-chauhan added Integration:qnap_nas QNAP NAS (Community supported) Team:Integration-Experience Security Integrations Integration Experience [elastic/integration-experience] labels May 22, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/integration-experience (Team:Integration-Experience)

@vinit-chauhan vinit-chauhan added the bugfix Pull request that fixes a bug issue label May 22, 2026
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

Package qnap_nas 👍(0) 💚(0) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
log 2624.67 1736.11 -888.56 (-33.85%) 💔

To see the full report comment with /test benchmark fullreport

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

cc @vinit-chauhan

@robester0403 robester0403 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@vinit-chauhan
vinit-chauhan merged commit f7e164b into elastic:main May 28, 2026
8 checks passed
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

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

herrBez pushed a commit to herrBez/integrations that referenced this pull request Jun 1, 2026
…sing (elastic#19177)

* fix: elastic#18841 — [QNAP NAS]: grok fails on Users field with asterisks; relax user.name capture to allow “*” (masked usernames and AD machine accounts)

* Update changelog entry
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:qnap_nas QNAP NAS (Community supported) Team:Integration-Experience Security Integrations Integration Experience [elastic/integration-experience]

3 participants