Documentation ¶
Index ¶
- Constants
- Variables
- func CheckOpenShift(foundProviders *providers, apiResources []*metav1.APIResourceList, ...) string
- func ExtractTroubleshootBundle(reader io.Reader, destDir string) error
- func FindBundleRootDir(localBundlePath string) (string, error)
- func ParseNodesForProviders(nodes []corev1.Node) (providers, string)
- type AnalyzeHostBlockDevices
- type AnalyzeHostCPU
- type AnalyzeHostCertificate
- type AnalyzeHostDiskUsage
- type AnalyzeHostFilesystemPerformance
- type AnalyzeHostHTTP
- type AnalyzeHostHTTPLoadBalancer
- type AnalyzeHostIPV4Interfaces
- type AnalyzeHostKernelModules
- type AnalyzeHostMemory
- type AnalyzeHostOS
- type AnalyzeHostServices
- type AnalyzeHostTCPConnect
- type AnalyzeHostTCPLoadBalancer
- type AnalyzeHostTCPPortStatus
- type AnalyzeHostTime
- type AnalyzeResult
- func Analyze(analyzer *troubleshootv1beta2.Analyze, getFile getCollectedFileContents, ...) ([]*AnalyzeResult, error)
- func AnalyzeLocal(localBundlePath string, analyzers []*troubleshootv1beta2.Analyze) ([]*AnalyzeResult, error)
- func DownloadAndAnalyze(bundleURL string, analyzersSpec string) ([]*AnalyzeResult, error)
- func HostAnalyze(hostAnalyzer *troubleshootv1beta2.HostAnalyze, ...) []*AnalyzeResult
- func NewAnalyzeResultError(analyzer HostAnalyzer, err error) []*AnalyzeResult
- type CephHealth
- type CephStatus
- type HealthStatus
- type HostAnalyzer
- type OsdMap
- type PgMap
- type Provider
- type WeaveAttributes
- type WeaveConnection
- type WeaveIPAM
- type WeaveReport
- type WeaveRouter
Constants ¶
const ( SynchronizedActive = "synchronized+active" SynchronizedInactive = "synchronized+inactive" UnsynchronizedActive = "unsynchronized+active" UnsynchronizedInactive = "unsynchronized+inactive" )
Variables ¶
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 FindBundleRootDir ¶ added in v0.9.48
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
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
func (a *AnalyzeHostFilesystemPerformance) Title() string
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
func (a *AnalyzeHostHTTPLoadBalancer) Title() string
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 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)) ([]*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)) ([]*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 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)) ([]*AnalyzeResult, error)
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)) ([]*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
func (a *AnalyzeHostTCPLoadBalancer) Title() string
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 InvolvedObject *corev1.ObjectReference }
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 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 HealthStatus ¶ added in v0.15.0
type HealthStatus struct {
Status string `json:"status"`
}
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 WeaveAttributes ¶ added in v0.13.9
type WeaveConnection ¶ added in v0.13.9
type WeaveConnection struct { State string Info string Attrs WeaveAttributes }
type WeaveReport ¶ added in v0.13.9
type WeaveReport struct { Router WeaveRouter IPAM WeaveIPAM }
relevant fields from https://github.com/weaveworks/weave/blob/e3712152d2a0fe3bc998964c948e45bdf8ff6144/prog/weaver/http.go#L295
type WeaveRouter ¶ added in v0.13.9
type WeaveRouter struct { NickName string // this is the hostname Connections []WeaveConnection }
Source Files ¶
- analyzer.go
- ceph.go
- cluster_pod_statuses.go
- cluster_version.go
- common_status.go
- configmap.go
- container_runtime.go
- crd.go
- database_shared.go
- deployment_status.go
- distribution.go
- download.go
- host_analyzer.go
- host_block_devices.go
- host_certificate.go
- host_cpu.go
- host_disk_usage.go
- host_filesystem_performance.go
- host_http.go
- host_httploadbalancer.go
- host_ipv4interfaces.go
- host_kernel_modules.go
- host_memory.go
- host_os_info.go
- host_services.go
- host_tcp_connect.go
- host_tcploadbalancer.go
- host_tcpportstatus.go
- host_time.go
- image_pull_secret.go
- ingress.go
- job_status.go
- longhorn.go
- mysql.go
- node_resources.go
- postgres.go
- redis.go
- registry.go
- replicaset_status.go
- secret.go
- statefulset_status.go
- storage_class.go
- sysctl.go
- text_analyze.go
- weave.go