{"id":1651,"date":"2022-05-12T20:12:50","date_gmt":"2022-05-13T00:12:50","guid":{"rendered":"https:\/\/enterpriseadmins.org\/blog\/?p=1651"},"modified":"2022-05-12T20:12:50","modified_gmt":"2022-05-13T00:12:50","slug":"uncovering-missing-active-directory-subnets-with-vrealize-log-insight","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/virtualization\/uncovering-missing-active-directory-subnets-with-vrealize-log-insight\/","title":{"rendered":"Uncovering missing Active Directory subnets with vRealize Log Insight"},"content":{"rendered":"\n<p>In a recent post (<a href=\"https:\/\/enterpriseadmins.org\/blog\/virtualization\/domain-controllers-and-micro-segmentation\/\">https:\/\/enterpriseadmins.org\/blog\/virtualization\/domain-controllers-and-micro-segmentation\/<\/a>) I described an issue where authentication may not work as desired when Active Directory sites and Services Subnets are not properly defined.  There is often a disconnect in large enterprises where network\/subnet creation and active directory aren&#8217;t managed by the same folks, so occurrences like the one I described are all too common.  I remember many years ago writing a VBScript that parsed a log file to try and find new networks so that we could create subnet definitions.  I decided to see what new options existed in this space and was surprised to see that things were mostly unchanged.  <\/p>\n\n\n\n<p>Active Directory authentications from clients without subnets defined are still logged to <code>C:\\WINDOWS\\Debug\\netlogon.log<\/code> all these years later.  This file contains entries such as:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">05\/12 21:28:11 [6772] LAB: NO_CLIENT_SITE: EUC-VIEWCS-21 192.168.36.50<\/pre>\n\n\n\n<p>This suggests that the subnet I use for VDI Management VMs is not mapped to a site in AD Sites and Services through a properly defined subnet.  In this case I know that the network 192.168.36.0\/24 should map to my <code>US-East-IN<\/code> site in Active Directory.  This is an easy fix, but in dynamic environments something similar is going to happen again.  <\/p>\n\n\n\n<p>The old VBScript would still work to parse this file, and I could run that as a scheduled task, and occasionally look for these types of events.  However, thanks to vRealize Log Insight, I have better ways to deal with log files in my lab these days.  All of the systems deployed in my lab run the <a href=\"https:\/\/docs.vmware.com\/en\/vRealize-Log-Insight\/8.8\/com.vmware.log-insight.agent.admin.doc\/GUID-636EFA8D-B063-46FE-A192-36450954E218.html\">Log Insight agent<\/a>, which can be used to pickup this file.  I already have a custom <a href=\"https:\/\/docs.vmware.com\/en\/vRealize-Log-Insight\/8.8\/com.vmware.log-insight.administration.doc\/GUID-B66C4B7E-6382-4CAB-B4E0-E1D9C4076981.html\">Agent Group<\/a> for my domain controllers, so I can just edit its configuration so that it also picks up the file.  To do this, I browse to Management > Agents > select the group &#8220;Domain Controllers&#8221; > File Logs > New and create an entry for the path in question:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"668\" height=\"236\" src=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image.png\" alt=\"\" class=\"wp-image-1653\" srcset=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image.png 668w, https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-300x106.png 300w\" sizes=\"auto, (max-width: 668px) 100vw, 668px\" \/><\/a><\/figure>\n\n\n\n<p>As you can see, we are looking in the <code>C:\\Windows\\Debug\\<\/code> directory, specifically for one file named <code>netlogon.log<\/code>.  After adding this entry I selected &#8216;Save Agent Group&#8217;.  After a couple of minutes I searched Interactive Logs for <code>no_client_site<\/code> and had a few hits.  This works well, but what I really want to see is which clients are showing up without needing to parse through all of these individual rows.  To help with this I can make a custom dashboard based off an extracted field.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Extracted Field<\/h3>\n\n\n\n<p>I can see that the data I want is right there at the end of the string, so I can highlight the text and click &#8216;Extract field&#8217;.  This brings up a &#8216;Manage Fields&#8217; screen in the right navigation.  By default, the wizard knows that I want to extract an IP Address, but it thinks I only want the one that comes after a specific hostname:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"250\" height=\"306\" src=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-1.png\" alt=\"\" class=\"wp-image-1654\" srcset=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-1.png 250w, https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-1-245x300.png 245w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/figure>\n\n\n\n<p>I can simply change this from <code>EUC\\-VIEWCS\\-21<\/code> to <code> <\/code> (a single space) and it automatically highlights all the entries, not just this one.  I can name the field and select save.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Custom Dashboard<\/h3>\n\n\n\n<p>From the explore logs view, I queried for <code>no_client_site<\/code> I changed the dashboard selections at the top to &#8216;Count of events&#8217; and grouped by &#8216;WinDebug_NoClientSite_IP&#8217; which is the name of the extracted field from above.  This resulted in a bar graph by the authenticating client where I could easily see the handful of interesting clients.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"245\" src=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-2-1024x245.png\" alt=\"\" class=\"wp-image-1655\" srcset=\"https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-2-1024x245.png 1024w, https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-2-300x72.png 300w, https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-2-768x184.png 768w, https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-2-1200x287.png 1200w, https:\/\/enterpriseadmins.org\/blog\/wp-content\/uploads\/2022\/05\/image-2.png 1304w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>In the top right of this visual is an &#8216;Add to Dashboard&#8217; button.  I used that button to add this newly created chart to a &#8216;Active Directory &#8211; Custom&#8217; dashboard that I have started.<\/p>\n\n\n\n<p>I now have a visual that will show me the clients that are in subnets not mapped to an Active Directory site.  Once I research these subnets and get them properly defined this query should return no results &#8212; until the next time a network is created.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a recent post (https:\/\/enterpriseadmins.org\/blog\/virtualization\/domain-controllers-and-micro-segmentation\/) I described an issue where authentication may not work as desired when Active Directory sites and Services Subnets are not properly defined. There is often a disconnect in large enterprises where network\/subnet creation and active &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/virtualization\/uncovering-missing-active-directory-subnets-with-vrealize-log-insight\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9,4],"tags":[],"class_list":["post-1651","post","type-post","status-publish","format-standard","hentry","category-lab-infrastructure","category-virtualization"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/comments?post=1651"}],"version-history":[{"count":2,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1651\/revisions"}],"predecessor-version":[{"id":1656,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1651\/revisions\/1656"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=1651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=1651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=1651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}