parent
ceefb71657
commit
92fe43991b
Binary file not shown.
|
After Width: | Height: | Size: 864 B |
@ -0,0 +1,89 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
& .\Invoke-MonitoredScript.ps1 "MyScript.ps1"
|
||||
|
||||
.DESCRIPTION
|
||||
Outputs additional Splunk events related to the running and
|
||||
errors in the script.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
#Command to execute.
|
||||
[Parameter(Position=0, Mandatory=$true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $Command,
|
||||
|
||||
# Splunk Sourcetype Prefix for generated events
|
||||
[Parameter()]
|
||||
[ValidateNotNull()]
|
||||
[string] $SourceTypePrefix="Powershell:",
|
||||
|
||||
# Maximum number of errors to convert into events
|
||||
[Parameter()]
|
||||
[ValidateRange(0, 100)]
|
||||
[int] $MaxErrorCount
|
||||
)
|
||||
|
||||
$WrappedScriptExecutionSummary= New-Object -TypeName PSObject -Property (
|
||||
[ordered]@{
|
||||
SplunkSourceType="$($SourceTypePrefix)ScriptExecutionSummary";
|
||||
Identity=[guid]::NewGuid().ToString();
|
||||
InvocationLine=$MyInvocation.Line;
|
||||
TerminatingError=$false; ErrorCount=0; Elapsed=""
|
||||
})
|
||||
$originalLocation = Get-Location
|
||||
|
||||
try
|
||||
{
|
||||
Set-Location (Split-Path -Parent $MyInvocation.MyCommand.Definition)
|
||||
$ScriptStopWatch = [System.Diagnostics.Stopwatch]::StartNew()
|
||||
$Error.Clear()
|
||||
Invoke-Expression $Command
|
||||
}
|
||||
catch
|
||||
{
|
||||
$WrappedScriptExecutionSummary.TerminatingError = $true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Set-Location $originalLocation
|
||||
$WrappedScriptExecutionSummary.Elapsed = $ScriptStopWatch.Elapsed.ToString("hh\:mm\:ss\.fff")
|
||||
$WrappedScriptExecutionSummary.ErrorCount = $Error.Count
|
||||
|
||||
if ($Error.Count -gt 0) {
|
||||
$ei = $Error.Count - 1
|
||||
if ($PSBoundParameters.ContainsKey('MaxErrorCount')) {
|
||||
if ($MaxErrorCount -lt $Error.Count) {
|
||||
$ei = $MaxErrorCount - 1
|
||||
}
|
||||
# Always emit terminating errors
|
||||
if ($ei -eq -1 -and $WrappedScriptExecutionSummary.TerminatingError) {
|
||||
$ei = 1
|
||||
}
|
||||
}
|
||||
|
||||
for(; $ei -ge 0; $ei--) {
|
||||
$errorRecord = New-Object -TypeName PSObject -Property (
|
||||
[ordered]@{
|
||||
SplunkSourceType="$($SourceTypePrefix)ScriptExecutionErrorRecord";
|
||||
ParentIdentity=$WrappedScriptExecutionSummary.Identity;
|
||||
ErrorIndex=$ei;
|
||||
ErrorMessage=$Error[$ei].ToString();
|
||||
PositionMessage=$Error[$ei].InvocationInfo.PositionMessage;
|
||||
CategoryInfo=$Error[$ei].CategoryInfo.ToString();
|
||||
FullyQualifiedErrorId=$Error[$ei].FullyQualifiedErrorId
|
||||
})
|
||||
|
||||
if ($Error[$ei].Exception -ne $null) {
|
||||
Add-Member -InputObject $errorRecord -MemberType NoteProperty -Name Exception -Value $Error[$ei].Exception.ToString()
|
||||
if ($Error[$ei].Exception.InnerException -ne $null) {
|
||||
Add-Member -InputObject $errorRecord -MemberType NoteProperty -Name InnerException -Value $Error[$ei].Exception.InnerException.ToString()
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output $errorRecord
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output $WrappedScriptExecutionSummary
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
Import-Module ActiveDirectory -ErrorAction SilentlyContinue
|
||||
|
||||
$ServerName = $env:ComputerName
|
||||
|
||||
$DomainController = Get-ADDomainController -Identity $ServerName
|
||||
$Domain = Get-ADDomain -Identity $DomainController.Domain
|
||||
$Forest = Get-ADForest -Identity $DomainController.Forest
|
||||
$ReplicationSite = Get-ADReplicationSite -Identity $DomainController.Site
|
||||
$Computer = Get-ADComputer -Identity $ServerName -Properties *
|
||||
$RootDSE = Get-ADRootDSE -Server $ServerName
|
||||
$RequiredServices = @( "ntfrs", "dfsr", "netlogon", "kdc", "w32time", "ismserv" )
|
||||
|
||||
$ISTG = ($DomainController.NTDSSettingsObjectDN -eq $ReplicationSite.InterSiteTopologyGenerator)
|
||||
$SYSVOL = (Get-SMBShare SYSVOL -ErrorAction SilentlyContinue)
|
||||
Try {
|
||||
$DnsRegister = [System.Net.Dns]::GetHostByName($DomainController.HostName)
|
||||
} Catch {
|
||||
# The Catch will set $DnsRegister = $null if the GetHostByName fails for some reason
|
||||
}
|
||||
$SchemaVersion= Get-ADObject -Filter * -SearchScope Base -Properties objectVersion `
|
||||
-SearchBase $RootDSE.schemaNamingContext
|
||||
$DCWeight = (Get-Item "HKLM:System\CurrentControlSet\Services\Netlogon\Parameters").GetValue("LdapSrvWeight", $null)
|
||||
if (!$DCWeight -or $DCWeight -eq $null -or $DCWeight -eq "") {
|
||||
$DCWeight = 100
|
||||
}
|
||||
$FSMORoles = ($DomainController | Select -Expand OperationMasterRoles | %{ $_.ToString().Replace("Master","") } )
|
||||
|
||||
$SvcRunning = @(Get-Service $RequiredServices | ? Status -eq "Running" | select -expand Name)
|
||||
$SvcStopped = @(Get-Service $RequiredServices | ? Status -ne "Running" | select -expand Name)
|
||||
$ProcsOK = (($SvcStopped.Count -eq 0) -or ($SvcStopped.Count -eq 1 -and ($SvcStopped[0] -eq "ntfrs" -or $SvcStopped[0] -eq "dfsr")))
|
||||
|
||||
New-Object PSObject -Property @{
|
||||
Server = $DomainController.Name
|
||||
DomainDNSName = $DomainController.Domain
|
||||
DomainNetBIOSName = $Domain.NetBIOSName
|
||||
DomainLevel = $Domain.DomainMode
|
||||
Site = $DomainController.Site
|
||||
ForestName = $DomainController.Forest
|
||||
ForestLevel = $Forest.ForestMode
|
||||
Created = $Computer.whenCreated
|
||||
Changed = $Computer.whenChanged
|
||||
GlobalCatalog = $DomainController.IsGlobalCatalog
|
||||
RODC = $DomainController.IsReadOnly
|
||||
Enabled = $DomainController.Enabled
|
||||
HighestUSN = $RootDSE.highestCommittedUSN
|
||||
SchemaVersion = $SchemaVersion.objectVersion
|
||||
DCWeight = $DCWeight
|
||||
IsIntersiteTopologyGenerator = $ISTG
|
||||
OperatingSystem = $DomainController.OperatingSystem
|
||||
ServicePack = $DomainController.OperatingSystemServicePack
|
||||
OSVersion = $DomainController.OperatingSystemVersion
|
||||
FSMORoles = $FSMORoles -join " "
|
||||
ServicesRunning = $SvcRunning -join ","
|
||||
ServicesNotRunning = $SvcStopped -join ","
|
||||
ProcsOK = $ProcsOK
|
||||
SYSVOLShare = ($SYSVOL -ne $null)
|
||||
DNSRegister = ($DnsRegister -ne $null)
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
Import-Module ActiveDirectory -ErrorAction SilentlyContinue
|
||||
|
||||
Get-ADReplicationPartnerMetaData -Target $env:ComputerName -PartnerType Inbound -Partition * | %{
|
||||
$src_host = Get-ADObject -Filter * -SearchBase $_.Partner.Replace("CN=NTDS Settings,","") `
|
||||
-SearchScope Base -Properties dNSHostName
|
||||
|
||||
New-Object PSObject -Property @{
|
||||
LastAttemptedSync = $_.LastReplicationAttempt
|
||||
LastSuccessfulSync = $_.LastReplicationSuccess
|
||||
type = "ReplicationEvent"
|
||||
usn = $_.LastChangeUsn
|
||||
src_host = $src_host.dNSHostName
|
||||
Result = $_.LastReplicationResult
|
||||
transport = $_.IntersiteTransportType
|
||||
naming_context = $_.Partition
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
Import-Module ActiveDirectory -ErrorAction SilentlyContinue
|
||||
#
|
||||
# Get the Information about this site
|
||||
#
|
||||
$ServerName = $env:ComputerName
|
||||
|
||||
$DC = Get-ADDomainController -Identity $ServerName
|
||||
$Site = Get-ADReplicationSite -Identity $DC.Site
|
||||
$Object = Get-ADObject -Filter * -SearchScope base -Properties * `
|
||||
-SearchBase $Site.DistinguishedName
|
||||
|
||||
$Location = if ($Object.location -eq $null) { "" } else { $Object.location }
|
||||
$ISTG = Get-ADDomainController -Filter `
|
||||
'NTDSSettingsObjectDN -eq $Site.IntersiteTopologyGenerator'
|
||||
$SiteLinks = Get-ADReplicationSiteLink -Filter 'SitesIncluded -eq $Site' -Properties *
|
||||
$AdjacentSites = ($SiteLinks | Select -Expand SitesIncluded | `
|
||||
Where-Object { $_ -ne $Site.DistinguishedName } | `
|
||||
Sort-Object | Get-Unique | `
|
||||
Foreach-Object { Get-ADReplicationSite $_ } )
|
||||
$Subnets = Get-ADReplicationSubnet -Filter 'Site -eq $Site'
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# SITE
|
||||
#
|
||||
$SiteInfo = @(
|
||||
"Type=`"Site`""
|
||||
"ForestName=`"$($DC.Forest)`""
|
||||
"Site=`"$($Object.CN)`""
|
||||
"Location=`"$Location`""
|
||||
"IntersiteTopologyGenerator=`"$($ISTG.HostName)`""
|
||||
)
|
||||
$AdjacentSites | %{ $SiteLink += "AdjacentSite=`"$($_.Name)`"" }
|
||||
$SiteLinks | %{ $SiteInfo += "SiteLink=`"$($_.Name)`"" }
|
||||
$Subnets | %{ $SiteInfo += "Subnet=`"$($_.Name)`"" }
|
||||
Write-Output ($SiteInfo -join " ")
|
||||
#
|
||||
########################################################################
|
||||
#
|
||||
# SITELINK
|
||||
#
|
||||
$SiteLinks | %{
|
||||
# These values are not stored in the object unless you change them
|
||||
$cost = if ($_.Cost -eq $null) { 100 } else { $_.Cost }
|
||||
$options = if ($_.options -eq $null) { 0 } else { $_.options }
|
||||
$replInterval = if ($_.replInterval -eq $null) { 180 * 60 } else { $_.replInterval * 60 }
|
||||
$notifications = if ($options -band 0x01) { "True" } else { "False" }
|
||||
$reciprocal = if ($options -band 0x02) { "True" } else { "False" }
|
||||
$compression = if ($options -band 0x04) { "False" } else { "True" }
|
||||
|
||||
$SiteLink = @(
|
||||
"Type=`"SiteLink`""
|
||||
"ForestName=`"$($DC.Forest)`""
|
||||
"Name=`"$($_.Name)`""
|
||||
"Cost=`"$($_.Cost)`""
|
||||
"DataCompressionEnabled=$compression"
|
||||
"NotificationEnabled=$notifications"
|
||||
"ReciprocalReplicationEnabled=$reciprocal"
|
||||
"TransportType=$($_.InterSiteTransportProtocol)"
|
||||
"ReplicationIntervalSecs=$replInterval"
|
||||
)
|
||||
Write-Output ($SiteLink -join " ")
|
||||
}
|
||||
|
||||
$Subnets | Foreach-Object {
|
||||
$Subnet = @(
|
||||
"Type=`"Subnet`""
|
||||
"ForestName=`"$($DC.Forest)`""
|
||||
"Name=`"$($_.Name)`""
|
||||
"Site=`"$($Site.Name)`""
|
||||
"Location=`"$($_.Location)`""
|
||||
)
|
||||
Write-Output ($Subnet -join " ")
|
||||
}
|
||||
@ -0,0 +1,170 @@
|
||||
#
|
||||
# Determine the health and statistics of this Active Directory Controller
|
||||
#
|
||||
$Output = New-Object System.Collections.ArrayList
|
||||
$Date = Get-Date -format 'yyyy-MM-ddTHH:mm:sszzz'
|
||||
[void]$Output.Add($Date)
|
||||
|
||||
# Name of Server
|
||||
$ServerName = $env:ComputerName
|
||||
[void]$Output.Add("Server=""$ServerName""")
|
||||
$BSSN = "\\" + $ServerName
|
||||
|
||||
# Domain Information
|
||||
|
||||
$S_DS_AD_DOM = [System.DirectoryServices.ActiveDirectory.Domain]::getComputerDomain()
|
||||
$WMI_CS = (Get-WmiObject Win32_ComputerSystem)
|
||||
$WMI_DOMAIN = Get-WmiObject Win32_NTDomain | Where-Object {$_.DomainControllerName -eq $BSSN}
|
||||
|
||||
$DomainDNSName = $WMI_CS.Domain
|
||||
$DomainNetBIOSName = $WMI_DOMAIN.DomainName
|
||||
$DomainLevel = $S_DS_AD_DOM.DomainMode
|
||||
[void]$Output.Add("DomainDNSName=`"$DomainDNSName`"");
|
||||
[void]$Output.Add("DomainNetBIOSName=`"$DomainNetBIOSName`"");
|
||||
[void]$Output.Add("DomainLevel=`"$DomainLevel`"");
|
||||
|
||||
# Site Information
|
||||
$SiteName = $WMI_DOMAIN.ClientSiteName
|
||||
[void]$Output.Add("Site=`"$SiteName`"");
|
||||
|
||||
# Forest Information
|
||||
$ForestName = $S_DS_AD_DOM.Forest.Name
|
||||
$ForestLevel = $S_DS_AD_DOM.Forest.ForestMode
|
||||
[void]$Output.Add("ForestName=`"$ForestName`"");
|
||||
[void]$Output.Add("ForestLevel=`"$ForestLevel`"");
|
||||
|
||||
# Domain Controller Flags
|
||||
$IsRO = "False"
|
||||
$IsEnabled = "False"
|
||||
$IsGC = "False"
|
||||
$USN = "Unknown"
|
||||
$MyName = ($env:ComputerName + "." + $DomainDNSName).ToLower()
|
||||
if ($WMI_DOMAIN.Status -eq "OK") {
|
||||
$MyDC = $S_DS_AD_DOM.DomainControllers | Where-Object { $_.Name.ToLower() -eq $MyName.ToLower() }
|
||||
if ($MyDC) {
|
||||
if ($MyDC.IsGlobalCatalog()) {
|
||||
$IsGC = "True"
|
||||
}
|
||||
$USN = $MyDC.HighestCommittedUsn
|
||||
$IsEnabled = "True"
|
||||
|
||||
$entry = $MyDC.getDirectoryEntry()
|
||||
[void]$Output.Add("Created=`"$($entry.whenCreated)`"")
|
||||
[void]$Output.Add("Changed=`"$($entry.whenChanged)`"")
|
||||
|
||||
$DN = $entry.Path
|
||||
$ServerEntry = [ADSI]"$DN"
|
||||
$ServerEntry.GetInfoEx(@("msDS-IsRODC"),0)
|
||||
$IsRO = $ServerEntry."msDS-IsRODC"
|
||||
}
|
||||
}
|
||||
[void]$Output.Add("GlobalCatalog=`"$IsGC`"")
|
||||
[void]$Output.Add("RODC=`"$IsRO`"")
|
||||
[void]$Output.Add("Enabled=`"$IsEnabled`"")
|
||||
[void]$Output.Add("HighestUSN=`"$USN`"")
|
||||
|
||||
$SchemaInfo = Get-Item "HKLM:System\CurrentControlSet\Services\NTDS\Parameters"
|
||||
$SchemaVersion = $SchemaInfo.GetValue("Schema Version")
|
||||
[void]$Output.Add("SchemaVersion=$SchemaVersion")
|
||||
|
||||
$NetLogonParams = Get-Item "HKLM:System\CurrentControlSet\Services\Netlogon\Parameters"
|
||||
$DCWeight = $NetLogonParams.GetValue("LdapSrvWeight", $null)
|
||||
if (!$DCWeight -or $DCWeight -eq $null -or $DCWeight -eq "") {
|
||||
$DCWeight = 100 # This is the default value
|
||||
}
|
||||
[void]$Output.Add("DCWeight=$DCWeight")
|
||||
|
||||
$SiteInfoObj = [System.DirectoryServices.ActiveDirectory.Forest]::getCurrentForest().Sites | Where-Object { $_.Name -eq $SiteName }
|
||||
|
||||
# Is this host a BridgeHead Server?
|
||||
# Field BridgeheadServer (Collection of DirectoryServer objects - check to see if we are listed and set IsBridgeHeadServer=True/False accordingly)
|
||||
|
||||
# Is this host a Intersite Topology Generator
|
||||
if ($SiteInfoObj.IntersiteTopologyGenerator.Name -and ($SiteInfoObj.IntersiteTopologyGenerator.Name -eq $ServerName -or $SiteInfoObj.IntersiteTopologyGenerator.Name.ToLower() -eq $MyName)) {
|
||||
[void]$Output.Add("IsIntersiteTopologyGenerator=`"True`"")
|
||||
} else {
|
||||
[void]$Output.Add("IsIntersiteTopologyGenerator=`"False`"")
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Windows Version and Build #
|
||||
#
|
||||
$WindowsInfo = Get-Item "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion"
|
||||
$OS = $WindowsInfo.GetValue("ProductName")
|
||||
$OSSP = $WindowsInfo.GetValue("CSDVersion")
|
||||
$WinVer = $WindowsInfo.GetValue("CurrentVersion")
|
||||
$WinBuild = $WindowsInfo.GetValue("CurrentBuildNumber")
|
||||
$OSVER = "$WinVer ($WinBuild)"
|
||||
|
||||
[void]$Output.Add("OperatingSystem=""$OS""")
|
||||
[void]$Output.Add("ServicePack=""$OSSP""")
|
||||
[void]$Output.Add("OSVersion=""$OSVER""")
|
||||
|
||||
#
|
||||
# FSMO Roles (Schema, DomainNaming, Infrastructure, RIDMaster, PDC)
|
||||
#
|
||||
$aFSMO = @()
|
||||
if ($MyDC -and $MyDC.Roles) {
|
||||
foreach ($role in $MyDC.Roles) {
|
||||
switch ($role) {
|
||||
"SchemaRole" { $aFSMO += "Schema" }
|
||||
"NamingRole" { $aFSMO += "DomainNaming" }
|
||||
"InfrastructureRole" { $aFSMO += "Infrastructure" }
|
||||
"PdcRole" { $aFSMO += "PDCEmulator" }
|
||||
"RidRole" { $aFSMO += "RIDMaster" }
|
||||
}
|
||||
}
|
||||
}
|
||||
$FSMORoles = [string]::join(' ', $aFSMO)
|
||||
[void]$Output.Add("FSMORoles=""$FSMORoles""")
|
||||
|
||||
#
|
||||
# Required Processes Running
|
||||
# FRS, DFS-R, Net Logon, KDC, W32Time, ISMSERV
|
||||
#
|
||||
$RequiredServices = @( "ntfrs", "dfsr", "netlogon", "kdc", "w32time", "ismserv" )
|
||||
$srvr = @()
|
||||
$srvnr = @()
|
||||
foreach ($srv in $RequiredServices) {
|
||||
$status = (Get-Service $srv).Status
|
||||
if ($status -eq "Running") {
|
||||
$srvr += $srv
|
||||
} else {
|
||||
$srvnr += $srv
|
||||
}
|
||||
}
|
||||
# Note that the only case that ProcsOK == True is when there is ONE service
|
||||
# that isn't running - You need one replication services (ntfrs or dfsr) but
|
||||
# not both
|
||||
$ProcsOK = "False"
|
||||
if (($srvnr.Count -eq 0) -or ($srvnr.Count -eq 1 -and ($srvnr[0] -eq "ntfrs" -or $srvnr[0] -eq "dfsr"))) {
|
||||
$ProcsOK = "True"
|
||||
}
|
||||
$ServicesRunning = [string]::join(',', $srvr)
|
||||
$ServicesNotRunning = [string]::join(',', $srvnr)
|
||||
[void]$Output.Add("ServicesRunning=""$ServicesRunning""")
|
||||
[void]$Output.Add("ServicesNotRunning=""$ServicesNotRunning""")
|
||||
[void]$Output.Add("ProcsOK=""$ProcsOK""")
|
||||
|
||||
#
|
||||
# Look for Common Problems
|
||||
# SYSVOL is shared out
|
||||
# DC is registered in DNS
|
||||
#
|
||||
$SysvolShare = (Get-WmiObject Win32_Share|Where-Object { $_.Name -eq "SYSVOL" })
|
||||
if ($SysvolShare) {
|
||||
[void]$Output.Add("SYSVOLShare=""True""")
|
||||
} else {
|
||||
[void]$Output.Add("SYSVOLShare=""False""")
|
||||
}
|
||||
|
||||
$DNSEntry = ([System.Net.DNS]::GetHostEntry($ServerName))
|
||||
if ($DNSEntry) {
|
||||
[void]$Output.Add("DNSRegister=""True""")
|
||||
} else {
|
||||
[void]$Output.Add("DNSRegister=""False""")
|
||||
}
|
||||
|
||||
# Output the final string
|
||||
Write-Host ($output -join " ")
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,41 @@
|
||||
#
|
||||
# Determine and output information about the Site the server is a member of
|
||||
#
|
||||
|
||||
$ServerName = $env:ComputerName
|
||||
$BSSN = "\\" + $ServerName
|
||||
$WMI_DOMAIN = Get-WmiObject Win32_NTDomain | Where-Object {$_.DomainControllerName -eq $BSSN}
|
||||
$SiteName = $WMI_DOMAIN.ClientSiteName
|
||||
$ForestName = [System.DirectoryServices.ActiveDirectory.Forest]::getCurrentForest().Name
|
||||
|
||||
$Date = Get-Date -format 'yyyy-MM-ddTHH:mm:sszzz'
|
||||
$SiteInfoObj = [System.DirectoryServices.ActiveDirectory.Forest]::getCurrentForest().Sites | Where-Object { $_.Name -eq $SiteName }
|
||||
$ISTG = $SiteInfoObj.IntersiteTopologyGenerator.Name
|
||||
|
||||
|
||||
write-host $Date Type=`"Site`" ForestName=`"$ForestName`" Site=`"$SiteName`" Location=`"$($SiteInfoObj.Location)`" -NoNewline
|
||||
$SiteInfoObj.AdjacentSites | Foreach-Object { write-host AdjacentSite=`"$($_.Name)`" -NoNewline }
|
||||
write-host IntersiteTopologyGenerator=`"$ISTG`" -NoNewline
|
||||
$SiteInfoObj.SiteLinks | Foreach-Object { write-host "" SiteLink=`"$($_.Name)`" -NoNewline }
|
||||
$SiteInfoObj.Subnets | Foreach-Object { write-host "" Subnet=`"$($_.Name)`" -nonewline }
|
||||
|
||||
write-host #Needed to print a newline for next object
|
||||
|
||||
#
|
||||
# Output Information about Site Links in this site
|
||||
#
|
||||
$SiteInfoObj.SiteLinks | Foreach-Object {
|
||||
write-host $Date Type=`"SiteLink`" ForestName=`"$ForestName`" Name=`"$($_.Name)`" Cost=$($_.Cost) DataCompressionEnabled=$($_.DataCompressionEnabled) NotificationEnabled=$($_.NotificationEnabled) ReciprocalReplicationEnabled=$($_.ReciprocalReplicationEnabled) TransportType=$($_.TransportType) ReplicationIntervalSecs=$($_.ReplicationInterval.TotalSeconds) -NoNewLine
|
||||
foreach ($site in $_.Sites) {
|
||||
write-host ""Site=`"$($site.Name)`" -NoNewLine
|
||||
}
|
||||
}
|
||||
Write-Host #similar to above
|
||||
|
||||
#
|
||||
# Output Information about Subnets in this site
|
||||
#
|
||||
|
||||
$SiteInfoObj.Subnets | Foreach-Object {
|
||||
write-Host $Date Type=`"Subnet`" ForestName=`"$ForestName`" Name=`"$($_.Name)`" Site=`"$SiteName`" Location=`"$($_.Location)`"
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
@ECHO OFF
|
||||
|
||||
:: ######################################################
|
||||
:: #
|
||||
:: # Splunk for Microsoft Active Directory
|
||||
:: #
|
||||
:: # Copyright (C) 2016 Splunk, Inc.
|
||||
:: # All Rights Reserved
|
||||
:: #
|
||||
:: ######################################################
|
||||
|
||||
set SplunkApp=Splunk_TA_microsoft_ad
|
||||
|
||||
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -executionPolicy RemoteSigned -command ". '%SPLUNK_HOME%\etc\apps\%SplunkApp%\bin\powershell\%1'"
|
||||
@ -0,0 +1,3 @@
|
||||
[NearestDC]
|
||||
disabled = 0
|
||||
monitorSubtree = 1
|
||||
@ -0,0 +1,16 @@
|
||||
[install]
|
||||
state = enabled
|
||||
is_configured = false
|
||||
build = 30
|
||||
|
||||
[ui]
|
||||
is_visible = false
|
||||
label = Splunk Add-on for Microsoft Active Directory
|
||||
|
||||
[launcher]
|
||||
author = Splunk
|
||||
description = {"name":"Splunk Add-on for Microsoft Active Directory"}
|
||||
version = 1.0.0
|
||||
|
||||
[package]
|
||||
id = Splunk_TA_microsoft_ad
|
||||
@ -0,0 +1,156 @@
|
||||
#### Default replacement for all csv logs
|
||||
[perfmon-.*\.csv]
|
||||
index=perfmon
|
||||
sampletype = csv
|
||||
timeMultiple = 2
|
||||
## replace timestamp 09/09/2010 23:36:32.0128
|
||||
token.0.token = ^(\d{2}\/\d{2}\/\d{2,4}\s+\d{2}:\d{2}:\d{2})\.\d+
|
||||
token.0.replacementType = timestamp
|
||||
token.0.replacement = %m/%d/%Y %H:%M:%S
|
||||
|
||||
# Perfmon Collection
|
||||
[perfmon-Processor.csv]
|
||||
backfill = -15m
|
||||
backfillSearch = index=perfmon sourcetype=Perfmon:Processor
|
||||
source = Perfmon:Processor
|
||||
sourcetype = Perfmon:Processor
|
||||
|
||||
[perfmon-Memory.csv]
|
||||
backfill = -15m
|
||||
backfillSearch = index=perfmon sourcetype=Perfmon:Memory
|
||||
source = Perfmon:Memory
|
||||
sourcetype = Perfmon:Memory
|
||||
|
||||
[perfmon-Network_Interface.csv]
|
||||
backfill = -15m
|
||||
backfillSearch = index=perfmon sourcetype=Perfmon:Network_Interface
|
||||
source = Perfmon:Network_Interface
|
||||
sourcetype = Perfmon:Network_Interface
|
||||
|
||||
## TODO
|
||||
#[perfmon://DFS_Replicated_Folders]
|
||||
#object = DFS Replicated Folders
|
||||
#counters = Bandwidth Savings Using DFS Replication; RDC Bytes Received; RDC Compressed Size of Files Received; RDC Size of Files Received; RDC Number of Files Received; Compressed Size of Files Received; Size of Files Received; Total Files Received; Deleted Space In Use; Deleted Bytes Cleaned up; Deleted Files Cleaned up; Deleted Bytes Generated; Deleted Files Generated; Updates Dropped; File Installs Retried; File Installs Succeeded; Conflict Folder Cleanups Completed; Conflict Space In Use; Conflict Bytes Cleaned up; Conflict Files Cleaned up; Conflict Bytes Generated; Conflict Files Generated; Staging Space In Use; Staging Bytes Cleaned up; Staging Files Cleaned up; Staging Bytes Generated; Staging Files Generated
|
||||
#index=perfmon
|
||||
|
||||
[perfmon-NTDS.csv]
|
||||
backfill = -15m
|
||||
backfillSearch = index=perfmon sourcetype=Perfmon:NTDS
|
||||
source = Perfmon:NTDS
|
||||
sourcetype = Perfmon:NTDS
|
||||
|
||||
# TODO
|
||||
#[admon://NearestDC]
|
||||
#[sourcetype-ActiveDirectory.csv]
|
||||
#sampletype = csv
|
||||
#timeMultiple = 2
|
||||
#backfill = -15m
|
||||
#backfillSearch = index=msad sourcetype=ActiveDirectory
|
||||
#index = msad
|
||||
#source = ActiveDirectory
|
||||
#sourcetype = ActiveDirectory
|
||||
## replace timestamp 09/09/2010 23:36:32.0128
|
||||
#token.0.token = ^(\d{2}\/\d{2}\/\d{2,4}\s+\d{2}:\d{2}:\d{2})\.\d+
|
||||
#token.0.replacementType = timestamp
|
||||
#token.0.replacement = %m/%d/%Y %H:%M:%S
|
||||
|
||||
## TODO
|
||||
#[monitor://C:\Windows\debug\netlogon.log]
|
||||
#sourcetype=MSAD:NT6:Netlogon
|
||||
#index=msad
|
||||
|
||||
## Windows 2012 R2
|
||||
[WinEventLog-DFS-Replication.csv]
|
||||
sampletype = csv
|
||||
timeMultiple = 2
|
||||
backfill = -15m
|
||||
backfillSearch = index=wineventlog sourcetype=WinEventLog:DFS-Replication
|
||||
index=wineventlog
|
||||
source = WinEventLog:DFS Replication
|
||||
sourcetype = WinEventLog:DFS-Replication
|
||||
## replace timestamp 03/11/10 01:12:01 PM
|
||||
token.0.token = ^\d{2}\/\d{2}\/\d{2,4}\s+\d{2}:\d{2}:\d{2}\s+[AaPp][Mm]
|
||||
token.0.replacementType = timestamp
|
||||
token.0.replacement = %m/%d/%Y %I:%M:%S %p
|
||||
|
||||
[WinEventLog-Directory-Service.csv]
|
||||
sampletype = csv
|
||||
timeMultiple = 2
|
||||
backfill = -15m
|
||||
backfillSearch = index=wineventlog sourcetype=Directory-Service
|
||||
index=wineventlog
|
||||
source = WinEventLog:Directory Service
|
||||
sourcetype = WinEventLog:Directory-Service
|
||||
## replace timestamp 03/11/10 01:12:01 PM
|
||||
token.0.token = ^\d{2}\/\d{2}\/\d{2,4}\s+\d{2}:\d{2}:\d{2}\s+[AaPp][Mm]
|
||||
token.0.replacementType = timestamp
|
||||
token.0.replacement = %m/%d/%Y %I:%M:%S %p
|
||||
|
||||
## TODO for Win2k3
|
||||
#[WinEventLog-File-Replication-Service.csv]
|
||||
#sampletype = csv
|
||||
#timeMultiple = 2
|
||||
#backfill = -15m
|
||||
#backfillSearch = index=wineventlog sourcetype=WinEventLog:File-Replication-Service
|
||||
#index=wineventlog
|
||||
#source = WinEventLog:File Replication Service
|
||||
#sourcetype = WinEventLog:File-Replication-Service
|
||||
#token.1.token = \d{2}.\d{2}.\d{4} \d{2}.\d{2}.\d{2}.\d{3}
|
||||
#token.1.replacementType = timestamp
|
||||
#token.1.replacement = %Y-%m-%d %H:%M:%S
|
||||
|
||||
## TODO generate events to capture
|
||||
#[WinEventLog-Key-Management-Service.csv]
|
||||
#sampletype = csv
|
||||
#timeMultiple = 2
|
||||
#backfill = -15m
|
||||
#backfillSearch = index=wineventlog sourcetype=WinEventLog:Key-Management-Service
|
||||
#index=wineventlog
|
||||
#source = WinEventLog:Key Management Service
|
||||
#sourcetype = WinEventLog:Key-Management-Service
|
||||
#token.1.token = \d{2}.\d{2}.\d{4} \d{2}.\d{2}.\d{2}.\d{3}
|
||||
#token.1.replacementType = timestamp
|
||||
#token.1.replacement = %Y-%m-%d %H:%M:%S
|
||||
|
||||
## TODO
|
||||
#[MSAD-NT6-ad-repl-stat.sample]
|
||||
#timeMultiple = 1
|
||||
#backfill = -15m
|
||||
#backfillSearch = index=msad sourcetype=MSAD:NT6:Replication
|
||||
#index = msad
|
||||
#source = Powershell
|
||||
#sourcetype = MSAD:NT6:Replication
|
||||
#token.0.token = \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3}
|
||||
#token.0.replacementType = timestamp
|
||||
#token.0.replacement = %Y-%m-%d %H:%M:%S,%f
|
||||
#token.1.token = \d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}.\d{3}
|
||||
#token.1.replacementType = timestamp
|
||||
#token.1.replacement = %m-%d-%Y %H:%M:%S.%f
|
||||
#token.2.token = \d{2}/\w{3}/\d{4}:\d{2}:\d{2}\:\d{2}.\d{3}
|
||||
#token.2.replacementType = timestamp
|
||||
#token.2.replacement = %d/%b/%Y:%H:%M:%S.%f
|
||||
#token.3.token = \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}
|
||||
#token.3.replacementType = timestamp
|
||||
#token.3.replacement = %Y-%m-%d %H:%M:%S
|
||||
|
||||
#### Default replacement for all sample logs
|
||||
[.*\.sample]
|
||||
index = msad
|
||||
source = Powershell
|
||||
token.0.token = \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}-\d{2}:\d{2}
|
||||
token.0.replacementType = timestamp
|
||||
token.0.replacement = %Y-%m-%d %H:%M:%S
|
||||
|
||||
#[script://.\bin\runpowershell.cmd ad-health.ps1]
|
||||
[MSAD-NT6-Health.sample]
|
||||
timeMultiple = 1
|
||||
backfill = -15m
|
||||
backfillSearch = index=msad sourcetype=MSAD:NT6:Health
|
||||
sourcetype = MSAD:NT6:Health
|
||||
|
||||
#[script://.\bin\runpowershell.cmd siteinfo.ps1]
|
||||
[MSAD-NT6-SiteInfo.sample]
|
||||
timeMultiple = 1
|
||||
backfill = -15m
|
||||
backfillSearch = index=msad sourcetype=MSAD:NT6:SiteInfo
|
||||
sourcetype = MSAD:NT6:SiteInfo
|
||||
@ -0,0 +1,53 @@
|
||||
### AD Eventtypes ####
|
||||
|
||||
[admon]
|
||||
search = source=ActiveDirectory
|
||||
|
||||
[wineventlog-ds]
|
||||
search = source="WinEventLog:Directory Service"
|
||||
|
||||
[perfmon]
|
||||
search = source="Perfmon:*"
|
||||
|
||||
[powershell]
|
||||
search = source=Powershell
|
||||
|
||||
[ad-files]
|
||||
search = index=msad
|
||||
|
||||
[perfmon-ntds]
|
||||
search = eventtype=perfmon sourcetype="Perfmon:NTDS"
|
||||
|
||||
[msad-dc-health]
|
||||
search = eventtype=powershell sourcetype="MSAD:*:Health"
|
||||
|
||||
[msad-rep-health]
|
||||
search = eventtype=powershell sourcetype="MSAD:*:Replication"
|
||||
|
||||
[msad-site]
|
||||
search = eventtype=powershell sourcetype="MSAD:*:SiteInfo"
|
||||
|
||||
[msad-subnetinfo]
|
||||
search = eventtype=powershell sourcetype="MSAD:*:SiteInfo" Type="Subnet"
|
||||
|
||||
[msad-sitelinkinfo]
|
||||
search = eventtype=powershell sourcetype="MSAD:*:SiteInfo" Type="SiteLink"
|
||||
|
||||
[msad-siteinfo]
|
||||
search = eventtype=powershell sourcetype="MSAD:*:SiteInfo" Type="Site"
|
||||
|
||||
[msad-subnet-affinity]
|
||||
search = sourcetype="MSAD:*:Netlogon" msad_affinity=NO_CLIENT_SITE
|
||||
|
||||
[admon-gpo]
|
||||
search = eventtype=admon objectCategory="*CN=Group-Policy-Container*"
|
||||
|
||||
[admon-group]
|
||||
search = eventtype=admon objectCategory="*CN=Group*"
|
||||
|
||||
[admon-computer]
|
||||
search = eventtype=admon objectCategory="*CN=Computer*"
|
||||
|
||||
[admon-user]
|
||||
search = eventtype=admon objectCategory="*CN=Person*"
|
||||
|
||||
@ -0,0 +1,167 @@
|
||||
###
|
||||
### Windows Event Logs
|
||||
###
|
||||
### Application, System and Security logs are handled
|
||||
### by Splunk_TA_windows and should be compatible with
|
||||
### what we need
|
||||
###
|
||||
|
||||
#
|
||||
# Application and Services Logs - DFS Replication
|
||||
#
|
||||
[WinEventLog://DFS Replication]
|
||||
disabled=0
|
||||
sourcetype=WinEventLog:DFS-Replication
|
||||
index=wineventlog
|
||||
queue=parsingQueue
|
||||
|
||||
#
|
||||
# Application and Services Logs - Directory Service
|
||||
#
|
||||
[WinEventLog://Directory Service]
|
||||
disabled=0
|
||||
sourcetype=WinEventLog:Directory-Service
|
||||
index=wineventlog
|
||||
queue=parsingQueue
|
||||
|
||||
#
|
||||
# Application and Services Logs - File Replication Service
|
||||
#
|
||||
[WinEventLog://File Replication Service]
|
||||
disabled=0
|
||||
sourcetype=WinEventLog:File-Replication-Service
|
||||
index=wineventlog
|
||||
queue=parsingQueue
|
||||
|
||||
#
|
||||
# Application and Services Logs - Key Management Service
|
||||
#
|
||||
[WinEventLog://Key Management Service]
|
||||
disabled=0
|
||||
sourcetype=WinEventLog:Key-Management-Service
|
||||
index=wineventlog
|
||||
queue=parsingQueue
|
||||
|
||||
#
|
||||
# Collect Replication Information NT6
|
||||
#
|
||||
[script://.\bin\runpowershell.cmd nt6-repl-stat.ps1]
|
||||
source=Powershell
|
||||
sourcetype=MSAD:NT6:Replication
|
||||
interval=300
|
||||
index=msad
|
||||
disabled=false
|
||||
|
||||
#
|
||||
# Collect Replication Information 2012r2
|
||||
#
|
||||
[powershell://Replication-Stats]
|
||||
script = & "$SplunkHome\etc\apps\Splunk_TA_microsoft_ad\bin\Invoke-MonitoredScript.ps1" -Command ".\powershell\2012r2-repl-stats.ps1"
|
||||
schedule = 0 */5 * ? * *
|
||||
index = msad
|
||||
source = Powershell
|
||||
sourcetype=MSAD:NT6:Replication
|
||||
disabled=false
|
||||
|
||||
#
|
||||
# Collect Health and Topology Information NT6
|
||||
#
|
||||
[script://.\bin\runpowershell.cmd nt6-health.ps1]
|
||||
source=Powershell
|
||||
sourcetype=MSAD:NT6:Health
|
||||
interval=300
|
||||
index=msad
|
||||
disabled=false
|
||||
|
||||
#
|
||||
# Collect Health and Topology Information 2012r2
|
||||
#
|
||||
[powershell://AD-Health]
|
||||
script = & "$SplunkHome\etc\apps\Splunk_TA_microsoft_ad\bin\Invoke-MonitoredScript.ps1" -Command ".\powershell\2012r2-health.ps1"
|
||||
schedule = 0 */5 * ? * *
|
||||
index = msad
|
||||
source=Powershell
|
||||
sourcetype=MSAD:NT6:Health
|
||||
disabled=false
|
||||
|
||||
|
||||
#
|
||||
# Collect Site, Site Link and Subnet Information NT6
|
||||
#
|
||||
[script://.\bin\runpowershell.cmd nt6-siteinfo.ps1]
|
||||
source=Powershell
|
||||
sourcetype=MSAD:NT6:SiteInfo
|
||||
interval=3600
|
||||
index=msad
|
||||
disabled=false
|
||||
|
||||
#
|
||||
# Collect Site, Site Link and Subnet Information 2012r2
|
||||
#
|
||||
[powershell://Siteinfo]
|
||||
script = & "$SplunkHome\etc\apps\Splunk_TA_microsoft_ad\bin\Invoke-MonitoredScript.ps1" -Command ".\powershell\2012r2-siteinfo.ps1"
|
||||
schedule = 0 15 * ? * *
|
||||
index = msad
|
||||
source = Powershell
|
||||
sourcetype=MSAD:NT6:SiteInfo
|
||||
disabled=false
|
||||
|
||||
#
|
||||
# Perfmon Collection
|
||||
#
|
||||
[perfmon://Processor]
|
||||
object = Processor
|
||||
counters = % Processor Time; % User Time; % Privileged Time; Interrupts/sec; % DPC Time; % Interrupt Time; DPCs Queued/sec; DPC Rate; % Idle Time; % C1 Time; % C2 Time; % C3 Time; C1 Transitions/sec; C2 Transitions/sec; C3 Transitions/sec
|
||||
instances = *
|
||||
interval = 10
|
||||
disabled = 0
|
||||
index=perfmon
|
||||
useEnglishOnly=true
|
||||
|
||||
[perfmon://Memory]
|
||||
object = Memory
|
||||
counters = Page Faults/sec; Available Bytes; Committed Bytes; Commit Limit; Write Copies/sec; Transition Faults/sec; Cache Faults/sec; Demand Zero Faults/sec; Pages/sec; Pages Input/sec; Page Reads/sec; Pages Output/sec; Pool Paged Bytes; Pool Nonpaged Bytes; Page Writes/sec; Pool Paged Allocs; Pool Nonpaged Allocs; Free System Page Table Entries; Cache Bytes; Cache Bytes Peak; Pool Paged Resident Bytes; System Code Total Bytes; System Code Resident Bytes; System Driver Total Bytes; System Driver Resident Bytes; System Cache Resident Bytes; % Committed Bytes In Use; Available KBytes; Available MBytes; Transition Pages RePurposed/sec; Free & Zero Page List Bytes; Modified Page List Bytes; Standby Cache Reserve Bytes; Standby Cache Normal Priority Bytes; Standby Cache Core Bytes; Long-Term Average Standby Cache Lifetime (s)
|
||||
interval = 10
|
||||
disabled = 0
|
||||
index=perfmon
|
||||
useEnglishOnly=true
|
||||
|
||||
[perfmon://Network_Interface]
|
||||
object = Network Interface
|
||||
counters = Bytes Total/sec; Packets/sec; Packets Received/sec; Packets Sent/sec; Current Bandwidth; Bytes Received/sec; Packets Received Unicast/sec; Packets Received Non-Unicast/sec; Packets Received Discarded; Packets Received Errors; Packets Received Unknown; Bytes Sent/sec; Packets Sent Unicast/sec; Packets Sent Non-Unicast/sec; Packets Outbound Discarded; Packets Outbound Errors; Output Queue Length; Offloaded Connections; TCP Active RSC Connections; TCP RSC Coalesced Packets/sec; TCP RSC Exceptions/sec; TCP RSC Average Packet Size
|
||||
instances = *
|
||||
interval = 10
|
||||
disabled = 0
|
||||
index=perfmon
|
||||
useEnglishOnly=true
|
||||
|
||||
[perfmon://DFS_Replicated_Folders]
|
||||
object = DFS Replicated Folders
|
||||
counters = Bandwidth Savings Using DFS Replication; RDC Bytes Received; RDC Compressed Size of Files Received; RDC Size of Files Received; RDC Number of Files Received; Compressed Size of Files Received; Size of Files Received; Total Files Received; Deleted Space In Use; Deleted Bytes Cleaned up; Deleted Files Cleaned up; Deleted Bytes Generated; Deleted Files Generated; Updates Dropped; File Installs Retried; File Installs Succeeded; Conflict Folder Cleanups Completed; Conflict Space In Use; Conflict Bytes Cleaned up; Conflict Files Cleaned up; Conflict Bytes Generated; Conflict Files Generated; Staging Space In Use; Staging Bytes Cleaned up; Staging Files Cleaned up; Staging Bytes Generated; Staging Files Generated
|
||||
instances = *
|
||||
interval = 30
|
||||
disabled = 0
|
||||
index=perfmon
|
||||
useEnglishOnly=true
|
||||
|
||||
[perfmon://NTDS]
|
||||
object = NTDS
|
||||
counters = DRA Inbound Properties Total/sec; AB Browses/sec; DRA Inbound Objects Applied/sec; DS Threads in Use; AB Client Sessions; DRA Pending Replication Synchronizations; DRA Inbound Object Updates Remaining in Packet; DS Security Descriptor sub-operations/sec; DS Security Descriptor Propagations Events; LDAP Client Sessions; LDAP Active Threads; LDAP Writes/sec; LDAP Searches/sec; DRA Outbound Objects/sec; DRA Outbound Properties/sec; DRA Inbound Values Total/sec; DRA Sync Requests Made; DRA Sync Requests Successful; DRA Sync Failures on Schema Mismatch; DRA Inbound Objects/sec; DRA Inbound Properties Applied/sec; DRA Inbound Properties Filtered/sec; DS Monitor List Size; DS Notify Queue Size; LDAP UDP operations/sec; DS Search sub-operations/sec; DS Name Cache hit rate; DRA Highest USN Issued (Low part); DRA Highest USN Issued (High part); DRA Highest USN Committed (Low part); DRA Highest USN Committed (High part); DS % Writes from SAM; DS % Writes from DRA; DS % Writes from LDAP; DS % Writes from LSA; DS % Writes from KCC; DS % Writes from NSPI; DS % Writes Other; DS Directory Writes/sec; DS % Searches from SAM; DS % Searches from DRA; DS % Searches from LDAP; DS % Searches from LSA; DS % Searches from KCC; DS % Searches from NSPI; DS % Searches Other; DS Directory Searches/sec; DS % Reads from SAM; DS % Reads from DRA; DRA Inbound Values (DNs only)/sec; DRA Inbound Objects Filtered/sec; DS % Reads from LSA; DS % Reads from KCC; DS % Reads from NSPI; DS % Reads Other; DS Directory Reads/sec; LDAP Successful Binds/sec; LDAP Bind Time; SAM Successful Computer Creations/sec: Includes all requests; SAM Machine Creation Attempts/sec; SAM Successful User Creations/sec; SAM User Creation Attempts/sec; SAM Password Changes/sec; SAM Membership Changes/sec; SAM Display Information Queries/sec; SAM Enumerations/sec; SAM Transitive Membership Evaluations/sec; SAM Non-Transitive Membership Evaluations/sec; SAM Domain Local Group Membership Evaluations/sec; SAM Universal Group Membership Evaluations/sec; SAM Global Group Membership Evaluations/sec; SAM GC Evaluations/sec; DRA Inbound Full Sync Objects Remaining; DRA Inbound Bytes Total/sec; DRA Inbound Bytes Not Compressed (Within Site)/sec; DRA Inbound Bytes Compressed (Between Sites, Before Compression)/sec; DRA Inbound Bytes Compressed (Between Sites, After Compression)/sec; DRA Outbound Bytes Total/sec; DRA Outbound Bytes Not Compressed (Within Site)/sec; DRA Outbound Bytes Compressed (Between Sites, Before Compression)/sec; DRA Outbound Bytes Compressed (Between Sites, After Compression)/sec; DS Client Binds/sec; DS Server Binds/sec; DS Client Name Translations/sec; DS Server Name Translations/sec; DS Security Descriptor Propagator Runtime Queue; DS Security Descriptor Propagator Average Exclusion Time; DRA Outbound Objects Filtered/sec; DRA Outbound Values Total/sec; DRA Outbound Values (DNs only)/sec; AB ANR/sec; AB Property Reads/sec; AB Searches/sec; AB Matches/sec; AB Proxy Lookups/sec; ATQ Threads Total; ATQ Threads LDAP; ATQ Threads Other; DRA Inbound Bytes Total Since Boot; DRA Inbound Bytes Not Compressed (Within Site) Since Boot; DRA Inbound Bytes Compressed (Between Sites, Before Compression) Since Boot; DRA Inbound Bytes Compressed (Between Sites, After Compression) Since Boot; DRA Outbound Bytes Total Since Boot; DRA Outbound Bytes Not Compressed (Within Site) Since Boot; DRA Outbound Bytes Compressed (Between Sites, Before Compression) Since Boot; DRA Outbound Bytes Compressed (Between Sites, After Compression) Since Boot; LDAP New Connections/sec; LDAP Closed Connections/sec; LDAP New SSL Connections/sec; DRA Pending Replication Operations; DRA Threads Getting NC Changes; DRA Threads Getting NC Changes Holding Semaphore; DRA Inbound Link Value Updates Remaining in Packet; DRA Inbound Total Updates Remaining in Packet; DS % Writes from NTDSAPI; DS % Searches from NTDSAPI; DS % Reads from NTDSAPI; SAM Account Group Evaluation Latency; SAM Resource Group Evaluation Latency; ATQ Outstanding Queued Requests; ATQ Request Latency; ATQ Estimated Queue Delay; Tombstones Garbage Collected/sec; Phantoms Cleaned/sec; Link Values Cleaned/sec; Tombstones Visited/sec; Phantoms Visited/sec; NTLM Binds/sec; Negotiated Binds/sec; Digest Binds/sec; Simple Binds/sec; External Binds/sec; Fast Binds/sec; Base searches/sec; Subtree searches/sec; Onelevel searches/sec; Database adds/sec; Database modifys/sec; Database deletes/sec; Database recycles/sec; Approximate highest DNT; Transitive operations/sec; Transitive suboperations/sec; Transitive operations milliseconds run
|
||||
interval = 10
|
||||
disabled = 0
|
||||
index=perfmon
|
||||
useEnglishOnly=true
|
||||
|
||||
[admon://NearestDC]
|
||||
monitorSubtree = 1
|
||||
interval=3600
|
||||
disabled=false
|
||||
index=msad
|
||||
|
||||
#
|
||||
# Subnet Affinity Log
|
||||
#
|
||||
[monitor://C:\Windows\debug\netlogon.log]
|
||||
sourcetype=MSAD:NT6:Netlogon
|
||||
disabled=false
|
||||
index=msad
|
||||
@ -0,0 +1,42 @@
|
||||
[PERFMON:Processor]
|
||||
object = Processor
|
||||
counters = % Processor Time; % User Time; % Privileged Time; Interrupts/sec; % DPC Time; % Interrupt Time; DPCs Queued/sec; DPC Rate; % Idle Time; % C1 Time; % C2 Time; % C3 Time; C1 Transitions/sec; C2 Transitions/sec; C3 Transitions/sec
|
||||
instances = *
|
||||
interval = 10
|
||||
disabled = 0
|
||||
index=perfmon
|
||||
useEnglishOnly=true
|
||||
|
||||
[PERFMON:Memory]
|
||||
object = Memory
|
||||
counters = Page Faults/sec; Available Bytes; Committed Bytes; Commit Limit; Write Copies/sec; Transition Faults/sec; Cache Faults/sec; Demand Zero Faults/sec; Pages/sec; Pages Input/sec; Page Reads/sec; Pages Output/sec; Pool Paged Bytes; Pool Nonpaged Bytes; Page Writes/sec; Pool Paged Allocs; Pool Nonpaged Allocs; Free System Page Table Entries; Cache Bytes; Cache Bytes Peak; Pool Paged Resident Bytes; System Code Total Bytes; System Code Resident Bytes; System Driver Total Bytes; System Driver Resident Bytes; System Cache Resident Bytes; % Committed Bytes In Use; Available KBytes; Available MBytes; Transition Pages RePurposed/sec; Free & Zero Page List Bytes; Modified Page List Bytes; Standby Cache Reserve Bytes; Standby Cache Normal Priority Bytes; Standby Cache Core Bytes; Long-Term Average Standby Cache Lifetime (s)
|
||||
interval = 10
|
||||
disabled = 0
|
||||
index=perfmon
|
||||
useEnglishOnly=true
|
||||
|
||||
[PERFMON:Network_Interface]
|
||||
object = Network Interface
|
||||
counters = Bytes Total/sec; Packets/sec; Packets Received/sec; Packets Sent/sec; Current Bandwidth; Bytes Received/sec; Packets Received Unicast/sec; Packets Received Non-Unicast/sec; Packets Received Discarded; Packets Received Errors; Packets Received Unknown; Bytes Sent/sec; Packets Sent Unicast/sec; Packets Sent Non-Unicast/sec; Packets Outbound Discarded; Packets Outbound Errors; Output Queue Length; Offloaded Connections; TCP Active RSC Connections; TCP RSC Coalesced Packets/sec; TCP RSC Exceptions/sec; TCP RSC Average Packet Size
|
||||
instances = *
|
||||
interval = 10
|
||||
disabled = 0
|
||||
index=perfmon
|
||||
useEnglishOnly=true
|
||||
|
||||
[PERFMON:DFS_Replicated_Folders]
|
||||
object = DFS Replicated Folders
|
||||
counters = Bandwidth Savings Using DFS Replication; RDC Bytes Received; RDC Compressed Size of Files Received; RDC Size of Files Received; RDC Number of Files Received; Compressed Size of Files Received; Size of Files Received; Total Files Received; Deleted Space In Use; Deleted Bytes Cleaned up; Deleted Files Cleaned up; Deleted Bytes Generated; Deleted Files Generated; Updates Dropped; File Installs Retried; File Installs Succeeded; Conflict Folder Cleanups Completed; Conflict Space In Use; Conflict Bytes Cleaned up; Conflict Files Cleaned up; Conflict Bytes Generated; Conflict Files Generated; Staging Space In Use; Staging Bytes Cleaned up; Staging Files Cleaned up; Staging Bytes Generated; Staging Files Generated
|
||||
instances = *
|
||||
interval = 30
|
||||
disabled = 0
|
||||
index=perfmon
|
||||
useEnglishOnly=true
|
||||
|
||||
[PERFMON:NTDS]
|
||||
object = NTDS
|
||||
counters = DRA Inbound Properties Total/sec; AB Browses/sec; DRA Inbound Objects Applied/sec; DS Threads in Use; AB Client Sessions; DRA Pending Replication Synchronizations; DRA Inbound Object Updates Remaining in Packet; DS Security Descriptor sub-operations/sec; DS Security Descriptor Propagations Events; LDAP Client Sessions; LDAP Active Threads; LDAP Writes/sec; LDAP Searches/sec; DRA Outbound Objects/sec; DRA Outbound Properties/sec; DRA Inbound Values Total/sec; DRA Sync Requests Made; DRA Sync Requests Successful; DRA Sync Failures on Schema Mismatch; DRA Inbound Objects/sec; DRA Inbound Properties Applied/sec; DRA Inbound Properties Filtered/sec; DS Monitor List Size; DS Notify Queue Size; LDAP UDP operations/sec; DS Search sub-operations/sec; DS Name Cache hit rate; DRA Highest USN Issued (Low part); DRA Highest USN Issued (High part); DRA Highest USN Committed (Low part); DRA Highest USN Committed (High part); DS % Writes from SAM; DS % Writes from DRA; DS % Writes from LDAP; DS % Writes from LSA; DS % Writes from KCC; DS % Writes from NSPI; DS % Writes Other; DS Directory Writes/sec; DS % Searches from SAM; DS % Searches from DRA; DS % Searches from LDAP; DS % Searches from LSA; DS % Searches from KCC; DS % Searches from NSPI; DS % Searches Other; DS Directory Searches/sec; DS % Reads from SAM; DS % Reads from DRA; DRA Inbound Values (DNs only)/sec; DRA Inbound Objects Filtered/sec; DS % Reads from LSA; DS % Reads from KCC; DS % Reads from NSPI; DS % Reads Other; DS Directory Reads/sec; LDAP Successful Binds/sec; LDAP Bind Time; SAM Successful Computer Creations/sec: Includes all requests; SAM Machine Creation Attempts/sec; SAM Successful User Creations/sec; SAM User Creation Attempts/sec; SAM Password Changes/sec; SAM Membership Changes/sec; SAM Display Information Queries/sec; SAM Enumerations/sec; SAM Transitive Membership Evaluations/sec; SAM Non-Transitive Membership Evaluations/sec; SAM Domain Local Group Membership Evaluations/sec; SAM Universal Group Membership Evaluations/sec; SAM Global Group Membership Evaluations/sec; SAM GC Evaluations/sec; DRA Inbound Full Sync Objects Remaining; DRA Inbound Bytes Total/sec; DRA Inbound Bytes Not Compressed (Within Site)/sec; DRA Inbound Bytes Compressed (Between Sites, Before Compression)/sec; DRA Inbound Bytes Compressed (Between Sites, After Compression)/sec; DRA Outbound Bytes Total/sec; DRA Outbound Bytes Not Compressed (Within Site)/sec; DRA Outbound Bytes Compressed (Between Sites, Before Compression)/sec; DRA Outbound Bytes Compressed (Between Sites, After Compression)/sec; DS Client Binds/sec; DS Server Binds/sec; DS Client Name Translations/sec; DS Server Name Translations/sec; DS Security Descriptor Propagator Runtime Queue; DS Security Descriptor Propagator Average Exclusion Time; DRA Outbound Objects Filtered/sec; DRA Outbound Values Total/sec; DRA Outbound Values (DNs only)/sec; AB ANR/sec; AB Property Reads/sec; AB Searches/sec; AB Matches/sec; AB Proxy Lookups/sec; ATQ Threads Total; ATQ Threads LDAP; ATQ Threads Other; DRA Inbound Bytes Total Since Boot; DRA Inbound Bytes Not Compressed (Within Site) Since Boot; DRA Inbound Bytes Compressed (Between Sites, Before Compression) Since Boot; DRA Inbound Bytes Compressed (Between Sites, After Compression) Since Boot; DRA Outbound Bytes Total Since Boot; DRA Outbound Bytes Not Compressed (Within Site) Since Boot; DRA Outbound Bytes Compressed (Between Sites, Before Compression) Since Boot; DRA Outbound Bytes Compressed (Between Sites, After Compression) Since Boot; LDAP New Connections/sec; LDAP Closed Connections/sec; LDAP New SSL Connections/sec; DRA Pending Replication Operations; DRA Threads Getting NC Changes; DRA Threads Getting NC Changes Holding Semaphore; DRA Inbound Link Value Updates Remaining in Packet; DRA Inbound Total Updates Remaining in Packet; DS % Writes from NTDSAPI; DS % Searches from NTDSAPI; DS % Reads from NTDSAPI; SAM Account Group Evaluation Latency; SAM Resource Group Evaluation Latency; ATQ Outstanding Queued Requests; ATQ Request Latency; ATQ Estimated Queue Delay; Tombstones Garbage Collected/sec; Phantoms Cleaned/sec; Link Values Cleaned/sec; Tombstones Visited/sec; Phantoms Visited/sec; NTLM Binds/sec; Negotiated Binds/sec; Digest Binds/sec; Simple Binds/sec; External Binds/sec; Fast Binds/sec; Base searches/sec; Subtree searches/sec; Onelevel searches/sec; Database adds/sec; Database modifys/sec; Database deletes/sec; Database recycles/sec; Approximate highest DNT; Transitive operations/sec; Transitive suboperations/sec; Transitive operations milliseconds run
|
||||
interval = 10
|
||||
disabled = 0
|
||||
index=perfmon
|
||||
useEnglishOnly=true
|
||||
@ -0,0 +1,21 @@
|
||||
[MSAD:NT6:Health]
|
||||
SHOULD_LINEMERGE = false
|
||||
CHECK_FOR_HEADER = false
|
||||
|
||||
[MSAD:NT6:SiteInfo]
|
||||
SHOULD_LINEMERGE = false
|
||||
CHECK_FOR_HEADER = false
|
||||
REPORT-extractions = MSAD-SiteInfo-AdjacentSites, MSAD-SiteInfo-Sites, MSAD-SiteInfo-SiteLinks, MSAD-SiteInfo-Subnets
|
||||
|
||||
[MSAD:NT6:Replication]
|
||||
SHOULD_LINEMERGE = false
|
||||
CHECK_FOR_HEADER = false
|
||||
|
||||
[MSAD:NT6:Netlogon]
|
||||
SHOULD_LINEMERGE = false
|
||||
CHECK_FOR_HEADER = false
|
||||
LINE_BREAKER = ([\r\n]+(?=\d{2}\/\d{2} \d{2}:\d{2}:\d{2} \[))
|
||||
EXTRACT-subnetaffinity = \s(?<src_domain>[^:]+): (?<msad_affinity>NO_CLIENT_SITE): (?<src_host>[^\s]+) (?<src_ip>[0-9A-Fa-f:\.]+)
|
||||
|
||||
[MSAD:SubnetAffinity]
|
||||
EXTRACT-subnetaffinity = (?<src_nt_domain>\w+): NO_CLIENT_SITE: (?<src_host>\w+) (?<src_ip>[0-9\.]+)
|
||||
@ -0,0 +1,24 @@
|
||||
[MSAD-Netlogon-Subnetaffinity]
|
||||
DEST_KEY=MetaData:Sourcetype
|
||||
REGEX=.*NO_CLIENT_SITE:.*
|
||||
FORMAT=sourcetype::MSAD:SubnetAffinity
|
||||
|
||||
[MSAD-SiteInfo-AdjacentSites]
|
||||
REGEX=AdjacentSite="([^"]+)
|
||||
FORMAT=AdjacentSite::$1
|
||||
MV_ADD=True
|
||||
|
||||
[MSAD-SiteInfo-SiteLinks]
|
||||
REGEX=SiteLink="([^"]+)
|
||||
FORMAT=SiteLink::$1
|
||||
MV_ADD=True
|
||||
|
||||
[MSAD-SiteInfo-Sites]
|
||||
REGEX=Site="([^"]+)
|
||||
FORMAT=Site::$1
|
||||
MV_ADD=True
|
||||
|
||||
[MSAD-SiteInfo-Subnets]
|
||||
REGEX=Subnet="([^"]+)
|
||||
FORMAT=Subnet::$1
|
||||
MV_ADD=True
|
||||