generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Description
The json logging can be very powerful to troubleshoot network policies, specially using the packet json format and the results of the evaluation, it will be nice to document some examples on how to use it
{
"ts": 1720777151838.3552,
"caller": "networkpolicy/controller.go:461",
"msg": "Evaluating packet",
"v": 2,
"packet": {
"Id": 9,
"Family": "IPv4",
"SrcIP": "11.0.3.3",
"DstIP": "11.0.2.2",
"Proto": "TCP",
"SrcPort": 33803,
"DstPort": 6000
}
}
Text output is not altered:
I0712 09:53:52.257809 1 controller.go:461] "Evaluating packet" packet=<
[8] 11.0.1.3:40243 11.0.2.2:6000 TCP
00000000 00 00 a0 02 fa f0 19 33 00 00 02 04 05 b4 04 02 |.......3........|
00000010 08 0a c1 d9 c1 bd 00 00 00 00 01 03 03 07 |..............|
>
Originally posted by @uablrek in #50 (comment)
paulgmiller
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.