Documentation ¶
Index ¶
- Constants
- Variables
- func CreateCollector(client *kubernetes.Clientset, scheme *runtime.Scheme, ownerRef metav1.Object, ...) (*corev1.ConfigMap, *corev1.Pod, error)
- func DeterministicIDForCollector(collector *troubleshootv1beta2.Collect) string
- func GetCephCollectorFilepath(name, namespace string) string
- func GetConfigMapErrorsFileName(configMapCollector *troubleshootv1beta2.ConfigMap) string
- func GetConfigMapFileName(configMapCollector *troubleshootv1beta2.ConfigMap, name string) string
- func GetContainerLogs(ctx context.Context, client kubernetes.Interface, namespace string, ...) (string, error)
- func GetLonghornBackingImageManagersDirectory(namespace string) string
- func GetLonghornBackingImagesDirectory(namespace string) string
- func GetLonghornEngineImagesDirectory(namespace string) string
- func GetLonghornEnginesDirectory(namespace string) string
- func GetLonghornInstanceManagersDirectory(namespace string) string
- func GetLonghornLogsDirectory(namespace string) string
- func GetLonghornNodesDirectory(namespace string) string
- func GetLonghornReplicaChecksum(clientConfig *rest.Config, replica longhornv1beta1types.Replica, ...) (string, error)
- func GetLonghornReplicasDirectory(namespace string) string
- func GetLonghornSettingsFile(namespace string) string
- func GetLonghornShareManagersDirectory(namespace string) string
- func GetLonghornVolumesDirectory(namespace string) string
- func GetSecretErrorsFileName(secretCollector *troubleshootv1beta2.Secret) string
- func GetSecretFileName(secretCollector *troubleshootv1beta2.Secret, name string) string
- func HostDiskUsageKey(name string) string
- func IsRBACError(err error) bool
- func ListInstanceManagerReplicaPods(ctx context.Context, clientConfig *rest.Config, namespace string) (map[string]string, error)
- func ParseCollectorFromDoc(doc []byte) (*troubleshootv1beta2.Collector, error)
- func ParseHostCollectorFromDoc(doc []byte) (*troubleshootv1beta2.HostCollector, error)
- func ParseRemoteCollectorFromDoc(doc []byte) (*troubleshootv1beta2.RemoteCollector, error)
- func ParseReplicaChecksum(data []byte) (map[string]string, error)
- func RunPodLogs(ctx context.Context, client v1.CoreV1Interface, pod *corev1.Pod) ([]byte, error)
- func RunPodsReadyNodes(ctx context.Context, client v1.CoreV1Interface, opts RunPodOptions) (map[string][]byte, error)
- func TarSupportBundleDir(bundlePath string, input CollectorResult, outputFilename string) error
- func WaitForPodCompleted(ctx context.Context, client kubernetes.Interface, namespace string, ...) error
- func WaitForPodCondition(ctx context.Context, client kubernetes.Interface, namespace string, ...) error
- type BlockDeviceInfo
- type CPUInfo
- type CephCommand
- type ClusterVersion
- type CollectHostBlockDevices
- type CollectHostCPU
- type CollectHostCertificate
- type CollectHostDiskUsage
- type CollectHostFilesystemPerformance
- type CollectHostHTTP
- type CollectHostHTTPLoadBalancer
- type CollectHostIPV4Interfaces
- type CollectHostKernelModules
- type CollectHostMemory
- type CollectHostServices
- type CollectHostTCPConnect
- type CollectHostTCPLoadBalancer
- type CollectHostTCPPortStatus
- type CollectHostTime
- type CollectProgress
- type Collector
- type CollectorResult
- func Ceph(c *Collector, cephCollector *troubleshootv1beta2.Ceph) (CollectorResult, error)
- func ClusterInfo(c *Collector) (CollectorResult, error)
- func ClusterResources(c *Collector, clusterResourcesCollector *troubleshootv1beta2.ClusterResources) (CollectorResult, error)
- func Collectd(ctx context.Context, c *Collector, collector *troubleshootv1beta2.Collectd, ...) (CollectorResult, error)
- func ConfigMap(ctx context.Context, c *Collector, ...) (CollectorResult, error)
- func Copy(c *Collector, copyCollector *troubleshootv1beta2.Copy) (CollectorResult, error)
- func CopyFromHost(ctx context.Context, c *Collector, collector *troubleshootv1beta2.CopyFromHost, ...) (CollectorResult, error)
- func Data(c *Collector, dataCollector *troubleshootv1beta2.Data) (CollectorResult, error)
- func Exec(c *Collector, execCollector *troubleshootv1beta2.Exec) (CollectorResult, error)
- func HTTP(c *Collector, httpCollector *troubleshootv1beta2.HTTP) (CollectorResult, error)
- func Logs(c *Collector, logsCollector *troubleshootv1beta2.Logs) (CollectorResult, error)
- func Longhorn(c *Collector, longhornCollector *troubleshootv1beta2.Longhorn) (CollectorResult, error)
- func Mysql(c *Collector, databaseCollector *troubleshootv1beta2.Database) (CollectorResult, error)
- func NewResult() CollectorResult
- func Postgres(c *Collector, databaseCollector *troubleshootv1beta2.Database) (CollectorResult, error)
- func Redis(c *Collector, databaseCollector *troubleshootv1beta2.Database) (CollectorResult, error)
- func Registry(c *Collector, registryCollector *troubleshootv1beta2.RegistryImages) (CollectorResult, error)
- func Run(c *Collector, runCollector *troubleshootv1beta2.Run) (CollectorResult, error)
- func Secret(ctx context.Context, c *Collector, secretCollector *troubleshootv1beta2.Secret, ...) (CollectorResult, error)
- func Sysctl(ctx context.Context, c *Collector, client kubernetes.Interface, ...) (CollectorResult, error)
- func (r CollectorResult) CloseWriter(bundlePath string, relativePath string, writer interface{}) error
- func (r CollectorResult) GetReader(bundlePath string, relativePath string) (io.Reader, error)
- func (r CollectorResult) GetWriter(bundlePath string, relativePath string) (io.Writer, error)
- func (r CollectorResult) ReplaceResult(bundlePath string, relativePath string, reader io.Reader) error
- func (r CollectorResult) SaveResult(bundlePath string, relativePath string, reader io.Reader) error
- type CollectorRunOpts
- type Collectors
- type ConfigMapOutput
- type DatabaseConnection
- type DiskUsageInfo
- type Durations
- type FSPerfResults
- type HTTPError
- type HTTPResponse
- type HostCollectResult
- type HostCollector
- type KernelModuleInfo
- type KernelModuleStatus
- type MemoryInfo
- type NTPStatus
- type NetworkStatus
- type NetworkStatusResult
- type RBACError
- type RegistryImage
- type RegistryInfo
- type RemoteCollectResult
- type RemoteCollector
- func (c *RemoteCollector) CheckRBAC(ctx context.Context) error
- func (c *RemoteCollector) GetDisplayName() string
- func (c *RemoteCollector) IsExcluded() bool
- func (c *RemoteCollector) RunCollectorSync(globalRedactors []*troubleshootv1beta2.Redact) (CollectorResult, error)
- func (c *RemoteCollector) RunRemote(ctx context.Context, runner runner, nodes []string, ...) (map[string][]byte, error)
- type RemoteCollectors
- type RunPodOptions
- type SecretOutput
- type ServiceInfo
- type TimeInfo
Constants ¶
const ( KernelModuleUnknown = "unknown" KernelModuleLoaded = "loaded" KernelModuleLoadable = "loadable" KernelModuleLoading = "loading" KernelModuleUnloading = "unloading" )
const ( NetworkStatusAddressInUse = "address-in-use" NetworkStatusConnectionRefused = "connection-refused" NetworkStatusConnectionTimeout = "connection-timeout" NetworkStatusConnected = "connected" NetworkStatusErrorOther = "error" NetworkStatusBindPermissionDenied = "bind-permission-denied" NetworkStatusInvalidAddress = "invalid-address" )
const (
DefaultCephNamespace = "rook-ceph"
)
const (
DefaultLonghornNamespace = "longhorn-system"
)
const HostServicesPath = `system/systemctl_services.json`
const KeyPairEncrypted = "key-pair-encrypted"
const KeyPairInvalid = "key-pair-invalid"
const KeyPairMismatch = "key-pair-mismatch"
const KeyPairMissing = "key-pair-missing"
const KeyPairSwitched = "key-pair-switched"
const KeyPairValid = "key-pair-valid"
Variables ¶
var CephCommands = []CephCommand{ { ID: "status", Command: []string{"ceph", "status"}, Args: []string{"-f", "json-pretty"}, Format: "json", }, { ID: "fs", Command: []string{"ceph", "fs", "status"}, Args: []string{"-f", "json-pretty"}, Format: "json", }, { ID: "fs-ls", Command: []string{"ceph", "fs", "ls"}, Args: []string{"-f", "json-pretty"}, Format: "json", }, { ID: "osd-status", Command: []string{"ceph", "osd", "status"}, Args: []string{"-f", "json-pretty"}, Format: "txt", }, { ID: "osd-tree", Command: []string{"ceph", "osd", "tree"}, Args: []string{"-f", "json-pretty"}, Format: "json", }, { ID: "osd-pool", Command: []string{"ceph", "osd", "pool", "ls", "detail"}, Args: []string{"-f", "json-pretty"}, Format: "json", }, { ID: "health", Command: []string{"ceph", "health", "detail"}, Args: []string{"-f", "json-pretty"}, Format: "json", }, { ID: "auth", Command: []string{"ceph", "auth", "ls"}, Args: []string{"-f", "json-pretty"}, Format: "json", }, { ID: "rgw-stats", Command: []string{"radosgw-admin", "bucket", "stats"}, Args: []string{"--rgw-cache-enabled=false"}, Format: "txt", DefaultTimeout: "30s", }, { ID: "rbd-du", Command: []string{"rbd", "du"}, Args: []string{"--pool=replicapool"}, Format: "txt", }, }
var ( // ErrCollectorNotFound is returned when an undefined host collector is // specified by the user. ErrHostCollectorNotFound = errors.New("unrecognized host collector") )
Functions ¶
func CreateCollector ¶
func CreateCollector(client *kubernetes.Clientset, scheme *runtime.Scheme, ownerRef metav1.Object, name string, namespace string, nodeName string, serviceAccountName string, jobType string, collect *troubleshootv1beta2.HostCollect, image string, pullPolicy string) (*corev1.ConfigMap, *corev1.Pod, error)
func DeterministicIDForCollector ¶
func DeterministicIDForCollector(collector *troubleshootv1beta2.Collect) string
func GetCephCollectorFilepath ¶ added in v0.9.50
func GetConfigMapErrorsFileName ¶ added in v0.13.3
func GetConfigMapErrorsFileName(configMapCollector *troubleshootv1beta2.ConfigMap) string
func GetConfigMapFileName ¶ added in v0.13.3
func GetConfigMapFileName(configMapCollector *troubleshootv1beta2.ConfigMap, name string) string
func GetContainerLogs ¶ added in v0.15.0
func GetLonghornBackingImageManagersDirectory ¶ added in v0.11.0
func GetLonghornBackingImagesDirectory ¶ added in v0.11.0
func GetLonghornEngineImagesDirectory ¶ added in v0.11.0
func GetLonghornEnginesDirectory ¶ added in v0.11.0
func GetLonghornInstanceManagersDirectory ¶ added in v0.11.0
func GetLonghornLogsDirectory ¶ added in v0.11.0
func GetLonghornNodesDirectory ¶ added in v0.11.0
func GetLonghornReplicaChecksum ¶ added in v0.12.0
func GetLonghornReplicasDirectory ¶ added in v0.11.0
func GetLonghornSettingsFile ¶ added in v0.11.0
func GetLonghornShareManagersDirectory ¶ added in v0.11.0
func GetLonghornVolumesDirectory ¶ added in v0.11.0
func GetSecretErrorsFileName ¶ added in v0.13.3
func GetSecretErrorsFileName(secretCollector *troubleshootv1beta2.Secret) string
func GetSecretFileName ¶ added in v0.13.3
func GetSecretFileName(secretCollector *troubleshootv1beta2.Secret, name string) string
func HostDiskUsageKey ¶ added in v0.10.0
func IsRBACError ¶ added in v0.9.15
func ListInstanceManagerReplicaPods ¶ added in v0.12.0
func ListInstanceManagerReplicaPods(ctx context.Context, clientConfig *rest.Config, namespace string) (map[string]string, error)
Returns a map of nodeName:podName
func ParseCollectorFromDoc ¶ added in v0.15.0
func ParseCollectorFromDoc(doc []byte) (*troubleshootv1beta2.Collector, error)
func ParseHostCollectorFromDoc ¶ added in v0.15.0
func ParseHostCollectorFromDoc(doc []byte) (*troubleshootv1beta2.HostCollector, error)
func ParseRemoteCollectorFromDoc ¶ added in v0.15.0
func ParseRemoteCollectorFromDoc(doc []byte) (*troubleshootv1beta2.RemoteCollector, error)
func ParseReplicaChecksum ¶ added in v0.12.0
func RunPodLogs ¶ added in v0.14.0
RunPodLogs runs a pod to completion on a node and returns its logs
func RunPodsReadyNodes ¶ added in v0.14.0
func RunPodsReadyNodes(ctx context.Context, client v1.CoreV1Interface, opts RunPodOptions) (map[string][]byte, error)
func TarSupportBundleDir ¶ added in v0.13.15
func TarSupportBundleDir(bundlePath string, input CollectorResult, outputFilename string) error
Types ¶
type BlockDeviceInfo ¶ added in v0.10.2
type BlockDeviceInfo struct { Name string `json:"name"` KernelName string `json:"kernel_name"` ParentKernelName string `json:"parent_kernel_name"` Type string `json:"type"` Major int `json:"major"` Minor int `json:"minor"` Size uint64 `json:"size"` FilesystemType string `json:"filesystem_type"` Mountpoint string `json:"mountpoint"` Serial string `json:"serial"` ReadOnly bool `json:"read_only"` Removable bool `json:"removable"` }
type CephCommand ¶ added in v0.9.50
type ClusterVersion ¶
type CollectHostBlockDevices ¶ added in v0.10.8
type CollectHostBlockDevices struct {
// contains filtered or unexported fields
}
func (*CollectHostBlockDevices) Collect ¶ added in v0.10.8
func (c *CollectHostBlockDevices) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostBlockDevices) IsExcluded ¶ added in v0.10.8
func (c *CollectHostBlockDevices) IsExcluded() (bool, error)
func (*CollectHostBlockDevices) Title ¶ added in v0.10.8
func (c *CollectHostBlockDevices) Title() string
type CollectHostCPU ¶ added in v0.10.8
type CollectHostCPU struct {
// contains filtered or unexported fields
}
func (*CollectHostCPU) Collect ¶ added in v0.10.8
func (c *CollectHostCPU) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostCPU) IsExcluded ¶ added in v0.10.8
func (c *CollectHostCPU) IsExcluded() (bool, error)
func (*CollectHostCPU) Title ¶ added in v0.10.8
func (c *CollectHostCPU) Title() string
type CollectHostCertificate ¶ added in v0.10.8
type CollectHostCertificate struct {
// contains filtered or unexported fields
}
func (*CollectHostCertificate) Collect ¶ added in v0.10.8
func (c *CollectHostCertificate) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostCertificate) IsExcluded ¶ added in v0.10.8
func (c *CollectHostCertificate) IsExcluded() (bool, error)
func (*CollectHostCertificate) Title ¶ added in v0.10.8
func (c *CollectHostCertificate) Title() string
type CollectHostDiskUsage ¶ added in v0.10.8
type CollectHostDiskUsage struct {
// contains filtered or unexported fields
}
func (*CollectHostDiskUsage) Collect ¶ added in v0.10.8
func (c *CollectHostDiskUsage) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostDiskUsage) IsExcluded ¶ added in v0.10.8
func (c *CollectHostDiskUsage) IsExcluded() (bool, error)
func (*CollectHostDiskUsage) Title ¶ added in v0.10.8
func (c *CollectHostDiskUsage) Title() string
type CollectHostFilesystemPerformance ¶ added in v0.10.8
type CollectHostFilesystemPerformance struct {
// contains filtered or unexported fields
}
func (*CollectHostFilesystemPerformance) Collect ¶ added in v0.10.8
func (c *CollectHostFilesystemPerformance) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostFilesystemPerformance) IsExcluded ¶ added in v0.10.8
func (c *CollectHostFilesystemPerformance) IsExcluded() (bool, error)
func (*CollectHostFilesystemPerformance) Title ¶ added in v0.10.8
func (c *CollectHostFilesystemPerformance) Title() string
type CollectHostHTTP ¶ added in v0.10.8
type CollectHostHTTP struct {
// contains filtered or unexported fields
}
func (*CollectHostHTTP) Collect ¶ added in v0.10.8
func (c *CollectHostHTTP) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostHTTP) IsExcluded ¶ added in v0.10.8
func (c *CollectHostHTTP) IsExcluded() (bool, error)
func (*CollectHostHTTP) Title ¶ added in v0.10.8
func (c *CollectHostHTTP) Title() string
type CollectHostHTTPLoadBalancer ¶ added in v0.10.8
type CollectHostHTTPLoadBalancer struct {
// contains filtered or unexported fields
}
func (*CollectHostHTTPLoadBalancer) Collect ¶ added in v0.10.8
func (c *CollectHostHTTPLoadBalancer) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostHTTPLoadBalancer) IsExcluded ¶ added in v0.10.8
func (c *CollectHostHTTPLoadBalancer) IsExcluded() (bool, error)
func (*CollectHostHTTPLoadBalancer) Title ¶ added in v0.10.8
func (c *CollectHostHTTPLoadBalancer) Title() string
type CollectHostIPV4Interfaces ¶ added in v0.10.8
type CollectHostIPV4Interfaces struct {
// contains filtered or unexported fields
}
func (*CollectHostIPV4Interfaces) Collect ¶ added in v0.10.8
func (c *CollectHostIPV4Interfaces) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostIPV4Interfaces) IsExcluded ¶ added in v0.10.8
func (c *CollectHostIPV4Interfaces) IsExcluded() (bool, error)
func (*CollectHostIPV4Interfaces) Title ¶ added in v0.10.8
func (c *CollectHostIPV4Interfaces) Title() string
type CollectHostKernelModules ¶ added in v0.15.0
type CollectHostKernelModules struct {
// contains filtered or unexported fields
}
CollectHostKernelModules is responsible for collecting kernel module status from the host.
func (*CollectHostKernelModules) Collect ¶ added in v0.15.0
func (c *CollectHostKernelModules) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
Collect the kernel module status from the host. Modules are returned as a map keyed on the module name used by the kernel, e.g:
{ "system/kernel_modules.json": { ... "dm_snapshot": { "instances": 8, "size": 45056, "status": "loaded" }, ... }, }
Module status may be: loaded, loadable, loading, unloading or unknown. When a module is loaded, it may have one or more instances. The size represents the amount of memory (in bytes) that the module is using.
func (*CollectHostKernelModules) IsExcluded ¶ added in v0.15.0
func (c *CollectHostKernelModules) IsExcluded() (bool, error)
IsExcluded returns true if the collector has been excluded from the results.
func (*CollectHostKernelModules) Title ¶ added in v0.15.0
func (c *CollectHostKernelModules) Title() string
Title is the name of the collector.
type CollectHostMemory ¶ added in v0.10.8
type CollectHostMemory struct {
// contains filtered or unexported fields
}
func (*CollectHostMemory) Collect ¶ added in v0.10.8
func (c *CollectHostMemory) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostMemory) IsExcluded ¶ added in v0.10.8
func (c *CollectHostMemory) IsExcluded() (bool, error)
func (*CollectHostMemory) Title ¶ added in v0.10.8
func (c *CollectHostMemory) Title() string
type CollectHostServices ¶ added in v0.10.15
type CollectHostServices struct {
// contains filtered or unexported fields
}
func (*CollectHostServices) Collect ¶ added in v0.10.15
func (c *CollectHostServices) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostServices) IsExcluded ¶ added in v0.10.15
func (c *CollectHostServices) IsExcluded() (bool, error)
func (*CollectHostServices) Title ¶ added in v0.10.15
func (c *CollectHostServices) Title() string
type CollectHostTCPConnect ¶ added in v0.10.8
type CollectHostTCPConnect struct {
// contains filtered or unexported fields
}
func (*CollectHostTCPConnect) Collect ¶ added in v0.10.8
func (c *CollectHostTCPConnect) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostTCPConnect) IsExcluded ¶ added in v0.10.8
func (c *CollectHostTCPConnect) IsExcluded() (bool, error)
func (*CollectHostTCPConnect) Title ¶ added in v0.10.8
func (c *CollectHostTCPConnect) Title() string
type CollectHostTCPLoadBalancer ¶ added in v0.10.8
type CollectHostTCPLoadBalancer struct {
// contains filtered or unexported fields
}
func (*CollectHostTCPLoadBalancer) Collect ¶ added in v0.10.8
func (c *CollectHostTCPLoadBalancer) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostTCPLoadBalancer) IsExcluded ¶ added in v0.10.8
func (c *CollectHostTCPLoadBalancer) IsExcluded() (bool, error)
func (*CollectHostTCPLoadBalancer) Title ¶ added in v0.10.8
func (c *CollectHostTCPLoadBalancer) Title() string
type CollectHostTCPPortStatus ¶ added in v0.10.8
type CollectHostTCPPortStatus struct {
// contains filtered or unexported fields
}
func (*CollectHostTCPPortStatus) Collect ¶ added in v0.10.8
func (c *CollectHostTCPPortStatus) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostTCPPortStatus) IsExcluded ¶ added in v0.10.8
func (c *CollectHostTCPPortStatus) IsExcluded() (bool, error)
func (*CollectHostTCPPortStatus) Title ¶ added in v0.10.8
func (c *CollectHostTCPPortStatus) Title() string
type CollectHostTime ¶ added in v0.10.8
type CollectHostTime struct {
// contains filtered or unexported fields
}
func (*CollectHostTime) Collect ¶ added in v0.10.8
func (c *CollectHostTime) Collect(progressChan chan<- interface{}) (map[string][]byte, error)
func (*CollectHostTime) IsExcluded ¶ added in v0.10.8
func (c *CollectHostTime) IsExcluded() (bool, error)
func (*CollectHostTime) Title ¶ added in v0.10.8
func (c *CollectHostTime) Title() string
type CollectProgress ¶ added in v0.15.0
type Collector ¶
type Collector struct { Collect *troubleshootv1beta2.Collect Redact bool RBACErrors []error ClientConfig *rest.Config Namespace string BundlePath string }
func (*Collector) GetDisplayName ¶ added in v0.9.5
func (*Collector) IsExcluded ¶ added in v0.9.52
checks if a given collector has a spec with 'exclude' that evaluates to true.
func (*Collector) RunCollectorSync ¶
func (c *Collector) RunCollectorSync(clientConfig *rest.Config, client kubernetes.Interface, globalRedactors []*troubleshootv1beta2.Redact) (result CollectorResult, err error)
type CollectorResult ¶ added in v0.13.15
func Ceph ¶ added in v0.9.50
func Ceph(c *Collector, cephCollector *troubleshootv1beta2.Ceph) (CollectorResult, error)
func ClusterInfo ¶
func ClusterInfo(c *Collector) (CollectorResult, error)
func ClusterResources ¶
func ClusterResources(c *Collector, clusterResourcesCollector *troubleshootv1beta2.ClusterResources) (CollectorResult, error)
func Collectd ¶ added in v0.9.49
func Collectd(ctx context.Context, c *Collector, collector *troubleshootv1beta2.Collectd, namespace string, clientConfig *restclient.Config, client kubernetes.Interface) (CollectorResult, error)
func ConfigMap ¶ added in v0.13.3
func ConfigMap(ctx context.Context, c *Collector, configMapCollector *troubleshootv1beta2.ConfigMap, client kubernetes.Interface) (CollectorResult, error)
func Copy ¶
func Copy(c *Collector, copyCollector *troubleshootv1beta2.Copy) (CollectorResult, error)
Copy function gets a file or folder from a container specified in the specs.
func CopyFromHost ¶ added in v0.13.4
func CopyFromHost(ctx context.Context, c *Collector, collector *troubleshootv1beta2.CopyFromHost, namespace string, clientConfig *restclient.Config, client kubernetes.Interface) (CollectorResult, error)
CopyFromHost is a function that copies a file or directory from a host or hosts to include in the bundle.
func Data ¶ added in v0.9.14
func Data(c *Collector, dataCollector *troubleshootv1beta2.Data) (CollectorResult, error)
func Exec ¶
func Exec(c *Collector, execCollector *troubleshootv1beta2.Exec) (CollectorResult, error)
func HTTP ¶
func HTTP(c *Collector, httpCollector *troubleshootv1beta2.HTTP) (CollectorResult, error)
func Logs ¶
func Logs(c *Collector, logsCollector *troubleshootv1beta2.Logs) (CollectorResult, error)
func Longhorn ¶ added in v0.11.0
func Longhorn(c *Collector, longhornCollector *troubleshootv1beta2.Longhorn) (CollectorResult, error)
func Mysql ¶ added in v0.9.27
func Mysql(c *Collector, databaseCollector *troubleshootv1beta2.Database) (CollectorResult, error)
func NewResult ¶ added in v0.13.15
func NewResult() CollectorResult
func Postgres ¶ added in v0.9.27
func Postgres(c *Collector, databaseCollector *troubleshootv1beta2.Database) (CollectorResult, error)
func Redis ¶ added in v0.9.27
func Redis(c *Collector, databaseCollector *troubleshootv1beta2.Database) (CollectorResult, error)
func Registry ¶ added in v0.10.16
func Registry(c *Collector, registryCollector *troubleshootv1beta2.RegistryImages) (CollectorResult, error)
func Run ¶
func Run(c *Collector, runCollector *troubleshootv1beta2.Run) (CollectorResult, error)
func Secret ¶
func Secret(ctx context.Context, c *Collector, secretCollector *troubleshootv1beta2.Secret, client kubernetes.Interface) (CollectorResult, error)
func Sysctl ¶ added in v0.14.0
func Sysctl(ctx context.Context, c *Collector, client kubernetes.Interface, collector *troubleshootv1beta2.Sysctl) (CollectorResult, error)
func (CollectorResult) CloseWriter ¶ added in v0.13.17
func (r CollectorResult) CloseWriter(bundlePath string, relativePath string, writer interface{}) error
func (CollectorResult) ReplaceResult ¶ added in v0.13.15
func (CollectorResult) SaveResult ¶ added in v0.13.15
type CollectorRunOpts ¶ added in v0.15.0
type Collectors ¶ added in v0.9.15
type Collectors []*Collector
type ConfigMapOutput ¶ added in v0.13.3
type DatabaseConnection ¶ added in v0.9.27
type DiskUsageInfo ¶ added in v0.10.0
type FSPerfResults ¶ added in v0.10.4
type FSPerfResults struct { Min time.Duration Max time.Duration Average time.Duration P1 time.Duration P5 time.Duration P10 time.Duration P20 time.Duration P30 time.Duration P40 time.Duration P50 time.Duration P60 time.Duration P70 time.Duration P80 time.Duration P90 time.Duration P95 time.Duration P99 time.Duration P995 time.Duration P999 time.Duration P9995 time.Duration P9999 time.Duration }
func (FSPerfResults) String ¶ added in v0.10.18
func (f FSPerfResults) String() string
type HTTPResponse ¶ added in v0.10.2
type HostCollectResult ¶ added in v0.15.0
type HostCollectResult struct { AllCollectedData map[string][]byte Collectors []HostCollector Spec *troubleshootv1beta2.HostCollector }
func CollectHost ¶ added in v0.15.0
func CollectHost(c *troubleshootv1beta2.HostCollector, additionalRedactors *troubleshootv1beta2.Redactor, opts CollectorRunOpts) (*HostCollectResult, error)
CollectHost runs the collection phase for a local collector.
type HostCollector ¶ added in v0.10.0
type HostCollector interface { Title() string IsExcluded() (bool, error) Collect(progressChan chan<- interface{}) (map[string][]byte, error) }
func GetHostCollector ¶ added in v0.10.8
func GetHostCollector(collector *troubleshootv1beta2.HostCollect) (HostCollector, bool)
type KernelModuleInfo ¶ added in v0.15.0
type KernelModuleInfo struct { Size uint64 `json:"size"` Instances uint `json:"instances"` Status KernelModuleStatus `json:"status"` }
type KernelModuleStatus ¶ added in v0.15.0
type KernelModuleStatus string
type MemoryInfo ¶ added in v0.10.0
type MemoryInfo struct {
Total uint64 `json:"total"`
}
type NetworkStatus ¶ added in v0.10.0
type NetworkStatus string
type NetworkStatusResult ¶ added in v0.10.0
type NetworkStatusResult struct { Status NetworkStatus `json:"status"` Message string `json:"message"` }
type RegistryImage ¶ added in v0.10.16
type RegistryInfo ¶ added in v0.10.16
type RegistryInfo struct {
Images map[string]RegistryImage `json:"images"`
}
type RemoteCollectResult ¶ added in v0.15.0
type RemoteCollectResult struct { AllCollectedData map[string][]byte Collectors RemoteCollectors Spec *troubleshootv1beta2.RemoteCollector // contains filtered or unexported fields }
func CollectRemote ¶ added in v0.15.0
func CollectRemote(c *troubleshootv1beta2.RemoteCollector, additionalRedactors *troubleshootv1beta2.Redactor, opts CollectorRunOpts) (*RemoteCollectResult, error)
CollectRemote runs the collection phase for a remote collector.
type RemoteCollector ¶ added in v0.15.0
type RemoteCollector struct { Collect *troubleshootv1beta2.RemoteCollect Redact bool RBACErrors []error ClientConfig *rest.Config Image string PullPolicy string LabelSelector string Namespace string BundlePath string Timeout time.Duration }
func (*RemoteCollector) CheckRBAC ¶ added in v0.15.0
func (c *RemoteCollector) CheckRBAC(ctx context.Context) error
func (*RemoteCollector) GetDisplayName ¶ added in v0.15.0
func (c *RemoteCollector) GetDisplayName() string
func (*RemoteCollector) IsExcluded ¶ added in v0.15.0
func (c *RemoteCollector) IsExcluded() bool
checks if a given collector has a spec with 'exclude' that evaluates to true.
func (*RemoteCollector) RunCollectorSync ¶ added in v0.15.0
func (c *RemoteCollector) RunCollectorSync(globalRedactors []*troubleshootv1beta2.Redact) (CollectorResult, error)
func (*RemoteCollector) RunRemote ¶ added in v0.15.0
func (c *RemoteCollector) RunRemote(ctx context.Context, runner runner, nodes []string, collector *troubleshootv1beta2.HostCollect, nameGenerator names.NameGenerator, namePrefix string) (map[string][]byte, error)
type RemoteCollectors ¶ added in v0.15.0
type RemoteCollectors []*RemoteCollector
type RunPodOptions ¶ added in v0.14.0
type SecretOutput ¶
type ServiceInfo ¶ added in v0.10.15
Source Files ¶
- ceph.go
- cluster_info.go
- cluster_resources.go
- collect.go
- collectd.go
- collector.go
- configmap.go
- copy.go
- copy_from_host.go
- data.go
- database_shared.go
- exec.go
- host_block_device.go
- host_certificate.go
- host_collector.go
- host_cpu.go
- host_disk_usage.go
- host_filesystem_performance.go
- host_filesystem_performance_linux.go
- host_http.go
- host_httploadbalancer.go
- host_ipv4interfaces.go
- host_kernel_modules.go
- host_memory.go
- host_network.go
- host_services.go
- host_tcp_connect.go
- host_tcploadbalancer.go
- host_tcpportstatus.go
- host_time.go
- http.go
- load.go
- logs.go
- longhorn.go
- mysql.go
- postgres.go
- rbac.go
- redact.go
- redis.go
- registry.go
- remote_collector.go
- result.go
- run-pod.go
- run.go
- runner.go
- secret.go
- sysctl.go
- util.go