Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[microsoft_dhcp] Add DHCP qresult descriptions #7207

Merged
merged 9 commits into from
Aug 2, 2023
Merged

[microsoft_dhcp] Add DHCP qresult descriptions #7207

merged 9 commits into from
Aug 2, 2023

Conversation

nicpenning
Copy link
Contributor

  • Enhancement

What does this PR do?

Today the QResult is stored in the event logs as a number which is usually 6 or 0 which will mean nothing to the end user if they don't understand the correlation.

This PR will add a new field called microsoft.dhcp.result_description to events based on that numerical value of the quarantine result. The event logs contain the mapping for this data and cannot be found in Microsoft's official documentation.

This is from the DHCP event log when it gets created (Notice the QResult Line):

...snipped for brevity...
34	DNS update request failed.as the DNS update request queue limit exceeded.
35	DNS update request failed.
36	Packet dropped because the server is in failover standby role or the hash of the client ID does not match.
50+	Codes above 50 are used for Rogue Server Detection information.

QResult: 0: NoQuarantine, 1:Quarantine, 2:Drop Packet, 3:Probation,6:No Quarantine Information ProbationTime:Year-Month-Day Hour:Minute:Second:MilliSecond.

ID,Date,Time,Description,IP Address,Host Name,MAC Address,User Name, TransactionID, QResult,Probationtime, CorrelationID,Dhcid,VendorClass(Hex),VendorClass(ASCII),UserClass(Hex),UserClass(ASCII),RelayAgentInformation,DnsRegError.
24,07/28/23,00:00:52,Database Cleanup Begin,,,,,0,6,,,,,,,,,0

The mappings are as follows:

      description: Set the QResult description based on numerical value.
      lang: painless
      tag: Add QResult Description
      params:
        "0":
          result_description: NoQuarantine
        "1":
          result_description: Quarantine
        "2":
          result_description: Drop Packet
        "3":
          result_description: Probation
        "6":
          result_description: No Quarantine Information

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.

@nicpenning nicpenning requested a review from a team as a code owner August 1, 2023 16:56
@elasticmachine
Copy link

elasticmachine commented Aug 1, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-08-01T22:56:45.369+0000

  • Duration: 14 min 28 sec

Test stats 🧪

Test Results
Failed 0
Passed 6
Skipped 0
Total 6

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

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.

Should this be added to DHCPv6 as well?

packages/microsoft_dhcp/changelog.yml Outdated Show resolved Hide resolved
@efd6
Copy link
Contributor

efd6 commented Aug 1, 2023

/test

@elasticmachine
Copy link

elasticmachine commented Aug 1, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 100.0% (3/3) 💚 5.0
Classes 100.0% (3/3) 💚 5.0
Methods 100.0% (24/24) 💚 12.923
Lines 98.711% (689/698) 👍 12.448
Conditionals 100.0% (0/0) 💚

nicpenning and others added 2 commits August 1, 2023 17:39
…ipeline/dhcp.yml

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
@nicpenning
Copy link
Contributor Author

Should this be added to DHCPv6 as well?

I didn't have any DHCPv6 logs indicating that this would align with them.

@efd6
Copy link
Contributor

efd6 commented Aug 1, 2023

/test

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.

Thanks

@efd6 efd6 merged commit 2877d7e into elastic:main Aug 2, 2023
4 checks passed
@elasticmachine
Copy link

Package microsoft_dhcp - 1.18.0 containing this change is available at https://epr.elastic.co/search?package=microsoft_dhcp

@nicpenning nicpenning deleted the dhcp-qresult-descriptions branch August 15, 2023 00:36
gizas pushed a commit that referenced this pull request Sep 5, 2023
Currently the QResult is stored in the event logs as a number which is usually
6 or 0 which will mean nothing to the end user if they don't understand the
correlation.

This change will add a new field called microsoft.dhcp.result_description to
events based on that numerical value of the quarantine result. The event logs
contain the mapping for this data and cannot be found in Microsoft's official
documentation.

This is from the DHCP event log when it gets created (Notice the QResult
Line):

...snipped for brevity...
34	DNS update request failed.as the DNS update request queue limit exceeded.
35	DNS update request failed.
36	Packet dropped because the server is in failover standby role or the hash of the client ID does not match.
50+	Codes above 50 are used for Rogue Server Detection information.

QResult: 0: NoQuarantine, 1:Quarantine, 2:Drop Packet, 3:Probation,6:No Quarantine Information ProbationTime:Year-Month-Day Hour:Minute:Second:MilliSecond.

ID,Date,Time,Description,IP Address,Host Name,MAC Address,User Name, TransactionID, QResult,Probationtime, CorrelationID,Dhcid,VendorClass(Hex),VendorClass(ASCII),UserClass(Hex),UserClass(ASCII),RelayAgentInformation,DnsRegError.
24,07/28/23,00:00:52,Database Cleanup Begin,,,,,0,6,,,,,,,,,0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants