mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-03 18:53:13 -05:00 
			
		
		
		
	Cleanup a variety of metric issues. * Eliminate department of redundancy "count_total" naming. * Use the plural of the unit when appropriate. (ex, "requests") * Remove label names from metric names where appropriate. (ex, "rcode") * Simplify request metrics by consolidating type label in to the base request counter. * Re-generate man pages. Signed-off-by: Ben Kochie <superq@gmail.com> Co-authored-by: Ben Kochie <superq@gmail.com>
		
			
				
	
	
		
			25 lines
		
	
	
		
			652 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			652 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package reload
 | 
						|
 | 
						|
import (
 | 
						|
	"github.com/coredns/coredns/plugin"
 | 
						|
 | 
						|
	"github.com/prometheus/client_golang/prometheus"
 | 
						|
)
 | 
						|
 | 
						|
// Metrics for the reload plugin
 | 
						|
var (
 | 
						|
	FailedCount = prometheus.NewCounter(prometheus.CounterOpts{
 | 
						|
		Namespace: plugin.Namespace,
 | 
						|
		Subsystem: "reload",
 | 
						|
		Name:      "failed_total",
 | 
						|
		Help:      "Counter of the number of failed reload attempts.",
 | 
						|
	})
 | 
						|
 | 
						|
	reloadInfo = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 | 
						|
		Namespace: plugin.Namespace,
 | 
						|
		Subsystem: "reload",
 | 
						|
		Name:      "version_info",
 | 
						|
		Help:      "A metric with a constant '1' value labeled by hash, and value which type of hash generated.",
 | 
						|
	}, []string{"hash", "value"})
 | 
						|
)
 |