Skip to content
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

PBlock variables are not printing properly with custom format. #521

Closed
gabrielmocan opened this issue Apr 30, 2024 · 0 comments
Closed

PBlock variables are not printing properly with custom format. #521

gabrielmocan opened this issue Apr 30, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@gabrielmocan
Copy link

Hi Pete,

I'm experimenting with NAT/NSEL stuff, and I came across something:

root# nfdump -r nfcapd.202404301201 -o json
[
{
	"type" : "EVENT",
	"export_sysid" : 1,
	"first" : "2024-04-30T12:01:02.332",
	"last" : "2024-04-30T12:01:02.332",
	"received" : "2024-04-30T12:01:26.719",
	"in_packets" : 0,
	"in_bytes" : 0,
	"proto" : 17,
	"tcp_flags" : "........",
	"src_port" : 0,
	"dst_port" : 0,
	"fwd_status" : 0,
	"src_tos" : 0,
	"src4_addr" : "100.66.79.193",
	"dst4_addr" : "0.0.0.0",
	"src4_geo" : "",
	"dst4_geo" : "",
	"ip4_router" : "suppressed",
	"src4_xlt_ip" : "suppressed",
	"dst4_xlt_ip" : "0.0.0.0",
	"nat_event_id" : 1,
	"nat_event" : "NAT translation create",
	"nat_pool_id" : 0,
	"t_event" : "2024-04-30T12:01:02.332",
	"pblock_start" : 1536,
	"pblock_end" : 0,
	"pblock_step" : 1,
	"pblock_size" : 512,
	"ingress_vrf" : 0,
	"egress_vrf" : 0,
	"sampled" : 0
},
{
	"type" : "EVENT",
	"export_sysid" : 1,
	"first" : "2024-04-30T12:01:02.356",
	"last" : "2024-04-30T12:01:02.356",
	"received" : "2024-04-30T12:01:26.719",
	"in_packets" : 0,
	"in_bytes" : 0,
	"proto" : 6,
	"tcp_flags" : "........",
	"src_port" : 0,
	"dst_port" : 0,
	"fwd_status" : 0,
	"src_tos" : 0,
	"src4_addr" : "100.66.79.193",
	"dst4_addr" : "0.0.0.0",
	"src4_geo" : "",
	"dst4_geo" : "",
	"ip4_router" : "suppressed",
	"src4_xlt_ip" : "suppressed",
	"dst4_xlt_ip" : "0.0.0.0",
	"nat_event_id" : 1,
	"nat_event" : "NAT translation create",
	"nat_pool_id" : 0,
	"t_event" : "2024-04-30T12:01:02.356",
	"pblock_start" : 1536,
	"pblock_end" : 0,
	"pblock_step" : 1,
	"pblock_size" : 512,
	"ingress_vrf" : 0,
	"egress_vrf" : 0,
	"sampled" : 0
}]

Now with custom format:

root# nfdump -Nq -r nfcapd.202404301201 -o "fmt:%evt %msec %sa %xsa %pbstart %pbend %pbstep %pbsize"
1 1714489262332 100.66.79.193 suppressed       0       0       0       0
1 1714489262356 100.66.79.193 suppressed       0       0       0       0
@phaag phaag self-assigned this May 6, 2024
@phaag phaag added the bug Something isn't working label May 6, 2024
@phaag phaag closed this as completed in 43fd78d May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants