analyzer

package
v0.123.11 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: Apache-2.0 Imports: 66 Imported by: 20

Documentation

Index

Constants

View Source
const (
	SynchronizedActive     = "synchronized+active"
	SynchronizedInactive   = "synchronized+inactive"
	UnsynchronizedActive   = "unsynchronized+active"
	UnsynchronizedInactive = "unsynchronized+inactive"
)
View Source
const FILE_NOT_COLLECTED = "fileNotCollected"

Variables

View Source
var CephStatusDefaultOutcomes = []*troubleshootv1beta2.Outcome{
	{
		Pass: &troubleshootv1beta2.SingleOutcome{
			Message: "Ceph is healthy",
		},
	},
	{
		Warn: &troubleshootv1beta2.SingleOutcome{
			Message: "Ceph status is HEALTH_WARN",
			URI:     "https://rook.io/docs/rook/v1.4/ceph-common-issues.html",
		},
	},
	{
		Fail: &troubleshootv1beta2.SingleOutcome{
			Message: "Ceph status is HEALTH_ERR",
			URI:     "https://rook.io/docs/rook/v1.4/ceph-common-issues.html",
		},
	},
}

Functions

func CheckApiResourcesForProviders added in v0.45.0

func CheckApiResourcesForProviders(foundProviders *providers, apiResources []*metav1.APIResourceList, provider string) string

func DedupAnalyzers added in v0.60.0

func DedupAnalyzers(allAnalyzers []*troubleshootv1beta2.Analyze) []*troubleshootv1beta2.Analyze

deduplicates a list of troubleshootv1beta2.Analyze objects marshals object to json and then uses its string value to check for uniqueness there is no sorting of the keys in the analyze object's spec so if the spec isn't an exact match line for line as written, no dedup will occur

func DownloadAndExtractSupportBundle added in v0.53.0

func DownloadAndExtractSupportBundle(bundleURL string) (string, string, error)

func ExtractTroubleshootBundle added in v0.9.37

func ExtractTroubleshootBundle(reader io.Reader, destDir string) error

func FindBundleRootDir added in v0.9.48

func FindBundleRootDir(localBundlePath string) (string, error)

FindBundleRootDir detects whether the bundle is stored inside a subdirectory or not. returns the subdirectory path if so, otherwise, returns the path unchanged

func FindResource added in v0.51.0

func FindResource(kind string, clusterScoped bool, namespace string, name string, getFileContents getCollectedFileContents) (interface{}, error)

FindResource locates and returns a kubernetes resource as an interface{} from a support bundle based on some basic selectors if clusterScoped is false and namespace is not provided, it will default to looking in the "default" namespace

func GetExcludeFlag added in v0.36.0

func GetExcludeFlag(analyzer *troubleshootv1beta2.Analyze) *multitype.BoolOrString

func GetVeleroBackupRepositoriesDirectory added in v0.77.0

func GetVeleroBackupRepositoriesDirectory() string

func GetVeleroBackupStorageLocationsDirectory added in v0.77.0

func GetVeleroBackupStorageLocationsDirectory() string

func GetVeleroBackupsDirectory added in v0.77.0

func GetVeleroBackupsDirectory() string

func GetVeleroDeleteBackupRequestsDirectory added in v0.77.0

func GetVeleroDeleteBackupRequestsDirectory() string

func GetVeleroDownloadRequestsDirectory added in v0.77.0

func GetVeleroDownloadRequestsDirectory() string

func GetVeleroLogsDirectory added in v0.77.0

func GetVeleroLogsDirectory() string

func GetVeleroPodVolumeBackupsDirectory added in v0.77.0

func GetVeleroPodVolumeBackupsDirectory() string

func GetVeleroPodVolumeRestoresDirectory added in v0.77.0

func GetVeleroPodVolumeRestoresDirectory() string

func GetVeleroResticRepositoriesDirectory added in v0.77.0

func GetVeleroResticRepositoriesDirectory() string

func GetVeleroRestoresDirectory added in v0.77.0

func GetVeleroRestoresDirectory() string

func GetVeleroSchedulesDirectory added in v0.77.0

func GetVeleroSchedulesDirectory() string

func GetVeleroServerStatusRequestsDirectory added in v0.77.0

func GetVeleroServerStatusRequestsDirectory() string

func GetVeleroVolumeSnapshotLocationsDirectory added in v0.77.0

func GetVeleroVolumeSnapshotLocationsDirectory() string

func ParseNodesForProviders added in v0.9.27

func ParseNodesForProviders(nodes []corev1.Node) (providers, string)

Types

type Agent added in v0.123.0

type Agent interface {
	Name() string
	Analyze(ctx context.Context, data []byte, analyzers []AnalyzerSpec) (*AgentResult, error)
	HealthCheck(ctx context.Context) error
	Capabilities() []string
	IsAvailable() bool
}

Agent interface for different analysis backends

type AgentHealth added in v0.123.0

type AgentHealth struct {
	Name      string    `json:"name"`
	Status    string    `json:"status"`
	Error     string    `json:"error,omitempty"`
	Available bool      `json:"available"`
	LastCheck time.Time `json:"lastCheck"`
}

type AgentMetadata added in v0.123.0

type AgentMetadata struct {
	Name         string   `json:"name"`
	Version      string   `json:"version,omitempty"`
	Capabilities []string `json:"capabilities"`
	Duration     string   `json:"duration"`
	ResultCount  int      `json:"resultCount"`
	ErrorCount   int      `json:"errorCount"`
}

type AgentResult added in v0.123.0

type AgentResult struct {
	Results  []*AnalyzerResult   `json:"results"`
	Metadata AgentResultMetadata `json:"metadata"`
	Errors   []string            `json:"errors,omitempty"`
}

type AgentResultMetadata added in v0.123.0

type AgentResultMetadata struct {
	Duration      time.Duration `json:"duration"`
	AnalyzerCount int           `json:"analyzerCount"`
	Version       string        `json:"version,omitempty"`
}

type AnalysisEngine added in v0.123.0

type AnalysisEngine interface {
	Analyze(ctx context.Context, bundle *SupportBundle, opts AnalysisOptions) (*AnalysisResult, error)
	GenerateAnalyzers(ctx context.Context, requirements *RequirementSpec) ([]AnalyzerSpec, error)
	RegisterAgent(name string, agent Agent) error
	GetAgent(name string) (Agent, bool)
	ListAgents() []string
	HealthCheck(ctx context.Context) (*EngineHealth, error)
}

AnalysisEngine orchestrates analysis across multiple agents

func NewAnalysisEngine added in v0.123.0

func NewAnalysisEngine() AnalysisEngine

NewAnalysisEngine creates a new analysis engine with default configuration

type AnalysisError added in v0.123.0

type AnalysisError struct {
	Agent       string    `json:"agent,omitempty"`
	Analyzer    string    `json:"analyzer,omitempty"`
	Error       string    `json:"error"`
	Category    string    `json:"category"`
	Timestamp   time.Time `json:"timestamp"`
	Recoverable bool      `json:"recoverable"`
}

type AnalysisMetadata added in v0.123.0

type AnalysisMetadata struct {
	Timestamp       time.Time              `json:"timestamp"`
	EngineVersion   string                 `json:"engineVersion"`
	BundleMetadata  *SupportBundleMetadata `json:"bundleMetadata,omitempty"`
	AnalysisOptions AnalysisOptions        `json:"analysisOptions"`
	Agents          []AgentMetadata        `json:"agents"`
	Correlations    []Correlation          `json:"correlations,omitempty"`
}

type AnalysisOptions added in v0.123.0

type AnalysisOptions struct {
	Agents             []string                       `json:"agents,omitempty"`
	IncludeRemediation bool                           `json:"includeRemediation"`
	GenerateArtifacts  bool                           `json:"generateArtifacts"`
	CustomAnalyzers    []*troubleshootv1beta2.Analyze `json:"customAnalyzers,omitempty"`
	Timeout            time.Duration                  `json:"timeout,omitempty"`
	Concurrency        int                            `json:"concurrency,omitempty"`
	FilterByNamespace  string                         `json:"filterByNamespace,omitempty"`
	Strict             bool                           `json:"strict"`
}

type AnalysisResult added in v0.123.0

type AnalysisResult struct {
	Results     []*AnalyzerResult `json:"results"`
	Remediation []RemediationStep `json:"remediation,omitempty"`
	Summary     AnalysisSummary   `json:"summary"`
	Metadata    AnalysisMetadata  `json:"metadata"`
	Errors      []AnalysisError   `json:"errors,omitempty"`
}

type AnalysisSummary added in v0.123.0

type AnalysisSummary struct {
	TotalAnalyzers int      `json:"totalAnalyzers"`
	PassCount      int      `json:"passCount"`
	WarnCount      int      `json:"warnCount"`
	FailCount      int      `json:"failCount"`
	ErrorCount     int      `json:"errorCount"`
	Confidence     float64  `json:"confidence,omitempty"`
	Duration       string   `json:"duration"`
	AgentsUsed     []string `json:"agentsUsed"`
}

type AnalyzeCephStatus added in v0.56.0

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

func (*AnalyzeCephStatus) Analyze added in v0.56.0

func (a *AnalyzeCephStatus) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeCephStatus) IsExcluded added in v0.56.0

func (a *AnalyzeCephStatus) IsExcluded() (bool, error)

func (*AnalyzeCephStatus) Title added in v0.56.0

func (a *AnalyzeCephStatus) Title() string

type AnalyzeCertificates added in v0.66.0

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

func (*AnalyzeCertificates) Analyze added in v0.66.0

func (a *AnalyzeCertificates) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeCertificates) AnalyzeCertificates added in v0.66.0

func (a *AnalyzeCertificates) AnalyzeCertificates(analyzer *troubleshootv1beta2.CertificatesAnalyze, getCollectedFileContents func(string) ([]byte, error)) ([]*AnalyzeResult, error)

func (*AnalyzeCertificates) IsExcluded added in v0.66.0

func (a *AnalyzeCertificates) IsExcluded() (bool, error)

func (*AnalyzeCertificates) Title added in v0.66.0

func (a *AnalyzeCertificates) Title() string

type AnalyzeClusterContainerStatuses added in v0.114.0

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

func (*AnalyzeClusterContainerStatuses) Analyze added in v0.114.0

func (a *AnalyzeClusterContainerStatuses) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeClusterContainerStatuses) IsExcluded added in v0.114.0

func (a *AnalyzeClusterContainerStatuses) IsExcluded() (bool, error)

func (*AnalyzeClusterContainerStatuses) Title added in v0.114.0

type AnalyzeClusterPodStatuses added in v0.56.0

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

func (*AnalyzeClusterPodStatuses) Analyze added in v0.56.0

func (a *AnalyzeClusterPodStatuses) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeClusterPodStatuses) IsExcluded added in v0.56.0

func (a *AnalyzeClusterPodStatuses) IsExcluded() (bool, error)

func (*AnalyzeClusterPodStatuses) Title added in v0.56.0

func (a *AnalyzeClusterPodStatuses) Title() string

type AnalyzeClusterResource added in v0.56.0

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

func (*AnalyzeClusterResource) Analyze added in v0.56.0

func (a *AnalyzeClusterResource) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeClusterResource) IsExcluded added in v0.56.0

func (a *AnalyzeClusterResource) IsExcluded() (bool, error)

func (*AnalyzeClusterResource) Title added in v0.56.0

func (a *AnalyzeClusterResource) Title() string

type AnalyzeClusterVersion added in v0.56.0

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

func (*AnalyzeClusterVersion) Analyze added in v0.56.0

func (a *AnalyzeClusterVersion) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeClusterVersion) IsExcluded added in v0.56.0

func (a *AnalyzeClusterVersion) IsExcluded() (bool, error)

func (*AnalyzeClusterVersion) Title added in v0.56.0

func (a *AnalyzeClusterVersion) Title() string

type AnalyzeConfigMap added in v0.56.0

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

func (*AnalyzeConfigMap) Analyze added in v0.56.0

func (a *AnalyzeConfigMap) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeConfigMap) IsExcluded added in v0.56.0

func (a *AnalyzeConfigMap) IsExcluded() (bool, error)

func (*AnalyzeConfigMap) Title added in v0.56.0

func (a *AnalyzeConfigMap) Title() string

type AnalyzeContainerRuntime added in v0.56.0

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

func (*AnalyzeContainerRuntime) Analyze added in v0.56.0

func (a *AnalyzeContainerRuntime) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeContainerRuntime) IsExcluded added in v0.56.0

func (a *AnalyzeContainerRuntime) IsExcluded() (bool, error)

func (*AnalyzeContainerRuntime) Title added in v0.56.0

func (a *AnalyzeContainerRuntime) Title() string

type AnalyzeCustomResourceDefinition added in v0.56.0

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

func (*AnalyzeCustomResourceDefinition) Analyze added in v0.56.0

func (a *AnalyzeCustomResourceDefinition) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeCustomResourceDefinition) IsExcluded added in v0.56.0

func (a *AnalyzeCustomResourceDefinition) IsExcluded() (bool, error)

func (*AnalyzeCustomResourceDefinition) Title added in v0.56.0

type AnalyzeDeploymentStatus added in v0.56.0

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

func (*AnalyzeDeploymentStatus) Analyze added in v0.56.0

func (a *AnalyzeDeploymentStatus) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeDeploymentStatus) IsExcluded added in v0.56.0

func (a *AnalyzeDeploymentStatus) IsExcluded() (bool, error)

func (*AnalyzeDeploymentStatus) Title added in v0.56.0

func (a *AnalyzeDeploymentStatus) Title() string

type AnalyzeDistribution added in v0.56.0

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

func (*AnalyzeDistribution) Analyze added in v0.56.0

func (a *AnalyzeDistribution) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeDistribution) IsExcluded added in v0.56.0

func (a *AnalyzeDistribution) IsExcluded() (bool, error)

func (*AnalyzeDistribution) Title added in v0.56.0

func (a *AnalyzeDistribution) Title() string

type AnalyzeEvent added in v0.84.0

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

func (*AnalyzeEvent) Analyze added in v0.84.0

func (a *AnalyzeEvent) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeEvent) IsExcluded added in v0.84.0

func (a *AnalyzeEvent) IsExcluded() (bool, error)

func (*AnalyzeEvent) Title added in v0.84.0

func (a *AnalyzeEvent) Title() string

type AnalyzeGoldpinger added in v0.79.0

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

func (*AnalyzeGoldpinger) Analyze added in v0.79.0

func (a *AnalyzeGoldpinger) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeGoldpinger) IsExcluded added in v0.79.0

func (a *AnalyzeGoldpinger) IsExcluded() (bool, error)

func (*AnalyzeGoldpinger) Title added in v0.79.0

func (a *AnalyzeGoldpinger) Title() string

type AnalyzeHTTPAnalyze added in v0.94.0

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

func (*AnalyzeHTTPAnalyze) Analyze added in v0.94.0

func (a *AnalyzeHTTPAnalyze) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeHTTPAnalyze) IsExcluded added in v0.94.0

func (a *AnalyzeHTTPAnalyze) IsExcluded() (bool, error)

func (*AnalyzeHTTPAnalyze) Title added in v0.94.0

func (a *AnalyzeHTTPAnalyze) Title() string

type AnalyzeHostBlockDevices added in v0.10.8

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

func (*AnalyzeHostBlockDevices) Analyze added in v0.10.8

func (a *AnalyzeHostBlockDevices) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostBlockDevices) CheckCondition added in v0.107.6

func (a *AnalyzeHostBlockDevices) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostBlockDevices) IsExcluded added in v0.10.8

func (a *AnalyzeHostBlockDevices) IsExcluded() (bool, error)

func (*AnalyzeHostBlockDevices) Title added in v0.10.8

func (a *AnalyzeHostBlockDevices) Title() string

type AnalyzeHostCPU added in v0.10.8

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

func (*AnalyzeHostCPU) Analyze added in v0.10.8

func (a *AnalyzeHostCPU) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostCPU) CheckCondition added in v0.107.6

func (a *AnalyzeHostCPU) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostCPU) IsExcluded added in v0.10.8

func (a *AnalyzeHostCPU) IsExcluded() (bool, error)

func (*AnalyzeHostCPU) Title added in v0.10.8

func (a *AnalyzeHostCPU) Title() string

type AnalyzeHostCertificate added in v0.10.8

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

func (*AnalyzeHostCertificate) Analyze added in v0.10.8

func (a *AnalyzeHostCertificate) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostCertificate) CheckCondition added in v0.107.6

func (a *AnalyzeHostCertificate) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostCertificate) IsExcluded added in v0.10.8

func (a *AnalyzeHostCertificate) IsExcluded() (bool, error)

func (*AnalyzeHostCertificate) Title added in v0.10.8

func (a *AnalyzeHostCertificate) Title() string

type AnalyzeHostCertificatesCollection added in v0.70.0

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

func (*AnalyzeHostCertificatesCollection) Analyze added in v0.70.0

func (a *AnalyzeHostCertificatesCollection) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostCertificatesCollection) IsExcluded added in v0.70.0

func (a *AnalyzeHostCertificatesCollection) IsExcluded() (bool, error)

func (*AnalyzeHostCertificatesCollection) Title added in v0.70.0

type AnalyzeHostDiskUsage added in v0.10.8

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

func (*AnalyzeHostDiskUsage) Analyze added in v0.10.8

func (a *AnalyzeHostDiskUsage) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostDiskUsage) CheckCondition added in v0.107.6

func (a *AnalyzeHostDiskUsage) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostDiskUsage) IsExcluded added in v0.10.8

func (a *AnalyzeHostDiskUsage) IsExcluded() (bool, error)

func (*AnalyzeHostDiskUsage) Title added in v0.10.8

func (a *AnalyzeHostDiskUsage) Title() string

type AnalyzeHostFilesystemPerformance added in v0.10.8

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

func (*AnalyzeHostFilesystemPerformance) Analyze added in v0.10.8

func (a *AnalyzeHostFilesystemPerformance) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostFilesystemPerformance) IsExcluded added in v0.10.8

func (a *AnalyzeHostFilesystemPerformance) IsExcluded() (bool, error)

func (*AnalyzeHostFilesystemPerformance) Title added in v0.10.8

type AnalyzeHostHTTP added in v0.10.8

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

func (*AnalyzeHostHTTP) Analyze added in v0.10.8

func (a *AnalyzeHostHTTP) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostHTTP) CheckCondition added in v0.107.6

func (a *AnalyzeHostHTTP) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostHTTP) IsExcluded added in v0.10.8

func (a *AnalyzeHostHTTP) IsExcluded() (bool, error)

func (*AnalyzeHostHTTP) Title added in v0.10.8

func (a *AnalyzeHostHTTP) Title() string

type AnalyzeHostHTTPLoadBalancer added in v0.10.8

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

func (*AnalyzeHostHTTPLoadBalancer) Analyze added in v0.10.8

func (a *AnalyzeHostHTTPLoadBalancer) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostHTTPLoadBalancer) CheckCondition added in v0.107.6

func (a *AnalyzeHostHTTPLoadBalancer) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostHTTPLoadBalancer) IsExcluded added in v0.10.8

func (a *AnalyzeHostHTTPLoadBalancer) IsExcluded() (bool, error)

func (*AnalyzeHostHTTPLoadBalancer) Title added in v0.10.8

type AnalyzeHostIPV4Interfaces added in v0.10.8

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

func (*AnalyzeHostIPV4Interfaces) Analyze added in v0.10.8

func (a *AnalyzeHostIPV4Interfaces) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostIPV4Interfaces) CheckCondition added in v0.107.6

func (a *AnalyzeHostIPV4Interfaces) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostIPV4Interfaces) IsExcluded added in v0.10.8

func (a *AnalyzeHostIPV4Interfaces) IsExcluded() (bool, error)

func (*AnalyzeHostIPV4Interfaces) Title added in v0.10.8

func (a *AnalyzeHostIPV4Interfaces) Title() string

type AnalyzeHostJsonCompare added in v0.97.0

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

func (*AnalyzeHostJsonCompare) Analyze added in v0.97.0

func (a *AnalyzeHostJsonCompare) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostJsonCompare) IsExcluded added in v0.97.0

func (a *AnalyzeHostJsonCompare) IsExcluded() (bool, error)

func (*AnalyzeHostJsonCompare) Title added in v0.97.0

func (a *AnalyzeHostJsonCompare) Title() string

type AnalyzeHostKernelConfigs added in v0.93.0

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

func (*AnalyzeHostKernelConfigs) Analyze added in v0.93.0

func (a *AnalyzeHostKernelConfigs) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostKernelConfigs) IsExcluded added in v0.93.0

func (a *AnalyzeHostKernelConfigs) IsExcluded() (bool, error)

func (*AnalyzeHostKernelConfigs) Title added in v0.93.0

func (a *AnalyzeHostKernelConfigs) Title() string

type AnalyzeHostKernelModules added in v0.15.0

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

func (*AnalyzeHostKernelModules) Analyze added in v0.15.0

func (a *AnalyzeHostKernelModules) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

Analyze the kernel module collection results.

When an outcome is specified, the "when" condition must be empty (for default conditions), or made up of 3 parts:

  • comma-separated list of kernel module names, e,g, "target_core_mod,target_core_file,tcm_loop"
  • comparison operator ("==", "=", "!=", "<>")
  • comma-separated state list ("unknown", "loaded", "loadable", "loading", "unloading")

Multiple outcomes can be provided. Outcomes should not conflict.

Default outcomes (with empty when clauses) can be provided for fail, warn and pass. When multiple defaults are provided, evaluation is processed in the order that they were specified and the first to match is returned.

  • a default fail will only trigger if there are no matching non-default pass outcomes.
  • a default warn will only trigger if there are no matching non-default pass or fail outcomes.
  • a default pass will only trigger if there are no matching non-default fail outcomes.

func (*AnalyzeHostKernelModules) IsExcluded added in v0.15.0

func (a *AnalyzeHostKernelModules) IsExcluded() (bool, error)

func (*AnalyzeHostKernelModules) Title added in v0.15.0

func (a *AnalyzeHostKernelModules) Title() string

type AnalyzeHostMemory added in v0.10.8

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

func (*AnalyzeHostMemory) Analyze added in v0.10.8

func (a *AnalyzeHostMemory) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostMemory) CheckCondition added in v0.107.2

func (a *AnalyzeHostMemory) CheckCondition(when string, data []byte) (bool, error)

checkCondition checks the condition of the when clause

func (*AnalyzeHostMemory) IsExcluded added in v0.10.8

func (a *AnalyzeHostMemory) IsExcluded() (bool, error)

func (*AnalyzeHostMemory) Title added in v0.10.8

func (a *AnalyzeHostMemory) Title() string

type AnalyzeHostNetworkNamespaceConnectivity added in v0.108.0

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

func (*AnalyzeHostNetworkNamespaceConnectivity) Analyze added in v0.108.0

func (a *AnalyzeHostNetworkNamespaceConnectivity) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostNetworkNamespaceConnectivity) IsExcluded added in v0.108.0

func (*AnalyzeHostNetworkNamespaceConnectivity) Title added in v0.108.0

type AnalyzeHostOS added in v0.16.0

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

func (*AnalyzeHostOS) Analyze added in v0.16.0

func (a *AnalyzeHostOS) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostOS) CheckCondition added in v0.107.2

func (a *AnalyzeHostOS) CheckCondition(when string, data []byte) (bool, error)

checkCondition checks the condition of the when clause

func (*AnalyzeHostOS) IsExcluded added in v0.16.0

func (a *AnalyzeHostOS) IsExcluded() (bool, error)

func (*AnalyzeHostOS) Title added in v0.16.0

func (a *AnalyzeHostOS) Title() string

type AnalyzeHostServices added in v0.10.15

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

func (*AnalyzeHostServices) Analyze added in v0.10.15

func (a *AnalyzeHostServices) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostServices) CheckCondition added in v0.107.6

func (a *AnalyzeHostServices) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostServices) IsExcluded added in v0.10.15

func (a *AnalyzeHostServices) IsExcluded() (bool, error)

func (*AnalyzeHostServices) Title added in v0.10.15

func (a *AnalyzeHostServices) Title() string

type AnalyzeHostSubnetAvailable added in v0.59.0

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

func (*AnalyzeHostSubnetAvailable) Analyze added in v0.59.0

func (a *AnalyzeHostSubnetAvailable) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostSubnetAvailable) CheckCondition added in v0.107.6

func (a *AnalyzeHostSubnetAvailable) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostSubnetAvailable) IsExcluded added in v0.59.0

func (a *AnalyzeHostSubnetAvailable) IsExcluded() (bool, error)

func (*AnalyzeHostSubnetAvailable) Title added in v0.59.0

type AnalyzeHostSubnetContainsIP added in v0.116.1

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

func (*AnalyzeHostSubnetContainsIP) Analyze added in v0.116.1

func (a *AnalyzeHostSubnetContainsIP) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostSubnetContainsIP) CheckCondition added in v0.116.1

func (a *AnalyzeHostSubnetContainsIP) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostSubnetContainsIP) IsExcluded added in v0.116.1

func (a *AnalyzeHostSubnetContainsIP) IsExcluded() (bool, error)

func (*AnalyzeHostSubnetContainsIP) Title added in v0.116.1

type AnalyzeHostSysctl added in v0.109.0

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

func (*AnalyzeHostSysctl) Analyze added in v0.109.0

func (a *AnalyzeHostSysctl) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostSysctl) CheckCondition added in v0.109.0

func (a *AnalyzeHostSysctl) CheckCondition(when string, data []byte) (bool, error)

checkCondition checks the condition of the when clause

func (*AnalyzeHostSysctl) IsExcluded added in v0.109.0

func (a *AnalyzeHostSysctl) IsExcluded() (bool, error)

func (*AnalyzeHostSysctl) Title added in v0.109.0

func (a *AnalyzeHostSysctl) Title() string

type AnalyzeHostSystemPackages added in v0.24.0

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

func (*AnalyzeHostSystemPackages) Analyze added in v0.24.0

func (a *AnalyzeHostSystemPackages) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostSystemPackages) IsExcluded added in v0.24.0

func (a *AnalyzeHostSystemPackages) IsExcluded() (bool, error)

func (*AnalyzeHostSystemPackages) Title added in v0.24.0

func (a *AnalyzeHostSystemPackages) Title() string

type AnalyzeHostTCPConnect added in v0.10.8

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

func (*AnalyzeHostTCPConnect) Analyze added in v0.10.8

func (a *AnalyzeHostTCPConnect) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostTCPConnect) CheckCondition added in v0.107.6

func (a *AnalyzeHostTCPConnect) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostTCPConnect) IsExcluded added in v0.10.8

func (a *AnalyzeHostTCPConnect) IsExcluded() (bool, error)

func (*AnalyzeHostTCPConnect) Title added in v0.10.8

func (a *AnalyzeHostTCPConnect) Title() string

type AnalyzeHostTCPLoadBalancer added in v0.10.8

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

func (*AnalyzeHostTCPLoadBalancer) Analyze added in v0.10.8

func (a *AnalyzeHostTCPLoadBalancer) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostTCPLoadBalancer) CheckCondition added in v0.107.6

func (a *AnalyzeHostTCPLoadBalancer) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostTCPLoadBalancer) IsExcluded added in v0.10.8

func (a *AnalyzeHostTCPLoadBalancer) IsExcluded() (bool, error)

func (*AnalyzeHostTCPLoadBalancer) Title added in v0.10.8

type AnalyzeHostTCPPortStatus added in v0.10.8

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

AnalyzeHostTCPPortStatus is an analyzer that will return only one matching result, or a warning if nothing matches. The first match that is encountered is the one that is returned.

func (*AnalyzeHostTCPPortStatus) Analyze added in v0.10.8

func (a *AnalyzeHostTCPPortStatus) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostTCPPortStatus) CheckCondition added in v0.107.6

func (a *AnalyzeHostTCPPortStatus) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostTCPPortStatus) IsExcluded added in v0.10.8

func (a *AnalyzeHostTCPPortStatus) IsExcluded() (bool, error)

func (*AnalyzeHostTCPPortStatus) Title added in v0.10.8

func (a *AnalyzeHostTCPPortStatus) Title() string

type AnalyzeHostTextAnalyze added in v0.70.1

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

AnalyzeHostTextAnalyze implements HostAnalyzer interface

func (*AnalyzeHostTextAnalyze) Analyze added in v0.70.1

func (a *AnalyzeHostTextAnalyze) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostTextAnalyze) IsExcluded added in v0.70.1

func (a *AnalyzeHostTextAnalyze) IsExcluded() (bool, error)

func (*AnalyzeHostTextAnalyze) Title added in v0.70.1

func (a *AnalyzeHostTextAnalyze) Title() string

type AnalyzeHostTime added in v0.10.8

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

func (*AnalyzeHostTime) Analyze added in v0.10.8

func (a *AnalyzeHostTime) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostTime) CheckCondition added in v0.107.6

func (a *AnalyzeHostTime) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostTime) IsExcluded added in v0.10.8

func (a *AnalyzeHostTime) IsExcluded() (bool, error)

func (*AnalyzeHostTime) Title added in v0.10.8

func (a *AnalyzeHostTime) Title() string

type AnalyzeHostUDPPortStatus added in v0.55.0

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

AnalyzeHostUDPPortStatus is an analyzer that will return only one matching result, or a warning if nothing matches. The first match that is encountered is the one that is returned.

func (*AnalyzeHostUDPPortStatus) Analyze added in v0.55.0

func (a *AnalyzeHostUDPPortStatus) Analyze(
	getCollectedFileContents func(string) ([]byte, error), findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func (*AnalyzeHostUDPPortStatus) CheckCondition added in v0.107.6

func (a *AnalyzeHostUDPPortStatus) CheckCondition(when string, data []byte) (bool, error)

func (*AnalyzeHostUDPPortStatus) IsExcluded added in v0.55.0

func (a *AnalyzeHostUDPPortStatus) IsExcluded() (bool, error)

func (*AnalyzeHostUDPPortStatus) Title added in v0.55.0

func (a *AnalyzeHostUDPPortStatus) Title() string

type AnalyzeImagePullSecret added in v0.56.0

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

func (*AnalyzeImagePullSecret) Analyze added in v0.56.0

func (a *AnalyzeImagePullSecret) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeImagePullSecret) IsExcluded added in v0.56.0

func (a *AnalyzeImagePullSecret) IsExcluded() (bool, error)

func (*AnalyzeImagePullSecret) Title added in v0.56.0

func (a *AnalyzeImagePullSecret) Title() string

type AnalyzeIngress added in v0.56.0

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

func (*AnalyzeIngress) Analyze added in v0.56.0

func (a *AnalyzeIngress) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeIngress) IsExcluded added in v0.56.0

func (a *AnalyzeIngress) IsExcluded() (bool, error)

func (*AnalyzeIngress) Title added in v0.56.0

func (a *AnalyzeIngress) Title() string

type AnalyzeJobStatus added in v0.56.0

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

func (*AnalyzeJobStatus) Analyze added in v0.56.0

func (a *AnalyzeJobStatus) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeJobStatus) IsExcluded added in v0.56.0

func (a *AnalyzeJobStatus) IsExcluded() (bool, error)

func (*AnalyzeJobStatus) Title added in v0.56.0

func (a *AnalyzeJobStatus) Title() string

type AnalyzeJsonCompare added in v0.56.0

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

func (*AnalyzeJsonCompare) Analyze added in v0.56.0

func (a *AnalyzeJsonCompare) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeJsonCompare) IsExcluded added in v0.56.0

func (a *AnalyzeJsonCompare) IsExcluded() (bool, error)

func (*AnalyzeJsonCompare) Title added in v0.56.0

func (a *AnalyzeJsonCompare) Title() string

type AnalyzeLonghorn added in v0.56.0

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

func (*AnalyzeLonghorn) Analyze added in v0.56.0

func (a *AnalyzeLonghorn) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeLonghorn) IsExcluded added in v0.56.0

func (a *AnalyzeLonghorn) IsExcluded() (bool, error)

func (*AnalyzeLonghorn) Title added in v0.56.0

func (a *AnalyzeLonghorn) Title() string

type AnalyzeMssql added in v0.71.1

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

func (*AnalyzeMssql) Analyze added in v0.71.1

func (a *AnalyzeMssql) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeMssql) IsExcluded added in v0.71.1

func (a *AnalyzeMssql) IsExcluded() (bool, error)

func (*AnalyzeMssql) Title added in v0.71.1

func (a *AnalyzeMssql) Title() string

type AnalyzeMysql added in v0.56.0

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

func (*AnalyzeMysql) Analyze added in v0.56.0

func (a *AnalyzeMysql) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeMysql) IsExcluded added in v0.56.0

func (a *AnalyzeMysql) IsExcluded() (bool, error)

func (*AnalyzeMysql) Title added in v0.56.0

func (a *AnalyzeMysql) Title() string

type AnalyzeNodeMetrics added in v0.87.0

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

func (*AnalyzeNodeMetrics) Analyze added in v0.87.0

func (a *AnalyzeNodeMetrics) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeNodeMetrics) IsExcluded added in v0.87.0

func (a *AnalyzeNodeMetrics) IsExcluded() (bool, error)

func (*AnalyzeNodeMetrics) Title added in v0.87.0

func (a *AnalyzeNodeMetrics) Title() string

type AnalyzeNodeResources added in v0.56.0

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

func (*AnalyzeNodeResources) Analyze added in v0.56.0

func (a *AnalyzeNodeResources) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeNodeResources) IsExcluded added in v0.56.0

func (a *AnalyzeNodeResources) IsExcluded() (bool, error)

func (*AnalyzeNodeResources) Title added in v0.56.0

func (a *AnalyzeNodeResources) Title() string

type AnalyzePostgres added in v0.56.0

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

func (*AnalyzePostgres) Analyze added in v0.56.0

func (a *AnalyzePostgres) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzePostgres) IsExcluded added in v0.56.0

func (a *AnalyzePostgres) IsExcluded() (bool, error)

func (*AnalyzePostgres) Title added in v0.56.0

func (a *AnalyzePostgres) Title() string

type AnalyzeRedis added in v0.56.0

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

func (*AnalyzeRedis) Analyze added in v0.56.0

func (a *AnalyzeRedis) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeRedis) IsExcluded added in v0.56.0

func (a *AnalyzeRedis) IsExcluded() (bool, error)

func (*AnalyzeRedis) Title added in v0.56.0

func (a *AnalyzeRedis) Title() string

type AnalyzeRegistryImages added in v0.56.0

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

func (*AnalyzeRegistryImages) Analyze added in v0.56.0

func (a *AnalyzeRegistryImages) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeRegistryImages) IsExcluded added in v0.56.0

func (a *AnalyzeRegistryImages) IsExcluded() (bool, error)

func (*AnalyzeRegistryImages) Title added in v0.56.0

func (a *AnalyzeRegistryImages) Title() string

type AnalyzeReplicaSetStatus added in v0.56.0

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

func (*AnalyzeReplicaSetStatus) Analyze added in v0.56.0

func (a *AnalyzeReplicaSetStatus) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeReplicaSetStatus) IsExcluded added in v0.56.0

func (a *AnalyzeReplicaSetStatus) IsExcluded() (bool, error)

func (*AnalyzeReplicaSetStatus) Title added in v0.56.0

func (a *AnalyzeReplicaSetStatus) Title() string

type AnalyzeResult

type AnalyzeResult struct {
	IsPass bool
	IsFail bool
	IsWarn bool
	Strict bool

	Title   string
	Message string
	URI     string
	IconKey string
	IconURI string

	InvolvedObject *corev1.ObjectReference
}

func Analyze

func Analyze(
	ctx context.Context,
	analyzer *troubleshootv1beta2.Analyze,
	getFile getCollectedFileContents,
	findFiles getChildCollectedFileContents,
) ([]*AnalyzeResult, error)

func AnalyzeLocal added in v0.9.37

func AnalyzeLocal(
	ctx context.Context,
	localBundlePath string,
	analyzers []*troubleshootv1beta2.Analyze,
	hostAnalyzers []*troubleshootv1beta2.HostAnalyze,
) ([]*AnalyzeResult, error)

Analyze local will analyze a locally available (already downloaded) bundle

func DownloadAndAnalyze added in v0.9.1

func DownloadAndAnalyze(bundleURL string, analyzersSpec string) ([]*AnalyzeResult, error)

func HostAnalyze added in v0.10.0

func HostAnalyze(
	ctx context.Context,
	hostAnalyzer *troubleshootv1beta2.HostAnalyze,
	getFile getCollectedFileContents,
	findFiles getChildCollectedFileContents,
) []*AnalyzeResult

func NewAnalyzeResultError added in v0.10.8

func NewAnalyzeResultError(analyzer HostAnalyzer, err error) []*AnalyzeResult

type AnalyzeSecret added in v0.56.0

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

func (*AnalyzeSecret) Analyze added in v0.56.0

func (a *AnalyzeSecret) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeSecret) IsExcluded added in v0.56.0

func (a *AnalyzeSecret) IsExcluded() (bool, error)

func (*AnalyzeSecret) Title added in v0.56.0

func (a *AnalyzeSecret) Title() string

type AnalyzeStatefulsetStatus added in v0.56.0

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

func (*AnalyzeStatefulsetStatus) Analyze added in v0.56.0

func (a *AnalyzeStatefulsetStatus) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeStatefulsetStatus) IsExcluded added in v0.56.0

func (a *AnalyzeStatefulsetStatus) IsExcluded() (bool, error)

func (*AnalyzeStatefulsetStatus) Title added in v0.56.0

func (a *AnalyzeStatefulsetStatus) Title() string

type AnalyzeStorageClass added in v0.56.0

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

func (*AnalyzeStorageClass) Analyze added in v0.56.0

func (a *AnalyzeStorageClass) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeStorageClass) IsExcluded added in v0.56.0

func (a *AnalyzeStorageClass) IsExcluded() (bool, error)

func (*AnalyzeStorageClass) Title added in v0.56.0

func (a *AnalyzeStorageClass) Title() string

type AnalyzeSysctl added in v0.56.0

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

func (*AnalyzeSysctl) Analyze added in v0.56.0

func (a *AnalyzeSysctl) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeSysctl) IsExcluded added in v0.56.0

func (a *AnalyzeSysctl) IsExcluded() (bool, error)

func (*AnalyzeSysctl) Title added in v0.56.0

func (a *AnalyzeSysctl) Title() string

type AnalyzeTextAnalyze added in v0.56.0

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

func (*AnalyzeTextAnalyze) Analyze added in v0.56.0

func (a *AnalyzeTextAnalyze) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeTextAnalyze) IsExcluded added in v0.56.0

func (a *AnalyzeTextAnalyze) IsExcluded() (bool, error)

func (*AnalyzeTextAnalyze) Title added in v0.56.0

func (a *AnalyzeTextAnalyze) Title() string

type AnalyzeVelero added in v0.77.0

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

func (*AnalyzeVelero) Analyze added in v0.77.0

func (a *AnalyzeVelero) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeVelero) IsExcluded added in v0.77.0

func (a *AnalyzeVelero) IsExcluded() (bool, error)

func (*AnalyzeVelero) Title added in v0.77.0

func (a *AnalyzeVelero) Title() string

type AnalyzeWeaveReport added in v0.56.0

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

func (*AnalyzeWeaveReport) Analyze added in v0.56.0

func (a *AnalyzeWeaveReport) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeWeaveReport) IsExcluded added in v0.56.0

func (a *AnalyzeWeaveReport) IsExcluded() (bool, error)

func (*AnalyzeWeaveReport) Title added in v0.56.0

func (a *AnalyzeWeaveReport) Title() string

type AnalyzeYamlCompare added in v0.56.0

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

func (*AnalyzeYamlCompare) Analyze added in v0.56.0

func (a *AnalyzeYamlCompare) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)

func (*AnalyzeYamlCompare) IsExcluded added in v0.56.0

func (a *AnalyzeYamlCompare) IsExcluded() (bool, error)

func (*AnalyzeYamlCompare) Title added in v0.56.0

func (a *AnalyzeYamlCompare) Title() string

type Analyzer added in v0.56.0

type Analyzer interface {
	Title() string
	IsExcluded() (bool, error)
	Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)
}

func GetAnalyzer added in v0.104.0

func GetAnalyzer(analyzer *troubleshootv1beta2.Analyze) Analyzer

type AnalyzerResult added in v0.123.0

type AnalyzerResult struct {
	// Legacy fields from existing AnalyzeResult
	IsPass  bool   `json:"isPass"`
	IsFail  bool   `json:"isFail"`
	IsWarn  bool   `json:"isWarn"`
	Strict  bool   `json:"strict"`
	Title   string `json:"title"`
	Message string `json:"message"`
	URI     string `json:"uri,omitempty"`
	IconKey string `json:"iconKey,omitempty"`
	IconURI string `json:"iconURI,omitempty"`

	// Enhanced fields for agent-based analysis
	AnalyzerType   string                  `json:"analyzerType"`
	AgentName      string                  `json:"agentName"`
	Confidence     float64                 `json:"confidence,omitempty"`
	Category       string                  `json:"category,omitempty"`
	Severity       string                  `json:"severity,omitempty"`
	Remediation    *RemediationStep        `json:"remediation,omitempty"`
	Context        map[string]interface{}  `json:"context,omitempty"`
	InvolvedObject *corev1.ObjectReference `json:"involvedObject,omitempty"`

	// Correlation and insights
	RelatedResults []string `json:"relatedResults,omitempty"`
	Insights       []string `json:"insights,omitempty"`
	Tags           []string `json:"tags,omitempty"`
}

type AnalyzerSpec added in v0.123.0

type AnalyzerSpec struct {
	Name     string                 `json:"name"`
	Type     string                 `json:"type"`
	Config   map[string]interface{} `json:"config"`
	Priority int                    `json:"priority,omitempty"`
	Category string                 `json:"category,omitempty"`
}

type CephHealth added in v0.9.50

type CephHealth string
const (
	CephHealthOK   CephHealth = "HEALTH_OK"
	CephHealthWarn CephHealth = "HEALTH_WARN"
	CephHealthErr  CephHealth = "HEALTH_ERR"
)

func (CephHealth) Compare added in v0.9.50

func (a CephHealth) Compare(b CephHealth) int

type CephStatus added in v0.15.0

type CephStatus struct {
	Health HealthStatus `json:"health"`
	OsdMap struct {
		OsdMap OsdMap `json:"osdmap"`
	} `json:"osdmap"`
	PgMap PgMap `json:"pgmap"`
}

type CheckMessage added in v0.34.0

type CheckMessage struct {
	Severity string  `json:"severity"`
	Summary  Summary `json:"summary"`
}

type ClusterInfo added in v0.123.0

type ClusterInfo struct {
	Version   string `json:"version"`
	Platform  string `json:"platform"`
	NodeCount int    `json:"nodeCount"`
}

type ComparisonOperator added in v0.87.0

type ComparisonOperator int
const (
	Unknown ComparisonOperator = iota
	Equal
	NotEqual
	GreaterThan
	GreaterThanOrEqual
	LessThan
	LessThanOrEqual
)

func ParseComparisonOperator added in v0.87.0

func ParseComparisonOperator(s string) (ComparisonOperator, error)

type Correlation added in v0.123.0

type Correlation struct {
	ResultIDs   []string `json:"resultIds"`
	Type        string   `json:"type"`
	Description string   `json:"description"`
	Confidence  float64  `json:"confidence"`
}

type CustomRequirement added in v0.123.0

type CustomRequirement struct {
	Name      string                 `json:"name"`
	Type      string                 `json:"type"`
	Condition string                 `json:"condition"`
	Context   map[string]interface{} `json:"context,omitempty"`
}

type DefaultAnalysisEngine added in v0.123.0

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

DefaultAnalysisEngine implements AnalysisEngine

func (*DefaultAnalysisEngine) Analyze added in v0.123.0

Analyze performs analysis using configured agents

func (*DefaultAnalysisEngine) GenerateAnalyzers added in v0.123.0

func (e *DefaultAnalysisEngine) GenerateAnalyzers(ctx context.Context, requirements *RequirementSpec) ([]AnalyzerSpec, error)

GenerateAnalyzers creates analyzers from requirement specifications

func (*DefaultAnalysisEngine) GetAgent added in v0.123.0

func (e *DefaultAnalysisEngine) GetAgent(name string) (Agent, bool)

GetAgent retrieves an agent by name

func (*DefaultAnalysisEngine) HealthCheck added in v0.123.0

func (e *DefaultAnalysisEngine) HealthCheck(ctx context.Context) (*EngineHealth, error)

HealthCheck performs health check on the engine and all agents

func (*DefaultAnalysisEngine) ListAgents added in v0.123.0

func (e *DefaultAnalysisEngine) ListAgents() []string

ListAgents returns names of all registered agents

func (*DefaultAnalysisEngine) RegisterAgent added in v0.123.0

func (e *DefaultAnalysisEngine) RegisterAgent(name string, agent Agent) error

RegisterAgent registers a new analysis agent

type EngineHealth added in v0.123.0

type EngineHealth struct {
	Status      string        `json:"status"`
	Agents      []AgentHealth `json:"agents"`
	LastChecked time.Time     `json:"lastChecked"`
}

type HealthStatus added in v0.15.0

type HealthStatus struct {
	Status string                  `json:"status"`
	Checks map[string]CheckMessage `json:"checks"`
}

type HostAnalyzer added in v0.10.8

type HostAnalyzer interface {
	Title() string
	IsExcluded() (bool, error)
	Analyze(getFile func(string) ([]byte, error), findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error)
}

func GetHostAnalyzer added in v0.10.8

func GetHostAnalyzer(analyzer *troubleshootv1beta2.HostAnalyze) (HostAnalyzer, bool)

type KubernetesRequirements added in v0.123.0

type KubernetesRequirements struct {
	MinVersion string   `json:"minVersion,omitempty"`
	MaxVersion string   `json:"maxVersion,omitempty"`
	Required   []string `json:"required,omitempty"`
	Forbidden  []string `json:"forbidden,omitempty"`
}

type ModelInfo added in v0.123.0

type ModelInfo struct {
	Name        string
	Size        string
	Description string
	Recommended bool
}

ModelInfo contains information about available models

type NetworkRequirements added in v0.123.0

type NetworkRequirements struct {
	Ports        []PortRequirement `json:"ports,omitempty"`
	Connectivity []string          `json:"connectivity,omitempty"`
}

type NodeInfo added in v0.123.0

type NodeInfo struct {
	Name         string            `json:"name"`
	Version      string            `json:"version"`
	OS           string            `json:"os"`
	Architecture string            `json:"architecture"`
	Labels       map[string]string `json:"labels"`
}

type NodeResourceMsg added in v0.101.0

type NodeResourceMsg struct {
	*troubleshootv1beta2.NodeResourceFilters
	NodeCount int
}

type OllamaHealthStatus added in v0.123.0

type OllamaHealthStatus struct {
	Installed bool
	Running   bool
	Models    []string
	Endpoint  string
}

OllamaHealthStatus represents the current state of Ollama

func (OllamaHealthStatus) String added in v0.123.0

func (hs OllamaHealthStatus) String() string

String returns a human-readable status summary

type OllamaHelper added in v0.123.0

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

OllamaHelper provides utilities for downloading and managing Ollama

func NewOllamaHelper added in v0.123.0

func NewOllamaHelper() *OllamaHelper

NewOllamaHelper creates a new Ollama helper with platform-specific defaults

func (*OllamaHelper) DownloadAndInstall added in v0.123.0

func (h *OllamaHelper) DownloadAndInstall() error

DownloadAndInstall automatically downloads and installs Ollama

func (*OllamaHelper) GetHealthStatus added in v0.123.0

func (h *OllamaHelper) GetHealthStatus() OllamaHealthStatus

GetHealthStatus returns the current status of Ollama installation and service

func (*OllamaHelper) GetInstallInstructions added in v0.123.0

func (h *OllamaHelper) GetInstallInstructions() string

GetInstallInstructions returns platform-specific installation instructions

func (*OllamaHelper) GetSetupCommand added in v0.123.0

func (h *OllamaHelper) GetSetupCommand() string

GetSetupCommand returns the command to start Ollama service

func (*OllamaHelper) IsInstalled added in v0.123.0

func (h *OllamaHelper) IsInstalled() bool

IsInstalled checks if Ollama is already installed and available

func (*OllamaHelper) IsRunning added in v0.123.0

func (h *OllamaHelper) IsRunning() bool

IsRunning checks if Ollama service is currently running

func (*OllamaHelper) ListAvailableModels added in v0.123.0

func (h *OllamaHelper) ListAvailableModels() []ModelInfo

ListAvailableModels returns a list of recommended models for troubleshooting

func (*OllamaHelper) PrintModelRecommendations added in v0.123.0

func (h *OllamaHelper) PrintModelRecommendations()

PrintModelRecommendations prints user-friendly model selection guide

func (*OllamaHelper) PullModel added in v0.123.0

func (h *OllamaHelper) PullModel(model string) error

PullModel downloads a specific model for use with Ollama

func (*OllamaHelper) StartService added in v0.123.0

func (h *OllamaHelper) StartService() error

StartService starts the Ollama service

type OsdMap added in v0.15.0

type OsdMap struct {
	NumOsd   int  `json:"num_osds"`
	NumUpOsd int  `json:"num_up_osds"`
	Full     bool `json:"full"`
	NearFull bool `json:"nearfull"`
}

type PgMap added in v0.15.0

type PgMap struct {
	UsedBytes  uint64 `json:"bytes_used"`
	TotalBytes uint64 `json:"bytes_total"`
}

type PortRequirement added in v0.123.0

type PortRequirement struct {
	Port     int    `json:"port"`
	Protocol string `json:"protocol"`
	Required bool   `json:"required"`
}

type Provider added in v0.9.13

type Provider int

type RemediationStep added in v0.123.0

type RemediationStep struct {
	Description   string                 `json:"description"`
	Action        string                 `json:"action,omitempty"`
	Command       string                 `json:"command,omitempty"`
	Documentation string                 `json:"documentation,omitempty"`
	Priority      int                    `json:"priority,omitempty"`
	Category      string                 `json:"category,omitempty"`
	IsAutomatable bool                   `json:"isAutomatable"`
	Context       map[string]interface{} `json:"context,omitempty"`
}

type RequirementMetadata added in v0.123.0

type RequirementMetadata struct {
	Name        string            `json:"name"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

type RequirementSpec added in v0.123.0

type RequirementSpec struct {
	APIVersion string                 `json:"apiVersion"`
	Kind       string                 `json:"kind"`
	Metadata   RequirementMetadata    `json:"metadata"`
	Spec       RequirementSpecDetails `json:"spec"`
}

Requirements-to-analyzers structures

type RequirementSpecDetails added in v0.123.0

type RequirementSpecDetails struct {
	Kubernetes KubernetesRequirements `json:"kubernetes,omitempty"`
	Resources  ResourceRequirements   `json:"resources,omitempty"`
	Storage    StorageRequirements    `json:"storage,omitempty"`
	Network    NetworkRequirements    `json:"network,omitempty"`
	Custom     []CustomRequirement    `json:"custom,omitempty"`
}

type ResourceRequirement added in v0.123.0

type ResourceRequirement struct {
	Min string `json:"min,omitempty"`
	Max string `json:"max,omitempty"`
}

type ResourceRequirements added in v0.123.0

type ResourceRequirements struct {
	CPU    ResourceRequirement `json:"cpu,omitempty"`
	Memory ResourceRequirement `json:"memory,omitempty"`
	Disk   ResourceRequirement `json:"disk,omitempty"`
}

type StorageRequirements added in v0.123.0

type StorageRequirements struct {
	Classes     []string `json:"classes,omitempty"`
	MinCapacity string   `json:"minCapacity,omitempty"`
	AccessModes []string `json:"accessModes,omitempty"`
}

type Summary added in v0.34.0

type Summary struct {
	Message string `json:"message"`
}

type SupportBundle added in v0.123.0

type SupportBundle struct {
	Files    map[string][]byte      `json:"files"`
	Metadata *SupportBundleMetadata `json:"metadata"`
}

type SupportBundleMetadata added in v0.123.0

type SupportBundleMetadata struct {
	CreatedAt   time.Time         `json:"createdAt"`
	Version     string            `json:"version"`
	ClusterInfo *ClusterInfo      `json:"clusterInfo,omitempty"`
	NodeInfo    []NodeInfo        `json:"nodeInfo,omitempty"`
	GeneratedBy string            `json:"generatedBy"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
}

type WeaveAttributes added in v0.13.9

type WeaveAttributes struct {
	Encrypted bool   `json:"encrypted"`
	MTU       int    `json:"mtu"`
	Name      string `json:"name"`
}

type WeaveConnection added in v0.13.9

type WeaveConnection struct {
	State string
	Info  string
	Attrs WeaveAttributes
}

type WeaveIPAM added in v0.13.9

type WeaveIPAM struct {
	RangeNumIPs      int
	ActiveIPs        int
	PendingAllocates []string
}

type WeaveRouter added in v0.13.9

type WeaveRouter struct {
	NickName    string // this is the hostname
	Connections []WeaveConnection
}

Directories

Path Synopsis
agents

Jump to

Keyboard shortcuts

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