github.com/cilium/cilium@v1.16.2/pkg/hubble/metrics/icmp/plugin.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Hubble 3 4 package icmp 5 6 import ( 7 "github.com/cilium/cilium/pkg/hubble/metrics/api" 8 ) 9 10 type icmpPlugin struct{} 11 12 func (p *icmpPlugin) NewHandler() api.Handler { 13 return &icmpHandler{} 14 } 15 16 func (p *icmpPlugin) HelpText() string { 17 return `icmp - icmp metrics 18 Reports metrics related to the Internet Control Message Protocol (ICMP) such as 19 message counts. 20 21 Metrics: 22 hubble_icmp_total Number of ICMP messages by prorocol family and type 23 24 Options:` + 25 api.ContextOptionsHelp 26 } 27 28 func init() { 29 api.DefaultRegistry().Register("icmp", &icmpPlugin{}) 30 }