mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 10:13:14 -04:00 
			
		
		
		
	add local plugin (#4262)
* add local plugin See: #4260 Signed-off-by: Miek Gieben <miek@miek.nl> * stickler bot Signed-off-by: Miek Gieben <miek@miek.nl> * See Also Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
		
							
								
								
									
										18
									
								
								plugin/local/metrics.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								plugin/local/metrics.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| package local | ||||
|  | ||||
| import ( | ||||
| 	"github.com/coredns/coredns/plugin" | ||||
|  | ||||
| 	"github.com/prometheus/client_golang/prometheus" | ||||
| 	"github.com/prometheus/client_golang/prometheus/promauto" | ||||
| ) | ||||
|  | ||||
| var ( | ||||
| 	// LocalhostCount report the number of times we've seen a localhost.<domain> query. | ||||
| 	LocalhostCount = promauto.NewCounter(prometheus.CounterOpts{ | ||||
| 		Namespace: plugin.Namespace, | ||||
| 		Subsystem: "local", | ||||
| 		Name:      "localhost_requests_total", | ||||
| 		Help:      "Counter of localhost.<domain> requests.", | ||||
| 	}) | ||||
| ) | ||||
		Reference in New Issue
	
	Block a user