Hi again,
Following this topic: Winlogbeat.yml should specify the "api" attribute is available
In the Winlogbeat code, "localhost" is hardcoded as the Event Log session/log:
Here for "wineventlog.go":
subscriptionHandle, err := win.Subscribe(
**0, // Session - nil for localhost**
signalEvent,
"", // Channel - empty b/c channel is in the query
l.query, // Query - nil means all events
bookmark, // Bookmark - for resuming from a specific event
win.EvtSubscribeStartAfterBookmark)
if err != nil {
return err
}
And here for "eventlogging.go":
func (l *eventLogging) Open(recordNumber uint64) error {
detailf("%s Open(recordNumber=%d) calling OpenEventLog(uncServerPath=, "+
"providerName=%s)", l.logPrefix, recordNumber, l.name)
handle, err := win.OpenEventLog("", l.name)
It should be possible to specify a remote host since both APIs support it.
I have integrated it so I could create a pull request if you are interested.
O.