package cron

import (
	"github.com/prometheus/client_golang/prometheus"
)

var (
	reservedNodeMeteringRunTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "reserved_node_metering_run_total",
			Help: "Total runs of reserved-node metering cron job.",
		}, []string{"result"})

	reservedNodeMeteringDataplaneAccessTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "reserved_node_metering_dataplane_access_total",
			Help: "Total dataplane access attempts in reserved-node metering.",
		}, []string{"result"})

	reservedNodeMeteringWriteTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "reserved_node_metering_write_total",
			Help: "Total reserved-node metering data write attempts.",
		}, []string{"result"})

	reservedNodeMeteringCompensationSecondsTotal = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "reserved_node_metering_compensation_seconds_total",
			Help: "Total seconds processed in reserved-node compensation window.",
		})

	reservedNodeMeteringNodeDropTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "reserved_node_metering_node_drop_total",
			Help: "Total reserved nodes dropped from billing.",
		}, []string{"reason"})

	reservedNodeMeteringCPUMismatchTotal = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "reserved_node_metering_cpu_mismatch_total",
			Help: "Total reserved nodes with node-spec CPU mismatching status.capacity.cpu.",
		})
)

func init() {
	prometheus.MustRegister(reservedNodeMeteringRunTotal)
	prometheus.MustRegister(reservedNodeMeteringDataplaneAccessTotal)
	prometheus.MustRegister(reservedNodeMeteringWriteTotal)
	prometheus.MustRegister(reservedNodeMeteringCompensationSecondsTotal)
	prometheus.MustRegister(reservedNodeMeteringNodeDropTotal)
	prometheus.MustRegister(reservedNodeMeteringCPUMismatchTotal)
}
