Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update chisels to support ipv6
Browse files Browse the repository at this point in the history
In cases where a chisel's filter was specific to ipv4, also allow ipv6.
mstemm committed Aug 20, 2018
1 parent 4617ac3 commit d134f3a
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion userspace/sysdig/chisels/netstat.lua
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ end
require "common"
local dctable = {}
local capturing = false
local filter = "(fd.type=ipv4)"
local filter = "(fd.type=ipv4 or fd.type=ipv6)"
local match = false

-- Argument notification callback
4 changes: 2 additions & 2 deletions userspace/sysdig/chisels/spy_ip.lua
Original file line number Diff line number Diff line change
@@ -66,8 +66,8 @@ function on_init()
sysdig.set_snaplen(1000)

-- set the filter
chisel.set_filter("evt.is_io=true and fd.type=ipv4 and fd.ip=" .. addr)
chisel.set_filter("evt.is_io=true and (fd.type=ipv4 or fd.type=ipv6) and fd.ip=" .. addr)

return true
end

2 changes: 1 addition & 1 deletion userspace/sysdig/chisels/spy_port.lua
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ function on_init()
sysdig.set_snaplen(1000)

-- set the filter
chisel.set_filter("evt.is_io=true and fd.type=ipv4 and fd.port=" .. port )
chisel.set_filter("evt.is_io=true and (fd.type=ipv4 or fd.type=ipv6) and fd.port=" .. port )
return true
end

2 changes: 1 addition & 1 deletion userspace/sysdig/chisels/v_port_bindings.lua
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ view_info =
tags = {"default", "wsysdig", "nocsysdig"},
view_type = "list",
applies_to = {""},
filter = "(evt.type=bind and evt.dir=< and fd.type=ipv4) or (evt.type=close and evt.dir=> and fd.typechar=2 and fd.type=ipv4)",
filter = "(evt.type=bind and evt.dir=< and (fd.type=ipv4 or fd.type=ipv6)) or (evt.type=close and evt.dir=> and fd.typechar=2 and fd.type=ipv4)",
use_defaults = true,
columns =
{
2 changes: 1 addition & 1 deletion userspace/sysdig/chisels/v_sports.lua
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ view_info =
tags = {"wsysdig"},
view_type = "table",
applies_to = {"", "container.id", "proc.pid", "thread.nametid", "thread.tid", "proc.name", "evt.res", "k8s.pod.id", "k8s.rc.id", "k8s.rs.id", "k8s.svc.id", "k8s.ns.id", "marathon.app.id", "marathon.group.name", "mesos.task.id", "mesos.framework.name"},
filter = "fd.type=ipv4 and fd.name!=''",
filter = "(fd.type=ipv4 or fd.type=ipv6) and fd.name!=''",
use_defaults = true,
drilldown_target = "connections",
columns =
4 changes: 2 additions & 2 deletions userspace/sysdig/chisels/wsysdig_summary.lua
Original file line number Diff line number Diff line change
@@ -1162,7 +1162,7 @@ function build_output(captureDuration)
category = 'performance',
targetView = 'echo',
targetViewTitle = 'HTTP responses',
targetViewFilter = 'fd.type=ipv4 and evt.buffer contains "HTTP/"',
targetViewFilter = '(fd.type=ipv4 or fd.type=ipv6) and evt.buffer contains "HTTP/"',
drillDownKey = 'fd.directory',
data = gsummary.sysReqCountHttp
}
@@ -1175,7 +1175,7 @@ function build_output(captureDuration)
category = 'performance',
targetView = 'echo',
targetViewTitle = 'HTTP responses',
targetViewFilter = 'fd.type=ipv4 and evt.arg.data startswith "HTTP/" and not evt.arg.data contains "200"',
targetViewFilter = '(fd.type=ipv4 or fd.type=ipv6) and evt.arg.data startswith "HTTP/" and not evt.arg.data contains "200"',
drillDownKey = 'fd.directory',
data = gsummary.sysErrCountHttp
}

0 comments on commit d134f3a

Please sign in to comment.