| 
									
										
										
										
											2018-01-08 11:52:25 +01:00
										 |  |  | package template
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 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"
 | 
					
						
							| 
									
										
										
										
											2018-01-08 11:52:25 +01:00
										 |  |  | )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var (
 | 
					
						
							| 
									
										
										
										
											2020-03-31 14:07:36 +08:00
										 |  |  | 	// templateMatchesCount is the counter of template regex matches.
 | 
					
						
							| 
									
										
										
										
											2020-07-25 23:06:28 +08:00
										 |  |  | 	templateMatchesCount = promauto.NewCounterVec(prometheus.CounterOpts{
 | 
					
						
							| 
									
										
										
										
											2018-01-08 11:52:25 +01:00
										 |  |  | 		Namespace: plugin.Namespace,
 | 
					
						
							|  |  |  | 		Subsystem: "template",
 | 
					
						
							|  |  |  | 		Name:      "matches_total",
 | 
					
						
							|  |  |  | 		Help:      "Counter of template regex matches.",
 | 
					
						
							| 
									
										
										
										
											2018-04-27 19:37:12 +01:00
										 |  |  | 	}, []string{"server", "zone", "class", "type"})
 | 
					
						
							| 
									
										
										
										
											2020-03-31 14:07:36 +08:00
										 |  |  | 	// templateFailureCount is the counter of go template failures.
 | 
					
						
							| 
									
										
										
										
											2020-07-25 23:06:28 +08:00
										 |  |  | 	templateFailureCount = promauto.NewCounterVec(prometheus.CounterOpts{
 | 
					
						
							| 
									
										
										
										
											2018-01-08 11:52:25 +01:00
										 |  |  | 		Namespace: plugin.Namespace,
 | 
					
						
							|  |  |  | 		Subsystem: "template",
 | 
					
						
							|  |  |  | 		Name:      "template_failures_total",
 | 
					
						
							|  |  |  | 		Help:      "Counter of go template failures.",
 | 
					
						
							| 
									
										
										
										
											2018-04-27 19:37:12 +01:00
										 |  |  | 	}, []string{"server", "zone", "class", "type", "section", "template"})
 | 
					
						
							| 
									
										
										
										
											2020-03-31 14:07:36 +08:00
										 |  |  | 	// templateRRFailureCount is the counter of mis-templated RRs.
 | 
					
						
							| 
									
										
										
										
											2020-07-25 23:06:28 +08:00
										 |  |  | 	templateRRFailureCount = promauto.NewCounterVec(prometheus.CounterOpts{
 | 
					
						
							| 
									
										
										
										
											2018-01-08 11:52:25 +01:00
										 |  |  | 		Namespace: plugin.Namespace,
 | 
					
						
							|  |  |  | 		Subsystem: "template",
 | 
					
						
							|  |  |  | 		Name:      "rr_failures_total",
 | 
					
						
							|  |  |  | 		Help:      "Counter of mis-templated RRs.",
 | 
					
						
							| 
									
										
										
										
											2018-04-27 19:37:12 +01:00
										 |  |  | 	}, []string{"server", "zone", "class", "type", "section", "template"})
 | 
					
						
							| 
									
										
										
										
											2018-01-08 11:52:25 +01:00
										 |  |  | )
 |