github.com/cilium/cilium@v1.16.2/pkg/hubble/metrics/flows-to-world/plugin.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package flows_to_world 5 6 import ( 7 "github.com/cilium/cilium/pkg/hubble/metrics/api" 8 ) 9 10 type flowsToWorldPlugin struct{} 11 12 func (p *flowsToWorldPlugin) NewHandler() api.Handler { 13 return &flowsToWorldHandler{} 14 } 15 16 func (p *flowsToWorldPlugin) HelpText() string { 17 return `flows-to-world - External flow metrics 18 Reports metrics related to flows to reserved:world. 19 20 Metrics: 21 hubble_flows_to_world_total Number of flows to reserved:world. 22 23 Options: 24 any-drop - By default, this metric counts dropped flows if and only 25 if the drop_reason is "Policy denied". Set this option to 26 count any dropped flows to reserved:world. 27 port - Include destination port as a label. 28 syn-only - Only count non-reply SYNs for TCP flows.` + 29 api.ContextOptionsHelp 30 } 31 32 func init() { 33 api.DefaultRegistry().Register("flows-to-world", &flowsToWorldPlugin{}) 34 }