Skip to content
Snippets Groups Projects
metrics.go 1.39 KiB
Newer Older
  • Learn to ignore specific revisions
  • Malte Bauch's avatar
    Malte Bauch committed
    package nucleus
    
    import (
    	"github.com/prometheus/client_golang/prometheus"
    	"github.com/prometheus/client_golang/prometheus/promauto"
    )
    
    var (
    
    	networkElementCreationsTotal = promauto.NewCounterVec(
    
    Malte Bauch's avatar
    Malte Bauch committed
    		prometheus.CounterOpts{
    			Name: "device_creations_total",
    			Help: "Total number of created devices",
    		},
    		[]string{"type"},
    	)
    
    
    	networkElementCreationDurationSecondsTotal = promauto.NewCounterVec(
    
    Malte Bauch's avatar
    Malte Bauch committed
    		prometheus.CounterOpts{
    			Name: "device_creation_duration_seconds_total",
    			Help: "Total time needed to create devices",
    		},
    		[]string{"type"},
    	)
    
    
    	networkElementCreationDurationSeconds = promauto.NewHistogramVec(
    
    Malte Bauch's avatar
    Malte Bauch committed
    		prometheus.HistogramOpts{
    			Name: "device_creation_duration_seconds",
    
    			Help: "Histogram of network element creation times",
    
    Malte Bauch's avatar
    Malte Bauch committed
    		},
    		[]string{"type"},
    	)
    
    
    	networkElementDeletionsTotal = promauto.NewCounterVec(
    
    Malte Bauch's avatar
    Malte Bauch committed
    		prometheus.CounterOpts{
    			Name: "device_deletions_total",
    			Help: "Total number of deleted devices",
    		},
    		[]string{"type"},
    	)
    
    
    	networkElementDeletionDurationSecondsTotal = promauto.NewCounterVec(
    
    Malte Bauch's avatar
    Malte Bauch committed
    		prometheus.CounterOpts{
    			Name: "device_deletion_duration_seconds_total",
    			Help: "Total time needed to delete devices",
    		},
    		[]string{"type"},
    	)
    
    
    	networkElementDeletionDurationSeconds = promauto.NewHistogramVec(
    
    Malte Bauch's avatar
    Malte Bauch committed
    		prometheus.HistogramOpts{
    			Name: "device_deletion_duration_seconds",
    
    			Help: "Histogram of network element deletion times",
    
    Malte Bauch's avatar
    Malte Bauch committed
    		},
    		[]string{"type"},
    	)
    )