-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Support protocol: Cassandra #1959
Merged
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
1cfa948
Add protocol: Cassandra
medcl 323b1bb
Fix gofmt style
medcl ecc5e37
Remove recursive call in errType
medcl 11a8d23
remove duplicated snappy in glide.yaml
medcl 589ae11
update beats config
medcl 26ddaca
fix logging bug
medcl e3d0122
refactor and try to direct use streambuf.Buffer
medcl 7616dfd
update config comments
medcl 79cac0e
refactor cassandra decoder
medcl 864b1f5
bugfix and refactor
medcl 34ca244
cleanup comments
medcl beef417
bugfix
medcl 6c4003c
prefer to use debugf, instead of logp.Debug()
medcl 448fd48
remove unused import
medcl 81ad366
minor improve to parser
medcl 34ad18f
refactor framops ignoring, add test methond
medcl 0297c36
fix build
medcl d0b915c
fix array_decoder
medcl ff7ed3d
refactor and fix tracing protocol bug
medcl 665de42
minor improvments, add trace test
medcl 9c6547f
minor change to pub.go
medcl 0739c75
throw error while compressor is not set but hit compress flag
medcl e54663f
add test for compressed frame
medcl 0ce69fa
add docs
medcl d1c467f
add ignore ops list
medcl 2117cb6
update section in alphabetical order
medcl 615ce3a
add sample output and kibana dashboard
medcl 2675b38
update kibana dashboard
medcl ccce922
update changelog
medcl d5f9fbd
update dashboard
medcl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
minor improvments, add trace test
- Loading branch information
commit 665de42a64a4dd455bbf7485ea7bb24bbc7cac1e
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,11 +67,17 @@ func (pub *transPub) createEvent(requ, resp *message) common.MapStr { | |
} | ||
|
||
if pub.sendRequest { | ||
if requ.data == nil { | ||
requ.data = map[string]interface{}{} | ||
} | ||
|
||
if pub.sendRequestHeader { | ||
requ.data["request_headers"] = requ.header | ||
} | ||
|
||
event["cassandra_request"] = requ.data | ||
if len(requ.data) > 0 { | ||
event["cassandra_request"] = requ.data | ||
} | ||
} | ||
|
||
dst := &common.Endpoint{ | ||
|
@@ -97,11 +103,18 @@ func (pub *transPub) createEvent(requ, resp *message) common.MapStr { | |
event["bytes_out"] = resp.Size | ||
|
||
if pub.sendResponse { | ||
if resp.data == nil { | ||
resp.data = map[string]interface{}{} | ||
} | ||
|
||
if pub.sendResponseHeader { | ||
resp.data["response_headers"] = resp.header | ||
} | ||
|
||
event["cassandra_response"] = resp.data | ||
if len(resp.data) > 0 { | ||
event["cassandra_response"] = resp.data | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as for requ.data |
||
|
||
} | ||
|
||
return event | ||
|
Binary file added
BIN
+285 Bytes
packetbeat/tests/system/pcaps/cassandra/v4/cassandra_trace_err.pcap
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
block can be changed to:
len(requ.data) == 0
ifrequ.data == nil
. This way we don't need to create a map if sendRequestHeader is false