WindowsEventForwarding enables you to configure a server to become an Event Collector role and create complex Subscriptions.
Source |
|
DSC Resource |
|
Documentation |
Note
|
Creating a subscription can finished with the following warning:
This is a problem with the used During |
Note
|
Additional information can be found in the Event Forwarding Guidance. |
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
NodeType |
Mandatory |
String |
Defines the type of the current node.
NodeType |
|
CheckPrerequisites |
Boolean |
Checks the prerequistes on the WEF nodes: Built in account On a domain controller only the membership test of builtin domain user Adding builtin users to a domain group with Powershell is not supported. |
|
|
CollectorName |
Mandatory |
String |
Machine account of the Collector node. |
|
FixWsManUrlAcl |
Boolean |
Fix WsMan communication problem on Windows Server Fix is only supported on NodeType |
|
|
Hashtable[] |
List of complex Subscriptions Subscriptions are only supported on NodeType |
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
SubscriptionID |
Key |
String |
Name of the Subscription |
|
SubscriptionType |
Mandatory |
String |
Type of Subscription to create |
|
Description |
String |
Description of the Collector subscription |
||
Enabled |
String |
Sets whether the subscription will be enabled. |
|
|
Ensure |
String |
Determines whether to validate or remove the scubscription |
|
|
DeliveryMode |
String |
Configures whether the collector will pull events from source nodes or if the source nodes will push events to the collector. |
|
|
MaxItems |
Sint32 |
The number of events that can occur on the source before they are submitted to the collector. |
Default: 1 |
|
MaxLatencyTime |
Uint64 |
The maximum amount of time that can pass before events are submitted to the collector. |
Default: 20000 |
|
HeartBeatInterval |
Uint64 |
Frequency to verify connectivity |
Default: 20000 |
|
ReadExistingEvents |
String |
Should the collector read existing or only new events |
|
|
TransportName |
String |
Determines whether to require SSL |
|
|
TransportPort |
String |
Set the port number that WinRM should use to make a connection |
Default: 5985 |
|
ContentFormat |
String |
Format that event logs will be submitted in |
|
|
Locale |
String |
Sets the subscription Locale |
Default: en-US |
|
LogFile |
String |
Sets the event log that the collected events will be written to |
Default: ForwardedEvents |
|
CredentialsType |
String |
Sets the credential type used for authenticating to WinRM This attribute is only supported for 'CollectorInitiated' subscriptions. The used DSC resource xWindowsEventForwarding has a bug and requires a patch to support Failed to save subscription. Error = 0xd. The data is invalid. In file |
|
|
AllowedSourceNonDomainComputers |
String[] |
This parameter has not been fully implemented, only required for source initiated scenarios, provide XML to set IssuerCAList, AllowedSubjectList, or DeniedSubjectList if this will be used |
Default: empty string |
|
AllowedSourceDomainComputers |
String |
In Source Initiated scenario this SDDL determines who can push events. |
||
Query |
String[] |
Expects an array of hashtables that set which events should be collected, default is all application and system logs |
||
Address |
String[] |
Expects an array of source node FQDNs. |
Collector
node with CollectorInitiated
subscriptionsWindowsEventForwarding:
NodeType: Collector
Subscriptions:
- SubscriptionID: TestSub
Ensure: Present
SubscriptionType: CollectorInitiated
Address:
- tester.contoso.com
- tester.contoso.com
Source
node with CollectorInitiated
subscriptionsWindowsEventForwarding:
NodeType: Source
CollectorName: contoso\collectorserver$
Collector
node with SourceInitiated
subscriptionsWindowsEventForwarding:
NodeType: Collector
FixWsManUrlAcl: true
Subscriptions:
- SubscriptionID: Domain Computer Events
Ensure: Present
Description: Important security events from domain computers
SubscriptionType: SourceInitiated
AllowedSourceDomainComputers: 'O:NSG:BAD:P(A;;GA;;;DC)(A;;GA;;;DD)S:' # Domain Computers & Domain Controllers
Query:
- 'Security:*[System[(Level=1 or Level=2 or Level=3)]]'
Source
node with SourceInitiated
subscriptionsRegistryPolicies:
Values:
- Key: "Software\\Policies\\Microsoft\\Windows\\EventLog\\EventForwarding\\SubscriptionManager"
ValueName: 1
TargetType: ComputerConfiguration
ValueData: 'Server=http://collectorserver.contoso.com:5985/wsman/SubscriptionManager/WEC,Refresh=300'
ValueType: String
Ensure: Present
- Key: "Software\\Policies\\Microsoft\\Windows\\EventLog\\Security"
ValueName: ChannelAccess
TargetType: ComputerConfiguration
ValueData: 'O:BAG:SYD:(A;;0xf0005;;;SY)(A;;0x5;;;BA)(A;;0x1;;;S-1-5-32-573)(A;;0x1;;;NS)'
ValueType: String
Ensure: Present
- Key: "System\\CurrentControlSet\\Services\\EventLog\\Security"
ValueName: CustomSD
TargetType: ComputerConfiguration
ValueData: 'O:BAG:SYD:(A;;0xf0005;;;SY)(A;;0x5;;;BA)(A;;0x1;;;S-1-5-32-573)(A;;0x1;;;NS)'
ValueType: String
Ensure: Present
Datum.yml
(Excerpt)default_lookup_options: MostSpecific
lookup_options:
WindowsEventForwarding:
merge_hash: deep
WindowsEventForwarding\Subscriptions:
merge_hash_array: UniqueKeyValTuples
merge_options:
tuple_keys:
- SubscriptionID