Documentation ¶
Index ¶
- Constants
- Variables
- func CalcApplicationDeploymentSummary(app *Application, checkConfigs CheckConfigs, t timeseries.Time, ...) ([]ApplicationDeploymentSummary, Status)
- func ContainerIdToServiceName(containerId string) string
- func GetConnectionsErrorsSum(connections []*Connection, protocolFilter func(protocol Protocol) bool) *timeseries.TimeSeries
- func GetConnectionsRequestsLatency(connections []*Connection, protocolFilter func(protocol Protocol) bool) *timeseries.TimeSeries
- func GetConnectionsRequestsSum(connections []*Connection, protocolFilter func(protocol Protocol) bool) *timeseries.TimeSeries
- func IsRequestStatusFailed(status string) bool
- func Quantile(histogram []HistogramBucket, q float32) *timeseries.TimeSeries
- type AlertRule
- type Annotation
- type Application
- func (app *Application) AddReport(name AuditReportName, widgets ...*Widget)
- func (app *Application) GetClientsConnections() map[ApplicationId][]*Connection
- func (app *Application) GetInstance(name, node string) *Instance
- func (app *Application) GetOrCreateInstance(name string, node *Node) *Instance
- func (app *Application) InstrumentationStatus() map[ApplicationType]bool
- func (app *Application) IsDotNet() bool
- func (app *Application) IsJvm() bool
- func (app *Application) IsK8s() bool
- func (app *Application) IsMongodb() bool
- func (app *Application) IsPostgres() bool
- func (app *Application) IsRedis() bool
- func (app *Application) IsStandalone() bool
- func (app *Application) Labels() Labels
- func (app *Application) SLOStatus() Status
- type ApplicationCategory
- type ApplicationDeployment
- type ApplicationDeploymentDetails
- type ApplicationDeploymentNotifications
- type ApplicationDeploymentState
- type ApplicationDeploymentStatus
- type ApplicationDeploymentSummary
- type ApplicationEvent
- type ApplicationEventType
- type ApplicationId
- type ApplicationIncident
- type ApplicationKind
- type ApplicationType
- type AuditReport
- func (r *AuditReport) AddWidget(w *Widget) *Widget
- func (r *AuditReport) CreateCheck(cfg CheckConfig) *Check
- func (r *AuditReport) GetOrCreateChart(title string) *Chart
- func (r *AuditReport) GetOrCreateChartGroup(title string) *ChartGroup
- func (r *AuditReport) GetOrCreateChartInGroup(title string, chartTitle string) *Chart
- func (r *AuditReport) GetOrCreateDependencyMap() *DependencyMap
- func (r *AuditReport) GetOrCreateHeatmap(title string) *Heatmap
- func (r *AuditReport) GetOrCreateTable(header ...string) *Table
- type AuditReportName
- type AvailabilitySLI
- type BurnRate
- type Chart
- func (ch *Chart) AddAnnotation(annotations ...Annotation) *Chart
- func (ch *Chart) AddMany(series map[string]SeriesData, topN int, topF timeseries.F) *Chart
- func (ch *Chart) AddSeries(name string, data SeriesData, color ...string) *Chart
- func (ch *Chart) Column() *Chart
- func (ch *Chart) Feature() *Chart
- func (ch *Chart) IsEmpty() bool
- func (ch *Chart) Legend(on bool) *Chart
- func (ch *Chart) PercentilesFrom(histogram []HistogramBucket, percentiles ...float32) *Chart
- func (ch *Chart) SetThreshold(name string, data SeriesData) *Chart
- func (ch *Chart) ShiftColors() *Chart
- func (ch *Chart) Sorted() *Chart
- func (ch *Chart) Stacked() *Chart
- type ChartGroup
- type Check
- func (ch *Check) AddItem(format string, a ...any)
- func (ch *Check) Calc()
- func (ch *Check) Count() int64
- func (ch *Check) Desired() int64
- func (ch *Check) Fire()
- func (ch *Check) Inc(amount int64)
- func (ch *Check) Items() *utils.StringSet
- func (ch *Check) SetDesired(desired int64)
- func (ch *Check) SetStatus(status Status, format string, a ...any)
- func (ch *Check) SetValue(v float32)
- func (ch *Check) SetValues(vs *timeseries.TimeSeries)
- func (ch *Check) Value() float32
- func (ch *Check) Values() *timeseries.TimeSeries
- type CheckConfig
- type CheckConfigSLOAvailability
- type CheckConfigSLOLatency
- type CheckConfigSimple
- type CheckConfigs
- func (cc CheckConfigs) GetAvailability(appId ApplicationId) (CheckConfigSLOAvailability, bool)
- func (cc CheckConfigs) GetByCheck(id CheckId) map[ApplicationId][]any
- func (cc CheckConfigs) GetLatency(appId ApplicationId, category ApplicationCategory) (CheckConfigSLOLatency, bool)
- func (cc CheckConfigs) GetSimple(checkId CheckId, appId ApplicationId) CheckConfigSimple
- func (cc CheckConfigs) GetSimpleAll(checkId CheckId, appId ApplicationId) []*CheckConfigSimple
- type CheckContext
- type CheckId
- type CheckType
- type CheckUnit
- type ClusterRole
- type Connection
- type Container
- type ContainerStatus
- type Costs
- type CronJob
- type DaemonSet
- type DependencyMap
- type DependencyMapInstance
- type DependencyMapLink
- type DependencyMapNode
- type Deployment
- type DiskStats
- type DotNet
- type EBS
- type Elasticache
- type Heatmap
- type HistogramBucket
- type Icon
- type Indicator
- type Instance
- func (instance *Instance) AddUpstreamConnection(actualIP, actualPort, serviceIP, servicePort, container string) *Connection
- func (instance *Instance) ApplicationTypes() map[ApplicationType]bool
- func (instance *Instance) ClusterRole() *timeseries.TimeSeries
- func (instance *Instance) ClusterRoleLast() ClusterRole
- func (instance *Instance) GetOrCreateContainer(id, name string) *Container
- func (instance *Instance) InstrumentedType() ApplicationType
- func (instance *Instance) IsFailed() bool
- func (instance *Instance) IsListenActive(ip, port string) bool
- func (instance *Instance) IsObsolete() bool
- func (instance *Instance) IsUp() bool
- func (instance *Instance) LifeSpan() *timeseries.TimeSeries
- func (instance *Instance) NodeName() string
- func (instance *Instance) UpAndRunning() *timeseries.TimeSeries
- func (instance *Instance) UpdateClusterRole(role string, v *timeseries.TimeSeries)
- type IntegrationStatus
- type InterfaceStats
- type Job
- type Jvm
- type LabelLastValue
- type Labels
- type LatencySLI
- type Listen
- type LogLevel
- type LogMessages
- type LogPattern
- type Logs
- type MetricValues
- type MetricsSnapshot
- type Mongodb
- type NetInterface
- type Node
- type NodePrice
- type PgConnectionKey
- type PgSetting
- type Pod
- type Postgres
- type Profile
- type Progress
- type Protocol
- type QueryKey
- type QueryStat
- type Rds
- type Redis
- type ReplicaSet
- type RouterLink
- type Series
- type SeriesData
- type SeriesList
- type Service
- type StatefulSet
- type Status
- type Table
- type TableCell
- func (c *TableCell) AddTag(format string, a ...any) *TableCell
- func (c *TableCell) SetChart(ts *timeseries.TimeSeries) *TableCell
- func (c *TableCell) SetIcon(name, color string) *TableCell
- func (c *TableCell) SetMaxWidth(w int) *TableCell
- func (c *TableCell) SetProgress(percent int, color string) *TableCell
- func (c *TableCell) SetShortValue(value string) *TableCell
- func (c *TableCell) SetStatus(status Status, msg string) *TableCell
- func (c *TableCell) SetStub(format string, a ...any) *TableCell
- func (c *TableCell) SetUnit(unit string) *TableCell
- func (c *TableCell) SetValue(value string) *TableCell
- func (c *TableCell) UpdateStatus(status Status) *TableCell
- type TableRow
- type Tracing
- type Volume
- type Widget
- type World
Constants ¶
View Source
const ( ApplicationDeploymentMetricsSnapshotShift = 10 * timeseries.Minute ApplicationDeploymentMetricsSnapshotWindow = 20 * timeseries.Minute ApplicationDeploymentMinLifetime = ApplicationDeploymentMetricsSnapshotShift + ApplicationDeploymentMetricsSnapshotWindow )
View Source
const ( CheckUnitPercent = "percent" CheckUnitSecond = "second" CheckUnitByte = "byte" )
View Source
const ( CloudProviderAWS = "aws" CloudProviderAzure = "azure" )
View Source
const (
ProtocolMongodb = "mongo"
)
Variables ¶
View Source
var ( AlertRules = []AlertRule{ {LongWindow: timeseries.Hour, ShortWindow: 5 * timeseries.Minute, BurnRateThreshold: 14.4, Severity: CRITICAL}, {LongWindow: 6 * timeseries.Hour, ShortWindow: 30 * timeseries.Minute, BurnRateThreshold: 6, Severity: CRITICAL}, {LongWindow: timeseries.Day, ShortWindow: 2 * timeseries.Hour, BurnRateThreshold: 3, Severity: WARNING}, } MaxAlertRuleWindow timeseries.Duration )
View Source
var (
ApplicationIdZero = ApplicationId{}
)
View Source
var BuiltinCategoryPatterns = map[ApplicationCategory][]string{ ApplicationCategoryApplication: {}, ApplicationCategoryControlPlane: { "kube-system/*", "*/kubelet", "*/kube-apiserver", "*/k3s", "*/k3s-agent", "*/systemd*", "*/containerd", "*/docker*", }, ApplicationCategoryMonitoring: { "monitoring/*", "prometheus/*", "*/*prometheus*", "grafana/*", "*/*grafana*", "*/*alertmanager*", "coroot/*", "*/*coroot*", }, }
View Source
var Checks = struct { index map[CheckId]*CheckConfig SLOAvailability CheckConfig SLOLatency CheckConfig CPUNode CheckConfig CPUContainer CheckConfig MemoryOOM CheckConfig MemoryLeakPercent CheckConfig StorageSpace CheckConfig StorageIO CheckConfig NetworkRTT CheckConfig InstanceAvailability CheckConfig DeploymentStatus CheckConfig InstanceRestarts CheckConfig RedisAvailability CheckConfig RedisLatency CheckConfig MongodbAvailability CheckConfig MongodbReplicationLag CheckConfig PostgresAvailability CheckConfig PostgresLatency CheckConfig PostgresErrors CheckConfig PostgresReplicationLag CheckConfig PostgresConnections CheckConfig LogErrors CheckConfig JvmAvailability CheckConfig JvmSafepointTime CheckConfig DotNetAvailability CheckConfig }{ SLOAvailability: CheckConfig{ Type: CheckTypeManual, Title: "Availability", MessageTemplate: `the app is serving errors`, DefaultThreshold: 99, Unit: CheckUnitPercent, ConditionFormatTemplate: "the successful request percentage < <threshold>", }, SLOLatency: CheckConfig{ Type: CheckTypeManual, Title: "Latency", MessageTemplate: `the app is performing slowly`, DefaultThreshold: 99, Unit: CheckUnitPercent, ConditionFormatTemplate: "the percentage of requests served faster than <bucket> < <threshold>", }, CPUNode: CheckConfig{ Type: CheckTypeItemBased, Title: "Node CPU utilization", MessageTemplate: `high CPU utilization of {{.Items "node"}}`, DefaultThreshold: 80, Unit: CheckUnitPercent, ConditionFormatTemplate: "the CPU usage of a node > <threshold>", }, CPUContainer: CheckConfig{ Type: CheckTypeItemBased, Title: "Container CPU utilization", DefaultThreshold: 80, Unit: CheckUnitPercent, MessageTemplate: `high CPU utilization of {{.Items "container"}}`, ConditionFormatTemplate: "the CPU usage of a container > <threshold> of its CPU limit", }, MemoryOOM: CheckConfig{ Type: CheckTypeEventBased, Title: "Out of Memory", DefaultThreshold: 0, MessageTemplate: `app containers have been restarted {{.Count "time"}} by the OOM killer`, ConditionFormatTemplate: "the number of container terminations due to Out of Memory > <threshold>", }, MemoryLeakPercent: CheckConfig{ Type: CheckTypeValueBased, Title: "Memory leak", DefaultThreshold: 10, MessageTemplate: `memory usage is growing by {{.Value}} %% per hour`, ConditionFormatTemplate: "memory usage is growing by > <threshold> % per hour", }, StorageIO: CheckConfig{ Type: CheckTypeItemBased, Title: "Disk I/O", DefaultThreshold: 80, Unit: CheckUnitPercent, MessageTemplate: `high I/O utilization of {{.Items "volume"}}`, ConditionFormatTemplate: "the I/O utilization of a volume > <threshold>", }, StorageSpace: CheckConfig{ Type: CheckTypeItemBased, Title: "Disk space", DefaultThreshold: 80, Unit: CheckUnitPercent, MessageTemplate: `disk space on {{.Items "volume"}} will be exhausted soon`, ConditionFormatTemplate: "the space usage of a volume > <threshold>", }, NetworkRTT: CheckConfig{ Type: CheckTypeItemBased, Title: "Network round-trip time (RTT)", DefaultThreshold: 0.01, Unit: CheckUnitSecond, MessageTemplate: `high network latency to {{.Items "upstream service"}}`, ConditionFormatTemplate: "the RTT to an upstream service > <threshold>", }, InstanceAvailability: CheckConfig{ Type: CheckTypeManual, Title: "Instance availability", DefaultThreshold: 75, Unit: CheckUnitPercent, MessageTemplate: `{{.ItemsWithToBe "instance"}} unavailable`, ConditionFormatTemplate: "the number of available instances < <threshold> of the desired", }, InstanceRestarts: CheckConfig{ Type: CheckTypeEventBased, Title: "Restarts", DefaultThreshold: 0, MessageTemplate: `app containers have been restarted {{.Count "time"}}`, ConditionFormatTemplate: "the number of container restarts > <threshold>", }, DeploymentStatus: CheckConfig{ Type: CheckTypeValueBased, Title: "Deployment status", DefaultThreshold: 180, Unit: CheckUnitSecond, MessageTemplate: `the rollout has already been in progress for {{.Value}}`, ConditionFormatTemplate: "a rollout is in progress > <threshold>", }, RedisAvailability: CheckConfig{ Type: CheckTypeItemBased, Title: "Redis availability", DefaultThreshold: 0, MessageTemplate: `{{.ItemsWithToBe "redis instance"}} unavailable`, ConditionFormatTemplate: "the number of unavailable redis instances > <threshold>", }, RedisLatency: CheckConfig{ Type: CheckTypeItemBased, Title: "Redis latency", DefaultThreshold: 0.005, Unit: CheckUnitSecond, MessageTemplate: `{{.ItemsWithToBe "redis instance"}} performing slowly`, ConditionFormatTemplate: "the average command execution time of a redis instance > <threshold>", }, MongodbAvailability: CheckConfig{ Type: CheckTypeItemBased, Title: "Mongodb availability", DefaultThreshold: 0, MessageTemplate: `{{.ItemsWithToBe "mongodb instance"}} unavailable`, ConditionFormatTemplate: "the number of unavailable mongodb instances > <threshold>", }, MongodbReplicationLag: CheckConfig{ Type: CheckTypeItemBased, Title: "Mongodb replication lag", DefaultThreshold: 30, MessageTemplate: `{{.ItemsWithToBe "mongodb replica"}} far behind the primary`, ConditionFormatTemplate: "replication lag > <threshold>", Unit: CheckUnitSecond, }, PostgresAvailability: CheckConfig{ Type: CheckTypeItemBased, Title: "Postgres availability", DefaultThreshold: 0, MessageTemplate: `{{.ItemsWithToBe "postgres instance"}} unavailable`, ConditionFormatTemplate: "the number of unavailable postgres instances > <threshold>", }, PostgresLatency: CheckConfig{ Type: CheckTypeItemBased, Title: "Postgres latency", DefaultThreshold: 0.1, Unit: CheckUnitSecond, MessageTemplate: `{{.ItemsWithToBe "postgres instance"}} performing slowly`, ConditionFormatTemplate: "the average query execution time of a postgres instance > <threshold>", }, PostgresErrors: CheckConfig{ Type: CheckTypeEventBased, Title: "Postgres errors", DefaultThreshold: 0, MessageTemplate: `{{.Count "error"}} occurred`, ConditionFormatTemplate: "the number of postgres errors > <threshold>", }, PostgresReplicationLag: CheckConfig{ Type: CheckTypeItemBased, Title: "Postgres replication lag", DefaultThreshold: 30, MessageTemplate: `{{.ItemsWithToBe "postgres replica"}} far behind the primary`, ConditionFormatTemplate: "replication lag > <threshold>", Unit: CheckUnitSecond, }, PostgresConnections: CheckConfig{ Type: CheckTypeItemBased, Title: "Postgres connections", DefaultThreshold: 90, MessageTemplate: `{{.ItemsWithHave "postgres instance"}} too many connections`, ConditionFormatTemplate: "the number of connections > <threshold> of `max_connections`", Unit: CheckUnitPercent, }, LogErrors: CheckConfig{ Type: CheckTypeEventBased, Title: "Errors", DefaultThreshold: 0, MessageTemplate: `{{.Count "error"}} occurred`, ConditionFormatTemplate: "the number of messages with the ERROR and CRITICAL severity levels > <threshold>", }, JvmAvailability: CheckConfig{ Type: CheckTypeItemBased, Title: "JVM availability", DefaultThreshold: 0, MessageTemplate: `{{.ItemsWithToBe "JVM instance"}} unavailable`, ConditionFormatTemplate: "the number of unavailable JVM instances > <threshold>", }, JvmSafepointTime: CheckConfig{ Type: CheckTypeItemBased, Title: "JVM safepoints", DefaultThreshold: 0.05, MessageTemplate: `high safepoint time on {{.Items "JVM instance"}}`, ConditionFormatTemplate: "the time application have been stopped for safepoint operations > <threshold>", Unit: CheckUnitSecond, }, DotNetAvailability: CheckConfig{ Type: CheckTypeItemBased, Title: ".NET runtime availability", DefaultThreshold: 0, MessageTemplate: `{{.ItemsWithToBe ".NET instance"}} unavailable`, ConditionFormatTemplate: "the number of unavailable .NET instances > <threshold>", }, // contains filtered or unexported fields }
Functions ¶
func CalcApplicationDeploymentSummary ¶
func CalcApplicationDeploymentSummary(app *Application, checkConfigs CheckConfigs, t timeseries.Time, curr, prev *MetricsSnapshot) ([]ApplicationDeploymentSummary, Status)
func ContainerIdToServiceName ¶ added in v0.23.0
func GetConnectionsErrorsSum ¶
func GetConnectionsErrorsSum(connections []*Connection, protocolFilter func(protocol Protocol) bool) *timeseries.TimeSeries
func GetConnectionsRequestsLatency ¶
func GetConnectionsRequestsLatency(connections []*Connection, protocolFilter func(protocol Protocol) bool) *timeseries.TimeSeries
func GetConnectionsRequestsSum ¶
func GetConnectionsRequestsSum(connections []*Connection, protocolFilter func(protocol Protocol) bool) *timeseries.TimeSeries
func IsRequestStatusFailed ¶
func Quantile ¶ added in v0.17.12
func Quantile(histogram []HistogramBucket, q float32) *timeseries.TimeSeries
Types ¶
type AlertRule ¶
type AlertRule struct { LongWindow timeseries.Duration ShortWindow timeseries.Duration BurnRateThreshold float32 Severity Status }
type Annotation ¶
type Annotation struct { Name string `json:"name"` X1 timeseries.Time `json:"x1"` X2 timeseries.Time `json:"x2"` Icon string `json:"icon"` }
func EventsToAnnotations ¶
func EventsToAnnotations(events []*ApplicationEvent, ctx timeseries.Context) []Annotation
func IncidentsToAnnotations ¶
func IncidentsToAnnotations(incidents []*ApplicationIncident, ctx timeseries.Context) []Annotation
type Application ¶
type Application struct { Id ApplicationId Category ApplicationCategory Instances []*Instance Downstreams []*Connection DesiredInstances *timeseries.TimeSeries LatencySLIs []*LatencySLI AvailabilitySLIs []*AvailabilitySLI Events []*ApplicationEvent Deployments []*ApplicationDeployment Incidents []*ApplicationIncident Status Status Reports []*AuditReport }
func NewApplication ¶
func NewApplication(id ApplicationId) *Application
func (*Application) AddReport ¶
func (app *Application) AddReport(name AuditReportName, widgets ...*Widget)
func (*Application) GetClientsConnections ¶
func (app *Application) GetClientsConnections() map[ApplicationId][]*Connection
func (*Application) GetInstance ¶
func (app *Application) GetInstance(name, node string) *Instance
func (*Application) GetOrCreateInstance ¶
func (app *Application) GetOrCreateInstance(name string, node *Node) *Instance
func (*Application) InstrumentationStatus ¶
func (app *Application) InstrumentationStatus() map[ApplicationType]bool
func (*Application) IsDotNet ¶ added in v0.26.0
func (app *Application) IsDotNet() bool
func (*Application) IsJvm ¶
func (app *Application) IsJvm() bool
func (*Application) IsK8s ¶
func (app *Application) IsK8s() bool
func (*Application) IsMongodb ¶ added in v0.24.0
func (app *Application) IsMongodb() bool
func (*Application) IsPostgres ¶
func (app *Application) IsPostgres() bool
func (*Application) IsRedis ¶
func (app *Application) IsRedis() bool
func (*Application) IsStandalone ¶
func (app *Application) IsStandalone() bool
func (*Application) Labels ¶
func (app *Application) Labels() Labels
func (*Application) SLOStatus ¶
func (app *Application) SLOStatus() Status
type ApplicationCategory ¶
type ApplicationCategory string
const ( ApplicationCategoryApplication ApplicationCategory = "application" ApplicationCategoryControlPlane ApplicationCategory = "control-plane" ApplicationCategoryMonitoring ApplicationCategory = "monitoring" )
func CalcApplicationCategory ¶
func CalcApplicationCategory(appId ApplicationId, customPatterns map[ApplicationCategory][]string) ApplicationCategory
func (ApplicationCategory) Auxiliary ¶
func (c ApplicationCategory) Auxiliary() bool
func (ApplicationCategory) Builtin ¶
func (c ApplicationCategory) Builtin() bool
func (ApplicationCategory) Default ¶
func (c ApplicationCategory) Default() bool
func (ApplicationCategory) Monitoring ¶
func (c ApplicationCategory) Monitoring() bool
type ApplicationDeployment ¶
type ApplicationDeployment struct { ApplicationId ApplicationId Name string StartedAt timeseries.Time FinishedAt timeseries.Time Details *ApplicationDeploymentDetails MetricsSnapshot *MetricsSnapshot Notifications *ApplicationDeploymentNotifications }
func (*ApplicationDeployment) Hash ¶
func (d *ApplicationDeployment) Hash() string
func (*ApplicationDeployment) Id ¶
func (d *ApplicationDeployment) Id() string
func (*ApplicationDeployment) Version ¶
func (d *ApplicationDeployment) Version() string
type ApplicationDeploymentDetails ¶
type ApplicationDeploymentDetails struct {
ContainerImages []string `json:"container_images"`
}
type ApplicationDeploymentNotifications ¶
type ApplicationDeploymentNotifications struct { State ApplicationDeploymentState `json:"state"` Slack struct { State ApplicationDeploymentState `json:"state"` Channel string `json:"channel,omitempty"` ThreadTs string `json:"thread_ts,omitempty"` } `json:"slack"` Teams struct { State ApplicationDeploymentState `json:"state"` } `json:"teams"` }
type ApplicationDeploymentState ¶
type ApplicationDeploymentState int
const ( ApplicationDeploymentStateStarted ApplicationDeploymentState = iota ApplicationDeploymentStateInProgress ApplicationDeploymentStateStuck ApplicationDeploymentStateCancelled ApplicationDeploymentStateDeployed ApplicationDeploymentStateSummary )
type ApplicationDeploymentStatus ¶
type ApplicationDeploymentStatus struct { Status Status State ApplicationDeploymentState Message string Lifetime timeseries.Duration Summary []ApplicationDeploymentSummary Deployment *ApplicationDeployment Last bool }
func CalcApplicationDeploymentStatuses ¶
func CalcApplicationDeploymentStatuses(app *Application, checkConfigs CheckConfigs, now timeseries.Time) []ApplicationDeploymentStatus
type ApplicationDeploymentSummary ¶
type ApplicationDeploymentSummary struct { Report AuditReportName `json:"report"` Ok bool `json:"ok"` Message string `json:"message"` Time timeseries.Time `json:"time"` }
func (ApplicationDeploymentSummary) Emoji ¶
func (s ApplicationDeploymentSummary) Emoji() string
type ApplicationEvent ¶
type ApplicationEvent struct { Start timeseries.Time End timeseries.Time Type ApplicationEventType Details string }
func (*ApplicationEvent) String ¶
func (e *ApplicationEvent) String() string
type ApplicationEventType ¶
type ApplicationEventType int
const ( ApplicationEventTypeSwitchover ApplicationEventType = iota ApplicationEventTypeRollout ApplicationEventTypeInstanceDown ApplicationEventTypeInstanceUp )
type ApplicationId ¶
type ApplicationId struct { Namespace string Kind ApplicationKind Name string }
func NewApplicationId ¶
func NewApplicationId(ns string, kind ApplicationKind, name string) ApplicationId
func NewApplicationIdFromString ¶
func NewApplicationIdFromString(src string) (ApplicationId, error)
func (ApplicationId) IsZero ¶
func (a ApplicationId) IsZero() bool
func (ApplicationId) MarshalText ¶
func (a ApplicationId) MarshalText() ([]byte, error)
func (*ApplicationId) Scan ¶
func (a *ApplicationId) Scan(src any) error
func (ApplicationId) String ¶
func (a ApplicationId) String() string
func (*ApplicationId) UnmarshalText ¶
func (a *ApplicationId) UnmarshalText(text []byte) error
type ApplicationIncident ¶
type ApplicationIncident struct { Key string OpenedAt timeseries.Time ResolvedAt timeseries.Time Severity Status }
func (*ApplicationIncident) Resolved ¶
func (i *ApplicationIncident) Resolved() bool
type ApplicationKind ¶
type ApplicationKind string
const ( ApplicationKindDeployment ApplicationKind = "Deployment" ApplicationKindStatefulSet ApplicationKind = "StatefulSet" ApplicationKindDaemonSet ApplicationKind = "DaemonSet" ApplicationKindCronJob ApplicationKind = "CronJob" ApplicationKindJob ApplicationKind = "Job" ApplicationKindReplicaSet ApplicationKind = "ReplicaSet" ApplicationKindPod ApplicationKind = "Pod" ApplicationKindStaticPods ApplicationKind = "StaticPods" ApplicationKindUnknown ApplicationKind = "Unknown" ApplicationKindDockerSwarmService ApplicationKind = "DockerSwarmService" ApplicationKindExternalService ApplicationKind = "ExternalService" ApplicationKindDatabaseCluster ApplicationKind = "DatabaseCluster" ApplicationKindRds ApplicationKind = "RDS" ApplicationKindElasticacheCluster ApplicationKind = "ElasticacheCluster" )
type ApplicationType ¶
type ApplicationType string
const ( ApplicationTypeUnknown ApplicationType = "" ApplicationTypePostgres ApplicationType = "postgres" ApplicationTypePgbouncer ApplicationType = "pgbouncer" ApplicationTypeMysql ApplicationType = "mysql" ApplicationTypeCassandra ApplicationType = "cassandra" ApplicationTypeElasticsearch ApplicationType = "elasticsearch" ApplicationTypeMemcached ApplicationType = "memcached" ApplicationTypeRedis ApplicationType = "redis" ApplicationTypeKeyDB ApplicationType = "keydb" ApplicationTypeMongodb ApplicationType = "mongodb" ApplicationTypeMongos ApplicationType = "mongos" ApplicationTypeRabbitmq ApplicationType = "rabbitmq" ApplicationTypeKafka ApplicationType = "kafka" ApplicationTypeZookeeper ApplicationType = "zookeeper" ApplicationTypeRDS ApplicationType = "aws-rds" ApplicationTypeElastiCache ApplicationType = "aws-elasticache" ApplicationTypeNats ApplicationType = "nats" )
func (ApplicationType) IsDatabase ¶
func (at ApplicationType) IsDatabase() bool
func (ApplicationType) IsQueue ¶
func (at ApplicationType) IsQueue() bool
type AuditReport ¶
type AuditReport struct { Name AuditReportName `json:"name"` Status Status `json:"status"` Widgets []*Widget `json:"widgets"` Checks []*Check `json:"checks"` Custom bool `json:"custom"` // contains filtered or unexported fields }
func NewAuditReport ¶
func NewAuditReport(app *Application, ctx timeseries.Context, checkConfigs CheckConfigs, name AuditReportName, detailed bool) *AuditReport
func (*AuditReport) AddWidget ¶ added in v0.20.0
func (r *AuditReport) AddWidget(w *Widget) *Widget
func (*AuditReport) CreateCheck ¶
func (r *AuditReport) CreateCheck(cfg CheckConfig) *Check
func (*AuditReport) GetOrCreateChart ¶
func (r *AuditReport) GetOrCreateChart(title string) *Chart
func (*AuditReport) GetOrCreateChartGroup ¶
func (r *AuditReport) GetOrCreateChartGroup(title string) *ChartGroup
func (*AuditReport) GetOrCreateChartInGroup ¶
func (r *AuditReport) GetOrCreateChartInGroup(title string, chartTitle string) *Chart
func (*AuditReport) GetOrCreateDependencyMap ¶
func (r *AuditReport) GetOrCreateDependencyMap() *DependencyMap
func (*AuditReport) GetOrCreateHeatmap ¶
func (r *AuditReport) GetOrCreateHeatmap(title string) *Heatmap
func (*AuditReport) GetOrCreateTable ¶
func (r *AuditReport) GetOrCreateTable(header ...string) *Table
type AuditReportName ¶
type AuditReportName string
const ( AuditReportSLO AuditReportName = "SLO" AuditReportInstances AuditReportName = "Instances" AuditReportCPU AuditReportName = "CPU" AuditReportMemory AuditReportName = "Memory" AuditReportStorage AuditReportName = "Storage" AuditReportNetwork AuditReportName = "Net" AuditReportLogs AuditReportName = "Logs" AuditReportPostgres AuditReportName = "Postgres" AuditReportRedis AuditReportName = "Redis" AuditReportMongodb AuditReportName = "Mongodb" AuditReportJvm AuditReportName = "JVM" AuditReportDotNet AuditReportName = ".NET" AuditReportNode AuditReportName = "Node" AuditReportDeployments AuditReportName = "Deployments" AuditReportProfiling AuditReportName = "Profiling" AuditReportTracing AuditReportName = "Tracing" )
type AvailabilitySLI ¶
type AvailabilitySLI struct { Config CheckConfigSLOAvailability TotalRequests *timeseries.TimeSeries FailedRequests *timeseries.TimeSeries TotalRequestsRaw *timeseries.TimeSeries FailedRequestsRaw *timeseries.TimeSeries }
type BurnRate ¶
type BurnRate struct { Value float32 Window timeseries.Duration Severity Status }
func (BurnRate) FormatSLOStatus ¶
type Chart ¶
type Chart struct { Ctx timeseries.Context `json:"ctx"` Title string `json:"title"` Series SeriesList `json:"series"` Threshold *Series `json:"threshold"` Featured bool `json:"featured"` IsStacked bool `json:"stacked"` IsSorted bool `json:"sorted"` IsColumn bool `json:"column"` ColorShift int `json:"color_shift"` Annotations []Annotation `json:"annotations"` DrillDownLink *RouterLink `json:"drill_down_link"` HideLegend bool `json:"hide_legend"` Flags string `json:"flags"` }
func (*Chart) AddAnnotation ¶
func (ch *Chart) AddAnnotation(annotations ...Annotation) *Chart
func (*Chart) AddMany ¶
func (ch *Chart) AddMany(series map[string]SeriesData, topN int, topF timeseries.F) *Chart
func (*Chart) AddSeries ¶
func (ch *Chart) AddSeries(name string, data SeriesData, color ...string) *Chart
func (*Chart) PercentilesFrom ¶ added in v0.17.12
func (ch *Chart) PercentilesFrom(histogram []HistogramBucket, percentiles ...float32) *Chart
func (*Chart) SetThreshold ¶
func (ch *Chart) SetThreshold(name string, data SeriesData) *Chart
func (*Chart) ShiftColors ¶
type ChartGroup ¶
type ChartGroup struct { Title string `json:"title"` Charts []*Chart `json:"charts"` // contains filtered or unexported fields }
func NewChartGroup ¶ added in v0.22.0
func NewChartGroup(ctx timeseries.Context, title string) *ChartGroup
func (*ChartGroup) GetOrCreateChart ¶
func (cg *ChartGroup) GetOrCreateChart(title string) *Chart
func (*ChartGroup) MarshalJSON ¶
func (cg *ChartGroup) MarshalJSON() ([]byte, error)
type Check ¶
type Check struct { Id CheckId `json:"id"` Title string `json:"title"` Status Status `json:"status"` Message string `json:"message"` Threshold float32 `json:"threshold"` Unit CheckUnit `json:"unit"` ConditionFormatTemplate string `json:"condition_format_template"` // contains filtered or unexported fields }
func (*Check) SetDesired ¶ added in v0.21.0
func (*Check) SetValues ¶ added in v0.21.0
func (ch *Check) SetValues(vs *timeseries.TimeSeries)
func (*Check) Values ¶ added in v0.21.0
func (ch *Check) Values() *timeseries.TimeSeries
type CheckConfig ¶
type CheckConfigSLOAvailability ¶
type CheckConfigSLOAvailability struct { Custom bool `json:"custom"` TotalRequestsQuery string `json:"total_requests_query"` FailedRequestsQuery string `json:"failed_requests_query"` ObjectivePercentage float32 `json:"objective_percentage"` }
func (*CheckConfigSLOAvailability) Failed ¶
func (cfg *CheckConfigSLOAvailability) Failed() string
func (*CheckConfigSLOAvailability) Total ¶
func (cfg *CheckConfigSLOAvailability) Total() string
type CheckConfigSLOLatency ¶
type CheckConfigSLOLatency struct { Custom bool `json:"custom"` HistogramQuery string `json:"histogram_query"` ObjectiveBucket float32 `json:"objective_bucket"` ObjectivePercentage float32 `json:"objective_percentage"` }
func (*CheckConfigSLOLatency) Histogram ¶
func (cfg *CheckConfigSLOLatency) Histogram() string
type CheckConfigSimple ¶
type CheckConfigSimple struct {
Threshold float32 `json:"threshold"`
}
type CheckConfigs ¶
type CheckConfigs map[ApplicationId]map[CheckId]json.RawMessage
func (CheckConfigs) GetAvailability ¶
func (cc CheckConfigs) GetAvailability(appId ApplicationId) (CheckConfigSLOAvailability, bool)
func (CheckConfigs) GetByCheck ¶
func (cc CheckConfigs) GetByCheck(id CheckId) map[ApplicationId][]any
func (CheckConfigs) GetLatency ¶
func (cc CheckConfigs) GetLatency(appId ApplicationId, category ApplicationCategory) (CheckConfigSLOLatency, bool)
func (CheckConfigs) GetSimple ¶
func (cc CheckConfigs) GetSimple(checkId CheckId, appId ApplicationId) CheckConfigSimple
func (CheckConfigs) GetSimpleAll ¶
func (cc CheckConfigs) GetSimpleAll(checkId CheckId, appId ApplicationId) []*CheckConfigSimple
type CheckContext ¶
type CheckContext struct {
// contains filtered or unexported fields
}
func (CheckContext) Count ¶
func (c CheckContext) Count(singular string) string
func (CheckContext) Items ¶
func (c CheckContext) Items(singular string) string
func (CheckContext) ItemsWithHave ¶
func (c CheckContext) ItemsWithHave(singular string) string
func (CheckContext) ItemsWithToBe ¶
func (c CheckContext) ItemsWithToBe(singular string) string
func (CheckContext) Value ¶
func (c CheckContext) Value() string
type ClusterRole ¶
type ClusterRole int
const ( ClusterRoleNone ClusterRole = iota ClusterRolePrimary ClusterRoleReplica )
func (ClusterRole) String ¶
func (r ClusterRole) String() string
type Connection ¶
type Connection struct { ActualRemotePort string ActualRemoteIP string Instance *Instance RemoteInstance *Instance Container string Rtt *timeseries.TimeSeries SuccessfulConnections *timeseries.TimeSeries Active *timeseries.TimeSeries FailedConnections *timeseries.TimeSeries Retransmissions *timeseries.TimeSeries RequestsCount map[Protocol]map[string]*timeseries.TimeSeries // by status RequestsLatency map[Protocol]*timeseries.TimeSeries RequestsHistogram map[Protocol]map[float32]*timeseries.TimeSeries // by le Service *Service RemoteApplication *Application ServiceRemoteIP string ServiceRemotePort string }
func (*Connection) IsActual ¶
func (c *Connection) IsActual() bool
func (*Connection) IsEmpty ¶ added in v0.25.1
func (c *Connection) IsEmpty() bool
func (*Connection) IsObsolete ¶
func (c *Connection) IsObsolete() bool
func (*Connection) Status ¶
func (c *Connection) Status() Status
type Container ¶
type Container struct { Id string Name string InitContainer bool ApplicationTypes map[ApplicationType]bool Image string Status ContainerStatus Reason string Ready bool Restarts *timeseries.TimeSeries LastTerminatedReason string CpuLimit *timeseries.TimeSeries CpuRequest *timeseries.TimeSeries CpuUsage *timeseries.TimeSeries CpuDelay *timeseries.TimeSeries ThrottledTime *timeseries.TimeSeries MemoryRss *timeseries.TimeSeries MemoryRssForTrend *timeseries.TimeSeries MemoryCache *timeseries.TimeSeries MemoryLimit *timeseries.TimeSeries MemoryRequest *timeseries.TimeSeries OOMKills *timeseries.TimeSeries }
func NewContainer ¶
type ContainerStatus ¶
type ContainerStatus string
const ( ContainerStatusWaiting ContainerStatus = "waiting" ContainerStatusRunning ContainerStatus = "running" ContainerStatusTerminated ContainerStatus = "terminated" )
type Costs ¶
type Costs struct { CPUUsagePerHour float32 CPURequestPerHour float32 MemoryUsagePerHour float32 MemoryRequestPerHour float32 }
func (*Costs) CPURequestPerMonth ¶
func (*Costs) CPUUsagePerMonth ¶
func (*Costs) MemoryRequestPerMonth ¶
func (*Costs) MemoryUsagePerMonth ¶
func (*Costs) RequestPerMonth ¶
func (*Costs) UsagePerMonth ¶
type CronJob ¶
type CronJob struct { Schedule LabelLastValue ConcurrencyPolicy LabelLastValue StatusActive *timeseries.TimeSeries LastScheduleTime *timeseries.TimeSeries NextScheduleTime *timeseries.TimeSeries }
type DaemonSet ¶
type DaemonSet struct {
ReplicasDesired *timeseries.TimeSeries
}
type DependencyMap ¶
type DependencyMap struct { Nodes []*DependencyMapNode `json:"nodes"` Links []*DependencyMapLink `json:"links"` }
func (*DependencyMap) GetOrCreateNode ¶
func (m *DependencyMap) GetOrCreateNode(node DependencyMapNode) *DependencyMapNode
func (*DependencyMap) UpdateLink ¶
func (m *DependencyMap) UpdateLink(src DependencyMapInstance, sNode DependencyMapNode, dst DependencyMapInstance, dNode DependencyMapNode, linkStatus Status)
type DependencyMapInstance ¶
type DependencyMapLink ¶
type DependencyMapNode ¶
type DependencyMapNode struct { Name string `json:"name"` Provider string `json:"provider"` Region string `json:"region"` AZ string `json:"az"` SrcInstances []DependencyMapInstance `json:"src_instances"` DstInstances []DependencyMapInstance `json:"dst_instances"` }
func (*DependencyMapNode) AddDstInstance ¶
func (n *DependencyMapNode) AddDstInstance(i DependencyMapInstance)
func (*DependencyMapNode) AddSrcInstance ¶
func (n *DependencyMapNode) AddSrcInstance(i DependencyMapInstance)
type Deployment ¶
type Deployment struct { ReplicasDesired *timeseries.TimeSeries ReplicaSets map[string]*ReplicaSet }
type DiskStats ¶
type DiskStats struct { IOUtilizationPercent *timeseries.TimeSeries ReadOps *timeseries.TimeSeries WriteOps *timeseries.TimeSeries WrittenBytes *timeseries.TimeSeries ReadBytes *timeseries.TimeSeries ReadTime *timeseries.TimeSeries WriteTime *timeseries.TimeSeries Wait *timeseries.TimeSeries Await *timeseries.TimeSeries }
type DotNet ¶ added in v0.26.0
type DotNet struct { RuntimeVersion LabelLastValue Up *timeseries.TimeSeries Exceptions *timeseries.TimeSeries MemoryAllocationRate *timeseries.TimeSeries HeapSize map[string]*timeseries.TimeSeries HeapFragmentationPercent *timeseries.TimeSeries GcCount map[string]*timeseries.TimeSeries MonitorLockContentions *timeseries.TimeSeries ThreadPoolCompletedItems *timeseries.TimeSeries ThreadPoolQueueSize *timeseries.TimeSeries ThreadPoolSize *timeseries.TimeSeries }
type EBS ¶
type EBS struct { AllocatedGibs *timeseries.TimeSeries StorageType LabelLastValue ProvisionedIOPS *timeseries.TimeSeries VolumeId string }
type Elasticache ¶ added in v0.17.5
type Elasticache struct { Status LabelLastValue Engine LabelLastValue EngineVersion LabelLastValue LifeSpan *timeseries.TimeSeries }
type Heatmap ¶
type Heatmap struct { Ctx timeseries.Context `json:"ctx"` Title string `json:"title"` Series SeriesList `json:"series"` Annotations []Annotation `json:"annotations"` DrillDownLink *RouterLink `json:"drill_down_link"` }
func NewHeatmap ¶
func NewHeatmap(ctx timeseries.Context, title string) *Heatmap
func (*Heatmap) AddAnnotation ¶
func (hm *Heatmap) AddAnnotation(annotations ...Annotation) *Heatmap
type HistogramBucket ¶
type HistogramBucket struct { Le float32 TimeSeries *timeseries.TimeSeries }
type Indicator ¶
func CalcIndicators ¶
func CalcIndicators(app *Application) []Indicator
type Instance ¶
type Instance struct { Name string OwnerId ApplicationId Node *Node Pod *Pod Rds *Rds Elasticache *Elasticache Jvms map[string]*Jvm DotNet map[string]*DotNet Volumes []*Volume Upstreams []*Connection TcpListens map[Listen]bool Containers map[string]*Container LogMessages map[LogLevel]*LogMessages ClusterName LabelLastValue ClusterComponent *Application Postgres *Postgres Redis *Redis Mongodb *Mongodb // contains filtered or unexported fields }
func NewInstance ¶
func NewInstance(name string, owner ApplicationId) *Instance
func (*Instance) AddUpstreamConnection ¶
func (instance *Instance) AddUpstreamConnection(actualIP, actualPort, serviceIP, servicePort, container string) *Connection
func (*Instance) ApplicationTypes ¶
func (instance *Instance) ApplicationTypes() map[ApplicationType]bool
func (*Instance) ClusterRole ¶
func (instance *Instance) ClusterRole() *timeseries.TimeSeries
func (*Instance) ClusterRoleLast ¶
func (instance *Instance) ClusterRoleLast() ClusterRole
func (*Instance) GetOrCreateContainer ¶
func (*Instance) InstrumentedType ¶
func (instance *Instance) InstrumentedType() ApplicationType
func (*Instance) IsListenActive ¶
func (*Instance) IsObsolete ¶
func (*Instance) LifeSpan ¶
func (instance *Instance) LifeSpan() *timeseries.TimeSeries
func (*Instance) UpAndRunning ¶
func (instance *Instance) UpAndRunning() *timeseries.TimeSeries
func (*Instance) UpdateClusterRole ¶
func (instance *Instance) UpdateClusterRole(role string, v *timeseries.TimeSeries)
type IntegrationStatus ¶
type InterfaceStats ¶
type InterfaceStats struct { Name string Addresses []string Up *timeseries.TimeSeries RxBytes *timeseries.TimeSeries TxBytes *timeseries.TimeSeries }
type Jvm ¶
type Jvm struct { JavaVersion LabelLastValue HeapSize *timeseries.TimeSeries HeapUsed *timeseries.TimeSeries SafepointTime *timeseries.TimeSeries SafepointSyncTime *timeseries.TimeSeries GcTime map[string]*timeseries.TimeSeries }
type LabelLastValue ¶
type LabelLastValue struct {
// contains filtered or unexported fields
}
func (LabelLastValue) MarshalJSON ¶
func (lv LabelLastValue) MarshalJSON() ([]byte, error)
func (*LabelLastValue) Update ¶
func (lv *LabelLastValue) Update(ts *timeseries.TimeSeries, value string)
func (LabelLastValue) Value ¶
func (lv LabelLastValue) Value() string
type LatencySLI ¶
type LatencySLI struct { Config CheckConfigSLOLatency Histogram []HistogramBucket HistogramRaw []HistogramBucket }
func (*LatencySLI) GetTotalAndFast ¶
func (sli *LatencySLI) GetTotalAndFast(raw bool) (*timeseries.TimeSeries, *timeseries.TimeSeries)
type LogMessages ¶ added in v0.20.0
type LogMessages struct { Messages *timeseries.TimeSeries Patterns map[string]*LogPattern }
type LogPattern ¶
type LogPattern struct { Pattern *logparser.Pattern Level LogLevel Sample string Multiline bool Messages *timeseries.TimeSeries }
type Logs ¶ added in v0.20.0
type Logs struct { ApplicationId ApplicationId `json:"application_id"` Check *Check `json:"check"` }
type MetricValues ¶
type MetricValues struct { Labels Labels LabelsHash uint64 Values *timeseries.TimeSeries }
type MetricsSnapshot ¶
type MetricsSnapshot struct { Timestamp timeseries.Time `json:"timestamp"` Duration timeseries.Duration `json:"duration"` Requests int64 `json:"requests"` Errors int64 `json:"errors"` Latency map[string]int64 `json:"latency"` Restarts int64 `json:"restarts"` CPUUsage float32 `json:"cpu_usage"` MemoryLeakPercent float32 `json:"memory_leak_percent"` MemoryUsage int64 `json:"memory_usage"` OOMKills int64 `json:"oom_kills"` LogErrors int64 `json:"log_errors"` LogWarnings int64 `json:"log_warnings"` }
type Mongodb ¶ added in v0.24.0
type Mongodb struct { Up *timeseries.TimeSeries ReplicaSet LabelLastValue State LabelLastValue LastApplied *timeseries.TimeSeries }
func NewMongodb ¶ added in v0.24.0
func NewMongodb() *Mongodb
type NetInterface ¶
type Node ¶
type Node struct { AgentVersion LabelLastValue Name LabelLastValue K8sName LabelLastValue MachineID string Uptime *timeseries.TimeSeries CpuCapacity *timeseries.TimeSeries CpuUsagePercent *timeseries.TimeSeries CpuUsageByMode map[string]*timeseries.TimeSeries MemoryTotalBytes *timeseries.TimeSeries MemoryFreeBytes *timeseries.TimeSeries MemoryAvailableBytes *timeseries.TimeSeries MemoryCachedBytes *timeseries.TimeSeries Disks map[string]*DiskStats NetInterfaces []*InterfaceStats Instances []*Instance `json:"-"` CloudProvider LabelLastValue Region LabelLastValue AvailabilityZone LabelLastValue InstanceType LabelLastValue InstanceLifeCycle LabelLastValue Fargate bool Price *NodePrice }
func (*Node) IsAgentInstalled ¶ added in v0.22.0
type PgConnectionKey ¶
type PgConnectionKey struct { Db string User string State string Query string WaitEventType string }
func (PgConnectionKey) String ¶
func (k PgConnectionKey) String() string
type PgSetting ¶
type PgSetting struct { Samples *timeseries.TimeSeries Unit string }
type Pod ¶
type Pod struct { Phase string Reason string Scheduled bool Running *timeseries.TimeSeries Ready *timeseries.TimeSeries LifeSpan *timeseries.TimeSeries ReplicaSet string InitContainers map[string]*Container }
func (*Pod) IsObsolete ¶
type Postgres ¶
type Postgres struct { Up *timeseries.TimeSeries Version LabelLastValue Connections map[PgConnectionKey]*timeseries.TimeSeries AwaitingQueriesByLockingQuery map[QueryKey]*timeseries.TimeSeries Settings map[string]PgSetting PerQuery map[QueryKey]*QueryStat QueriesByDB map[string]*timeseries.TimeSeries Avg *timeseries.TimeSeries P50 *timeseries.TimeSeries P95 *timeseries.TimeSeries P99 *timeseries.TimeSeries WalCurrentLsn *timeseries.TimeSeries WalReceiveLsn *timeseries.TimeSeries WalReplayLsn *timeseries.TimeSeries }
func NewPostgres ¶
func NewPostgres() *Postgres
func (*Postgres) Unavailability ¶
func (p *Postgres) Unavailability() *timeseries.TimeSeries
type Profile ¶
type Profile struct {
ApplicationId ApplicationId `json:"application_id"`
}
type QueryStat ¶
type QueryStat struct { Calls *timeseries.TimeSeries TotalTime *timeseries.TimeSeries IoTime *timeseries.TimeSeries }
type Rds ¶
type Rds struct { Status LabelLastValue Engine LabelLastValue EngineVersion LabelLastValue MultiAz LabelLastValue LifeSpan *timeseries.TimeSeries }
type Redis ¶
type Redis struct { Up *timeseries.TimeSeries Version LabelLastValue Role LabelLastValue Calls map[string]*timeseries.TimeSeries CallsTime map[string]*timeseries.TimeSeries }
type ReplicaSet ¶
type ReplicaSet struct { }
type RouterLink ¶
type RouterLink struct { Title string `json:"title"` Route string `json:"name,omitempty"` Params map[string]any `json:"params,omitempty"` Args map[string]any `json:"query,omitempty"` Hash string `json:"hash,omitempty"` }
func NewRouterLink ¶
func NewRouterLink(title string, route string) *RouterLink
func (*RouterLink) SetArg ¶
func (l *RouterLink) SetArg(k string, v any) *RouterLink
func (*RouterLink) SetHash ¶
func (l *RouterLink) SetHash(v string) *RouterLink
func (*RouterLink) SetParam ¶
func (l *RouterLink) SetParam(k string, v any) *RouterLink
type Series ¶
type Series struct { Name string `json:"name"` Title string `json:"title,omitempty"` Color string `json:"color,omitempty"` Fill bool `json:"fill,omitempty"` Threshold string `json:"threshold,omitempty"` Data SeriesData `json:"data"` Value string `json:"value"` }
func HistogramSeries ¶
func HistogramSeries(buckets []HistogramBucket, objectiveBucket, objectivePercentage float32) []Series
type SeriesData ¶
type SeriesData interface { IsEmpty() bool Get() *timeseries.TimeSeries Reduce(timeseries.F) float32 }
type SeriesList ¶
type SeriesList struct {
// contains filtered or unexported fields
}
func (SeriesList) IsEmpty ¶ added in v0.17.12
func (sl SeriesList) IsEmpty() bool
func (SeriesList) MarshalJSON ¶
func (sl SeriesList) MarshalJSON() ([]byte, error)
type Service ¶
type Service struct { Name string Namespace string ClusterIP string Connections []*Connection }
func (*Service) GetDestinationApplicationId ¶
func (svc *Service) GetDestinationApplicationId() (ApplicationId, bool)
type StatefulSet ¶
type StatefulSet struct { ReplicasDesired *timeseries.TimeSeries ReplicasUpdated *timeseries.TimeSeries }
type Table ¶
type TableCell ¶
type TableCell struct { Icon *Icon `json:"icon"` Value string `json:"value"` ShortValue string `json:"short_value"` Values []string `json:"values"` Tags []string `json:"tags"` Unit string `json:"unit"` Status *Status `json:"status"` Link *RouterLink `json:"link"` Progress *Progress `json:"progress"` NetInterfaces []NetInterface `json:"net_interfaces"` Chart *timeseries.TimeSeries `json:"chart"` IsStub bool `json:"is_stub"` MaxWidth int `json:"max_width"` DeploymentSummaries []ApplicationDeploymentSummary `json:"deployment_summaries"` }
func NewTableCell ¶
func (*TableCell) SetChart ¶
func (c *TableCell) SetChart(ts *timeseries.TimeSeries) *TableCell
func (*TableCell) SetMaxWidth ¶ added in v0.25.0
func (*TableCell) SetProgress ¶
func (*TableCell) SetShortValue ¶
func (*TableCell) UpdateStatus ¶
type Tracing ¶
type Tracing struct {
ApplicationId ApplicationId `json:"application_id"`
}
type Volume ¶
type Volume struct { Name LabelLastValue Device LabelLastValue MountPoint string EBS *EBS CapacityBytes *timeseries.TimeSeries UsedBytes *timeseries.TimeSeries }
type Widget ¶
type Widget struct { Chart *Chart `json:"chart,omitempty"` ChartGroup *ChartGroup `json:"chart_group,omitempty"` Table *Table `json:"table,omitempty"` DependencyMap *DependencyMap `json:"dependency_map,omitempty"` Heatmap *Heatmap `json:"heatmap,omitempty"` Logs *Logs `json:"logs,omitempty"` Profile *Profile `json:"profile,omitempty"` Tracing *Tracing `json:"tracing,omitempty"` Width string `json:"width,omitempty"` }
func (*Widget) AddAnnotation ¶
func (w *Widget) AddAnnotation(annotations ...Annotation)
type World ¶
type World struct { Ctx timeseries.Context CheckConfigs CheckConfigs Nodes []*Node Applications map[ApplicationId]*Application IntegrationStatus IntegrationStatus // contains filtered or unexported fields }
func NewWorld ¶
func NewWorld(from, to timeseries.Time, step timeseries.Duration) *World
func (*World) GetApplication ¶
func (w *World) GetApplication(id ApplicationId) *Application
func (*World) GetApplicationByNsAndName ¶ added in v0.25.1
func (w *World) GetApplicationByNsAndName(ns, name string) *Application
func (*World) GetOrCreateApplication ¶
func (w *World) GetOrCreateApplication(id ApplicationId) *Application
Source Files ¶
- alert.go
- application.go
- application_category.go
- application_deployment.go
- application_event.go
- application_id.go
- application_incident.go
- application_types.go
- audit_report.go
- aws.go
- chart.go
- check.go
- connection.go
- container.go
- costs.go
- dependency_map.go
- dotnet.go
- instance.go
- jvm.go
- kubernetes.go
- labels.go
- log.go
- mongodb.go
- node.go
- pod.go
- postgres.go
- redis.go
- sli.go
- status.go
- table.go
- utils.go
- volume.go
- widget.go
- world.go
Click to show internal directories.
Click to hide internal directories.