analyzer

package
v0.13.11 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 41 Imported by: 20

Documentation

Index

Constants

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

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 CheckOpenShift added in v0.9.27

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

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 ParseNodesForProviders added in v0.9.27

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

Types

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)) ([]*AnalyzeResult, 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)) ([]*AnalyzeResult, 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)) ([]*AnalyzeResult, 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 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)) ([]*AnalyzeResult, 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)) ([]*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)) ([]*AnalyzeResult, 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)) ([]*AnalyzeResult, 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)) ([]*AnalyzeResult, 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 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)) ([]*AnalyzeResult, error)

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 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)) ([]*AnalyzeResult, 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 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)) ([]*AnalyzeResult, 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)) ([]*AnalyzeResult, 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)) ([]*AnalyzeResult, 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 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)) ([]*AnalyzeResult, 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 AnalyzeResult

type AnalyzeResult struct {
	IsPass bool
	IsFail bool
	IsWarn bool

	Title   string
	Message string
	URI     string
	IconKey string
	IconURI string
}

func Analyze

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

func AnalyzeLocal added in v0.9.37

func AnalyzeLocal(localBundlePath string, analyzers []*troubleshootv1beta2.Analyze) ([]*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(hostAnalyzer *troubleshootv1beta2.HostAnalyze, getFile getCollectedFileContents, findFiles getChildCollectedFileContents) []*AnalyzeResult

func NewAnalyzeResultError added in v0.10.8

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

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 HostAnalyzer added in v0.10.8

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

func GetHostAnalyzer added in v0.10.8

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

type Provider added in v0.9.13

type Provider int

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
}

Jump to

Keyboard shortcuts

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