stats

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BotTotalStatsName                     = "bot_total"
	BotRunTotalStatsName                  = "bot_run_total"
	BookmarkTotalStatsName                = "bookmark_total"
	SearchTotalStatsName                  = "search_total"
	SearchProcessedDocumentTotalStatsName = "search_processed_document_total"
	QueueProcessedTasksTotalStatsName     = "queue_processed_tasks_total"
	QueueFailedTasksTotalStatsName        = "queue_failed_tasks_total"
	QueueInProgressTasksStatsName         = "queue_in_progress_tasks"
	EventTotalStatsName                   = "event_total"
	TorrentDownloadTotalStatsName         = "torrent_download_total"
	TorrentStatusTotalStatsName           = "torrent_status_total"
	GiteaIssueTotalStatsName              = "gitea_issue_total"
	KanbanEventTotalStatsName             = "kanban_event_total"
	KanbanTaskTotalStatsName              = "kanban_task_total"
	ReaderTotalStatsName                  = "reader_total"
	ReaderUnreadTotalStatsName            = "reader_unread_total"
	MonitorUpTotalStatsName               = "monitor_up_total"
	MonitorDownTotalStatsName             = "monitor_down_total"
	DockerContainerTotalStatsName         = "docker_container_total"
)

Variables

This section is empty.

Functions

func Init

func Init(config *MetricsConfig) error

Init initializes the metrics system

func PushNow added in v0.35.1

func PushNow() error

PushNow immediately pushes metrics to pushgateway

func PushWithContext added in v0.35.1

func PushWithContext(ctx context.Context) error

PushWithContext pushes metrics using a context

Types

type MetricInterface added in v0.35.1

type MetricInterface interface {
	Inc()
	Add(float64)
	Set(uint64) // compatibility with older code
}

MetricInterface compatibility interface supporting common methods for Counter and Gauge

func BookmarkTotalCounter added in v0.18.1

func BookmarkTotalCounter() MetricInterface

func BotRunTotalCounter added in v0.18.1

func BotRunTotalCounter(rulesetLabel RulesetLabel) MetricInterface

func BotTotalCounter added in v0.18.1

func BotTotalCounter() MetricInterface

func DockerContainerTotalCounter added in v0.30.2

func DockerContainerTotalCounter() MetricInterface

func EventTotalCounter added in v0.18.1

func EventTotalCounter() MetricInterface

func GiteaIssueTotalCounter added in v0.22.1

func GiteaIssueTotalCounter(status string) MetricInterface

func KanbanEventTotalCounter added in v0.23.1

func KanbanEventTotalCounter(name string) MetricInterface

func KanbanTaskTotalCounter added in v0.29.3

func KanbanTaskTotalCounter() MetricInterface

func MonitorDownTotalCounter added in v0.35.1

func MonitorDownTotalCounter() MetricInterface

func MonitorUpTotalCounter added in v0.35.1

func MonitorUpTotalCounter() MetricInterface

func QueueFailedTasksTotalCounter added in v0.18.1

func QueueFailedTasksTotalCounter(taskType string) MetricInterface

func QueueInProgressTasksCounter added in v0.18.1

func QueueInProgressTasksCounter(taskType string) MetricInterface

func QueueProcessedTasksTotalCounter added in v0.18.1

func QueueProcessedTasksTotalCounter(taskType string) MetricInterface

func ReaderTotalCounter added in v0.24.1

func ReaderTotalCounter() MetricInterface

func ReaderUnreadTotalCounter added in v0.24.1

func ReaderUnreadTotalCounter() MetricInterface

func SearchProcessedDocumentTotalCounter added in v0.21.2

func SearchProcessedDocumentTotalCounter(index string) MetricInterface

func SearchTotalCounter added in v0.18.1

func SearchTotalCounter(index string) MetricInterface

func TorrentDownloadTotalCounter added in v0.21.2

func TorrentDownloadTotalCounter() MetricInterface

func TorrentStatusTotalCounter added in v0.21.2

func TorrentStatusTotalCounter(status string) MetricInterface

type MetricsConfig added in v0.35.1

type MetricsConfig struct {
	PushGatewayURL string
	JobName        string
	PushInterval   time.Duration
}

MetricsConfig configuration struct

type RulesetLabel added in v0.18.1

type RulesetLabel string
const (
	InputRuleset   RulesetLabel = "input"
	AgentRuleset   RulesetLabel = "agent"
	CommandRuleset RulesetLabel = "command"
	CronRuleset    RulesetLabel = "cron"
	FormRuleset    RulesetLabel = "form"
)

Jump to

Keyboard shortcuts

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