github.com/cilium/cilium@v1.16.2/pkg/hubble/metrics/policy/plugin.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright Authors of Cilium
     3  
     4  package policy
     5  
     6  import (
     7  	"github.com/cilium/cilium/pkg/hubble/metrics/api"
     8  )
     9  
    10  type policyPlugin struct{}
    11  
    12  func (p *policyPlugin) NewHandler() api.Handler {
    13  	return &policyHandler{}
    14  }
    15  
    16  func (p *policyPlugin) HelpText() string {
    17  	return `policy - Policy metrics
    18  Reports metrics related to Cilium network policies.
    19  
    20  Metrics:
    21    hubble_policy_verdicts_total Total number of policy verdict events
    22  
    23  Options:` +
    24  		api.ContextOptionsHelp
    25  }
    26  
    27  func init() {
    28  	api.DefaultRegistry().Register("policy", &policyPlugin{})
    29  }