stats

package
v1.17.9 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppStats added in v1.8.12

type AppStats struct {
	Applications int `json:"applications"`
	Instances    int `json:"instances"`
}

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

func NewCollector

func NewCollector(disabled bool, instanceUuid, version string, edition string, db *db.DB, cache *cache.Cache, pricing *cloud_pricing.Manager, globalClickHouse *db.IntegrationClickhouse) *Collector

func (*Collector) MiddleWare added in v1.11.4

func (c *Collector) MiddleWare(next http.Handler) http.Handler

func (*Collector) RegisterRequest

func (c *Collector) RegisterRequest(r *http.Request)

func (*Collector) Stats added in v1.8.12

func (c *Collector) Stats(r *http.Request, w http.ResponseWriter)

type Component added in v1.8.5

type Component struct {
	Id        model.ApplicationId `json:"id"`
	Instances []*Instance         `json:"instances"`
}

type Container added in v1.8.5

type Container struct {
	CpuTotal      timeseries.Value `json:"cpu_total"`
	CpuUsage      timeseries.Value `json:"cpu_usage"`
	CpuLimit      timeseries.Value `json:"cpu_limit"`
	CpuDelay      timeseries.Value `json:"cpu_delay"`
	CpuThrottling timeseries.Value `json:"cpu_throttling"`
	MemoryTotal   timeseries.Value `json:"memory_total"`
	MemoryUsage   timeseries.Value `json:"memory_usage"`
	MemoryLimit   timeseries.Value `json:"memory_limit"`
	MemoryOOMs    timeseries.Value `json:"memory_ooms"`
	Restarts      timeseries.Value `json:"restarts"`
}

type Event

type Event struct {
	Type       string `json:"type"`
	DeviceId   string `json:"device_id"`
	DeviceSize string `json:"device_size"`
	Path       string `json:"path"`
	Theme      string `json:"theme"`
}

type InspectionOverride

type InspectionOverride struct {
	ProjectLevel     int `json:"project_level"`
	ApplicationLevel int `json:"application_level"`
}

type Instance added in v1.8.5

type Instance struct {
	Containers map[string]*Container `json:"containers"`
	Volumes    []*Volume             `json:"volumes"`
}

type Stats

type Stats struct {
	Instance struct {
		Uuid             string `json:"uuid"`
		Version          string `json:"version"`
		DatabaseType     string `json:"database_type"`
		Edition          string `json:"edition"`
		InstallationType string `json:"installation_type,omitempty"`
	} `json:"instance"`
	Integration struct {
		Prometheus                bool                                 `json:"prometheus"`
		PrometheusRefreshInterval int                                  `json:"prometheus_refresh_interval"`
		NodeAgent                 bool                                 `json:"node_agent"`
		NodeAgentVersions         *utils.StringSet                     `json:"node_agent_versions"`
		KubeStateMetrics          *bool                                `json:"kube_state_metrics"`
		InspectionOverrides       map[model.CheckId]InspectionOverride `json:"inspection_overrides"`
		ApplicationCategories     int                                  `json:"application_categories"`
		AlertingIntegrations      *utils.StringSet                     `json:"alerting_integrations"`
		CloudCosts                bool                                 `json:"cloud_costs"`
		Clickhouse                bool                                 `json:"clickhouse"`
		Tracing                   bool                                 `json:"tracing"`
		Logs                      bool                                 `json:"logs"`
		Profiles                  bool                                 `json:"profiles"`
	} `json:"integration"`
	Stack struct {
		Clouds               *utils.StringSet `json:"clouds"`
		Services             *utils.StringSet `json:"services"`
		InstrumentedServices *utils.StringSet `json:"instrumented_services"`
	} `json:"stack"`
	Infra struct {
		Projects            int                                 `json:"projects"`
		Nodes               int                                 `json:"nodes"`
		CPUCores            int                                 `json:"cpu_cores"`
		Applications        int                                 `json:"applications"`
		ApplicationsByKind  map[model.ApplicationKind]*AppStats `json:"applications_by_kind"`
		Instances           int                                 `json:"instances"`
		Deployments         int                                 `json:"deployments"`
		DeploymentSummaries map[string]int                      `json:"deployment_summaries"`
		KernelVersions      *utils.StringSet                    `json:"kernel_versions"`
	} `json:"infra"`
	UX struct {
		WorldLoadTimeAvg  float32                    `json:"world_load_time_avg"`
		AuditTimeAvg      float32                    `json:"audit_time_avg"`
		UsersByScreenSize map[string]int             `json:"users_by_screen_size"`
		UsersByTheme      map[string]int             `json:"users_by_theme"`
		Users             *utils.StringSet           `json:"users"`
		UsersByRole       map[string]int             `json:"users_by_role"`
		PageViews         map[string]int             `json:"page_views"`
		ApiCalls          map[string]int             `json:"api_calls"`
		SentNotifications map[db.IntegrationType]int `json:"sent_notifications"`
	} `json:"ux"`
	Performance struct {
		Constructor constructor.Profile `json:"constructor"`
		Auditor     auditor.Profile     `json:"auditor"`
		Components  []*Component        `json:"components"`
	} `json:"performance"`
	Profile struct {
		From   int64  `json:"from"`
		To     int64  `json:"to"`
		CPU    string `json:"cpu"`
		Memory string `json:"memory"`
	} `json:"profile"`
}

type Volume added in v1.8.5

type Volume struct {
	Size           timeseries.Value `json:"size"`
	Usage          timeseries.Value `json:"usage"`
	ReadLatency    timeseries.Value `json:"read_latency"`
	WriteLatency   timeseries.Value `json:"write_latency"`
	Reads          timeseries.Value `json:"reads"`
	Writes         timeseries.Value `json:"writes"`
	ReadBandwidth  timeseries.Value `json:"read_bandwidth"`
	WriteBandwidth timeseries.Value `json:"write_bandwidth"`
}

Jump to

Keyboard shortcuts

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