| 
									
										
										
										
											2020-03-31 14:07:36 +08:00
										 |  |  | package dnssec
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import (
 | 
					
						
							|  |  |  | 	"github.com/coredns/coredns/plugin"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	"github.com/prometheus/client_golang/prometheus"
 | 
					
						
							| 
									
										
										
										
											2020-07-25 23:06:28 +08:00
										 |  |  | 	"github.com/prometheus/client_golang/prometheus/promauto"
 | 
					
						
							| 
									
										
										
										
											2020-03-31 14:07:36 +08:00
										 |  |  | )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var (
 | 
					
						
							|  |  |  | 	// cacheSize is the number of elements in the dnssec cache.
 | 
					
						
							| 
									
										
										
										
											2020-07-25 23:06:28 +08:00
										 |  |  | 	cacheSize = promauto.NewGaugeVec(prometheus.GaugeOpts{
 | 
					
						
							| 
									
										
										
										
											2020-03-31 14:07:36 +08:00
										 |  |  | 		Namespace: plugin.Namespace,
 | 
					
						
							|  |  |  | 		Subsystem: "dnssec",
 | 
					
						
							|  |  |  | 		Name:      "cache_entries",
 | 
					
						
							|  |  |  | 		Help:      "The number of elements in the dnssec cache.",
 | 
					
						
							|  |  |  | 	}, []string{"server", "type"})
 | 
					
						
							|  |  |  | 	// cacheHits is the count of cache hits.
 | 
					
						
							| 
									
										
										
										
											2020-07-25 23:06:28 +08:00
										 |  |  | 	cacheHits = promauto.NewCounterVec(prometheus.CounterOpts{
 | 
					
						
							| 
									
										
										
										
											2020-03-31 14:07:36 +08:00
										 |  |  | 		Namespace: plugin.Namespace,
 | 
					
						
							|  |  |  | 		Subsystem: "dnssec",
 | 
					
						
							|  |  |  | 		Name:      "cache_hits_total",
 | 
					
						
							|  |  |  | 		Help:      "The count of cache hits.",
 | 
					
						
							|  |  |  | 	}, []string{"server"})
 | 
					
						
							|  |  |  | 	// cacheMisses is the count of cache misses.
 | 
					
						
							| 
									
										
										
										
											2020-07-25 23:06:28 +08:00
										 |  |  | 	cacheMisses = promauto.NewCounterVec(prometheus.CounterOpts{
 | 
					
						
							| 
									
										
										
										
											2020-03-31 14:07:36 +08:00
										 |  |  | 		Namespace: plugin.Namespace,
 | 
					
						
							|  |  |  | 		Subsystem: "dnssec",
 | 
					
						
							|  |  |  | 		Name:      "cache_misses_total",
 | 
					
						
							|  |  |  | 		Help:      "The count of cache misses.",
 | 
					
						
							|  |  |  | 	}, []string{"server"})
 | 
					
						
							|  |  |  | )
 |