Skip to content

Commit

Permalink
pkg/option: add metrics-label-filter flag
Browse files Browse the repository at this point in the history
add metrics-label-filter
add example config

Signed-off-by: Jack-R-lantern <tjdfkr2421@gmail.com>
  • Loading branch information
Jack-R-lantern committed Nov 1, 2023
1 parent 90c0769 commit 651c61e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/content/en/docs/reference/daemon-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Flags:
--kmods strings List of kernel modules to load symbols from
--log-format string Set log format (default "text")
--log-level string Set log level (default "info")
--metrics-label-filter string Comma-separated list of enabled metric labels. (e.g. "namespace,workload,pod,binary") By default all labels are enabled.
--metrics-server string Metrics server address (e.g. ':2112'). Disabled by default
--netns-dir string Network namespace dir (default "/var/run/docker/netns/")
--process-cache-size int Size of the process cache (default 65536)
Expand Down
1 change: 1 addition & 0 deletions examples/configuration/tetragon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ kernel:
log-format: text
log-level: info
metrics-server:
metrics-label-filter:
netns-dir: /var/run/docker/netns/
pprof-addr:
process-cache-size: 65536
Expand Down
1 change: 1 addition & 0 deletions pkg/option/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ func AddFlags(flags *pflag.FlagSet) {
flags.String(KeyK8sKubeConfigPath, "", "Absolute path of the kubernetes kubeconfig file")
flags.Bool(KeyEnableProcessAncestors, true, "Include ancestors in process exec events")
flags.String(KeyMetricsServer, "", "Metrics server address (e.g. ':2112'). Disabled by default")
flags.String(KeyMetricsLabelFilter, "", "Comma-separated list of enabled metric labels. (e.g. \"namespace,workload,pod,binary\") By default all labels are enabled.")
flags.String(KeyServerAddress, "localhost:54321", "gRPC server address (e.g. 'localhost:54321' or 'unix:///var/run/tetragon/tetragon.sock'")
flags.String(KeyGopsAddr, "", "gops server address (e.g. 'localhost:8118'). Disabled by default")
flags.Bool(KeyEnableProcessCred, false, "Enable process_cred events")
Expand Down

0 comments on commit 651c61e

Please sign in to comment.