-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add Azure Event Hub and Log Analytics Operators #287
Conversation
|
|
… type, because we cannot predict which log fields will be present.
|
… prevent Elasticsearch record.data conflicts
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. I suggested a few improvements, but nothing that is functionally important.
Of course we need to fix tests as well.
…oved test cases for parse() as they are redundant with TestParseEvent() and not part of the public interface. Updated test cases for loganalytics to reflect the new resource.
… used once, and we check to see if it is not true.
…a's persistence package handles locking on its own.
…, in order to reuse the code between both operators. Input configuration is unchanged due to yaml:",inline"
|
… the configuration of both azure operators
|
|
Codecov Report
@@ Coverage Diff @@
## master #287 +/- ##
==========================================
- Coverage 71.72% 70.62% -1.10%
==========================================
Files 104 112 +8
Lines 5725 5956 +231
==========================================
+ Hits 4106 4206 +100
- Misses 1181 1304 +123
- Partials 438 446 +8
Continue to review full report at Codecov.
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description of Changes
This PR replaces #280. and #285.
operator/builtin/input/azure
operator/builtin/input/azure/eventhub
operator/builtin/input/azure/loganalytics
Both operators rely heavily upon methods provided by the azure packages
EventHub
type, for connecting to Event Hub and streaming events.Azure Event Hub Input Operator
This operator acts as a thin wrapper around
azure.EventHub
. It relies solely onazure.ParseEvent
for event parsing. It makes no assumptions on the structure of the data, or which fields to expect.record.data
will contain the event's message.Azure Log Analytics Input Operator
Azure Log Analytics can forward logs to Azure Event Hub. The event's
data
field contains batch log entries as serialized json. The raw message looks like this when coming though the Azure Event Hub Input Operator:This operator builds on top of
azure.EventHub
by:azure.ParseEvent
for initial event parsingazure_log_analytics_type
label from the Log Analyticstype
record fieldtimegenerated
record field as the entry's timestampRecords
data
field into multiple entriesParsed entries look like this. Note that all log analytics fields are nested under
record.containerlog
, wherecontainerlog
is the name of the Log Analytics table that the logs originated from:Each entry derived from the event's batch retains shared records such as
system_properties
.Please check that the PR fulfills these requirements