metrics

package
v0.0.0-...-d212fee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OperationDBRows = promauto.NewGauge(
		prometheus.GaugeOpts{
			Name:        "total_number_of_operationDB_rows",
			Help:        "Total number of operation DB rows",
			ConstLabels: map[string]string{"name": "total_operation_DB_rows"},
		},
	)

	OperationDBRowsInWaitingState = promauto.NewGauge(
		prometheus.GaugeOpts{
			Name:        "operationDB_rows_in_waiting_state",
			Help:        "Number of operation DB rows in waiting state",
			ConstLabels: map[string]string{"operationDBState": "Waiting"},
		},
	)

	OperationDBRowsIn_InProgressState = promauto.NewGauge(
		prometheus.GaugeOpts{
			Name:        "operationDB_rows_in_in_progress_state",
			Help:        "Number of operation DB rows in in_progress state",
			ConstLabels: map[string]string{"operationDBState": "In_Progress"},
		},
	)

	OperationDBRowsInCompletedState = promauto.NewGauge(
		prometheus.GaugeOpts{
			Name:        "operationDB_rows_in_completed_state",
			Help:        "Number of operation DB rows in completed state",
			ConstLabels: map[string]string{"operationDBState": "Completed"},
		},
	)

	OperationDBRowsInErrorState = promauto.NewGauge(
		prometheus.GaugeOpts{
			Name:        "operationDB_rows_in_error_state",
			Help:        "Number of operation DB rows in error state",
			ConstLabels: map[string]string{"operationDBState": "Failed"},
		},
	)

	TotalOperationDBRowsInCompletedState = promauto.NewGauge(
		prometheus.GaugeOpts{
			Name:        "total_operationDB_rows_in_complete_state",
			Help:        "Number of Operation DB rows in complete state",
			ConstLabels: map[string]string{"operationDBRow": "CompleteState"},
		},
	)

	TotalOperationDBRowsInNonCompleteState = promauto.NewGauge(
		prometheus.GaugeOpts{
			Name:        "operationDB_rows_in_non_complete_state",
			Help:        "Number of Operation DB rows in non complete state",
			ConstLabels: map[string]string{"operationDBRow": "NonCompleteState"},
		},
	)
)
View Source
var (
	Gitopsdepl = promauto.NewGauge(
		prometheus.GaugeOpts{
			Name:        "active_gitopsDeployments",
			Help:        "Total number of active GitopsDeployments",
			ConstLabels: map[string]string{"gitopsDeployment": "success"},
		},
	)
	GitopsdeplFailures = promauto.NewGauge(
		prometheus.GaugeOpts{
			Name:        "gitopsDeployments_failures",
			Help:        "Total number of GitOpsDeployments with an error status",
			ConstLabels: map[string]string{"gitopsDeployment": "fail"},
		},
	)
)

Functions

func AddOrUpdateGitOpsDeployment

func AddOrUpdateGitOpsDeployment(resourceName string, resourceNamespace string, resourceNamespaceUID string)

func ClearDBMetrics

func ClearDBMetrics()

func ClearMetrics

func ClearMetrics()

func RemoveGitOpsDeployment

func RemoveGitOpsDeployment(resourceName string, resourceNamespace string, resourceNamespaceUID string)

func SetCountOfOperationDBRows

func SetCountOfOperationDBRows(state string, count int)

SetCountOfOperationDBRows counts the operation DB rows in In_Progress, Waiting, Completed and Failed state

func SetCountOfOperationDBRowsInCompleteState

func SetCountOfOperationDBRowsInCompleteState(count int)

SetCountOfOperationDBRowsInCompleteState counts the operation DB rows in complete(Complete and Failed) state

func SetCountOfOperationDBRowsInNonCompleteState

func SetCountOfOperationDBRowsInNonCompleteState(count int)

SetCountOfOperationDBRowsInNonCompleteState counts the operation DB rows in non-complete(In_Progress and Waiting) state

func SetErrorState

func SetErrorState(resourceName string, resourceNamespace string, resourceNamespaceUID string, newInErrorState bool)

func SetTotalCountOfOperationDBRows

func SetTotalCountOfOperationDBRows(count int)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL