collect

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: Apache-2.0 Imports: 56 Imported by: 15

Documentation

Index

Constants

View Source
const (
	NetworkStatusAddressInUse         = "address-in-use"
	NetworkStatusConnectionRefused    = "connection-refused"
	NetworkStatusConnectionTimeout    = "connection-timeout"
	NetworkStatusConnected            = "connected"
	NetworkStatusErrorOther           = "error"
	NetworkStatusBindPermissionDenied = "bind-permission-denied"
)
View Source
const (
	DefaultCephNamespace = "rook-ceph"
)

Variables

View Source
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",
	},
}

Functions

func Ceph added in v0.9.50

func Ceph(c *Collector, cephCollector *troubleshootv1beta2.Ceph) (map[string][]byte, error)

func ClusterInfo

func ClusterInfo(c *Collector) (map[string][]byte, error)

func ClusterResources

func ClusterResources(c *Collector) (map[string][]byte, error)

func Collectd added in v0.9.49

func Collectd(c *Collector, collectdCollector *troubleshootv1beta2.Collectd) (map[string][]byte, error)

func Copy

func Copy(c *Collector, copyCollector *troubleshootv1beta2.Copy) (map[string][]byte, error)

Copy function gets a file or folder from a container specified in the specs.

func CreateCollector

func CreateCollector(client client.Client, scheme *runtime.Scheme, ownerRef metav1.Object, jobName string, jobNamespace string, serviceAccountName string, jobType string, collect *troubleshootv1beta2.Collect, image string, pullPolicy string) (*corev1.ConfigMap, *corev1.Pod, error)

func Data added in v0.9.14

func Data(c *Collector, dataCollector *troubleshootv1beta2.Data) (map[string][]byte, error)

func DeterministicIDForCollector

func DeterministicIDForCollector(collector *troubleshootv1beta2.Collect) string

func Exec

func Exec(c *Collector, execCollector *troubleshootv1beta2.Exec) (map[string][]byte, error)

func GetCephCollectorFilepath added in v0.9.50

func GetCephCollectorFilepath(name, namespace string) string

func HTTP

func HTTP(c *Collector, httpCollector *troubleshootv1beta2.HTTP) (map[string][]byte, error)

func HostBlockDevices added in v0.10.2

func HostBlockDevices(c *HostCollector) (map[string][]byte, error)

func HostCPU added in v0.10.0

func HostCPU(c *HostCollector) (map[string][]byte, error)

func HostDiskUsage added in v0.10.0

func HostDiskUsage(c *HostCollector) (map[string][]byte, error)

func HostDiskUsageKey added in v0.10.0

func HostDiskUsageKey(name string) string

func HostHTTP added in v0.10.2

func HostHTTP(c *HostCollector) (map[string][]byte, error)

func HostHTTPLoadBalancer added in v0.10.3

func HostHTTPLoadBalancer(c *HostCollector) (map[string][]byte, error)

func HostIPV4Interfaces added in v0.10.3

func HostIPV4Interfaces(c *HostCollector) (map[string][]byte, error)

func HostMemory added in v0.10.0

func HostMemory(c *HostCollector) (map[string][]byte, error)

func HostTCPConnect added in v0.10.3

func HostTCPConnect(c *HostCollector) (map[string][]byte, error)

func HostTCPLoadBalancer added in v0.10.0

func HostTCPLoadBalancer(c *HostCollector) (map[string][]byte, error)

func HostTCPPortStatus added in v0.10.0

func HostTCPPortStatus(c *HostCollector) (map[string][]byte, error)

func HostTime added in v0.10.2

func HostTime(c *HostCollector) (map[string][]byte, error)

func IsRBACError added in v0.9.15

func IsRBACError(err error) bool

func Logs

func Logs(c *Collector, logsCollector *troubleshootv1beta2.Logs) (map[string][]byte, error)

func Mysql added in v0.9.27

func Mysql(c *Collector, databaseCollector *troubleshootv1beta2.Database) (map[string][]byte, error)

func Postgres added in v0.9.27

func Postgres(c *Collector, databaseCollector *troubleshootv1beta2.Database) (map[string][]byte, error)

func Redis added in v0.9.27

func Redis(c *Collector, databaseCollector *troubleshootv1beta2.Database) (map[string][]byte, error)

func Run

func Run(c *Collector, runCollector *troubleshootv1beta2.Run) (map[string][]byte, error)

func Secret

func Secret(c *Collector, secretCollector *troubleshootv1beta2.Secret) (map[string][]byte, 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 CPUInfo added in v0.10.0

type CPUInfo struct {
	LogicalCount  int `json:"logicalCount"`
	PhysicalCount int `json:"physicalCount"`
}

type CephCommand added in v0.9.50

type CephCommand struct {
	ID      string
	Command []string
	Args    []string
	Format  string
}

type ClusterVersion

type ClusterVersion struct {
	Info   *version.Info `json:"info"`
	String string        `json:"string"`
}

type Collector

type Collector struct {
	Collect      *troubleshootv1beta2.Collect
	Redact       bool
	RBACErrors   []error
	ClientConfig *rest.Config
	Namespace    string
	PathPrefix   string
}

func (*Collector) CheckRBAC added in v0.9.15

func (c *Collector) CheckRBAC(ctx context.Context) error

func (*Collector) GetDisplayName added in v0.9.5

func (c *Collector) GetDisplayName() string

func (*Collector) IsExcluded added in v0.9.52

func (c *Collector) IsExcluded() bool

checks if a given collector has a spec with 'exclude' that evaluates to true.

func (*Collector) RunCollectorSync

func (c *Collector) RunCollectorSync(globalRedactors []*troubleshootv1beta2.Redact) (result map[string][]byte, err error)

type Collectors added in v0.9.15

type Collectors []*Collector

func (Collectors) CheckRBAC added in v0.9.15

func (cs Collectors) CheckRBAC(ctx context.Context) error

type DatabaseConnection added in v0.9.27

type DatabaseConnection struct {
	IsConnected bool   `json:"isConnected"`
	Error       string `json:"error,omitempty"`
	Version     string `json:"version,omitempty"`
}

type DiskUsageInfo added in v0.10.0

type DiskUsageInfo struct {
	TotalBytes uint64 `json:"total_bytes"`
	UsedBytes  uint64 `json:"used_bytes"`
}

type FoundSecret

type FoundSecret struct {
	Namespace    string `json:"namespace"`
	Name         string `json:"name"`
	Key          string `json:"key"`
	SecretExists bool   `json:"secretExists"`
	KeyExists    bool   `json:"keyExists"`
	Value        string `json:"value,omitempty"`
}

type HTTPError added in v0.10.2

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

type HTTPResponse added in v0.10.2

type HTTPResponse struct {
	Status  int               `json:"status"`
	Body    string            `json:"body"`
	Headers map[string]string `json:"headers"`
}

type HostCollector added in v0.10.0

type HostCollector struct {
	Collect *troubleshootv1beta2.HostCollect
}

func (*HostCollector) GetDisplayName added in v0.10.0

func (c *HostCollector) GetDisplayName() string

func (*HostCollector) RunCollectorSync added in v0.10.0

func (c *HostCollector) RunCollectorSync() (result map[string][]byte, err error)

type HostCollectors added in v0.10.0

type HostCollectors []*HostCollector

type MemoryInfo added in v0.10.0

type MemoryInfo struct {
	Total uint64 `json:"total"`
}

type NTPStatus added in v0.10.2

type NTPStatus string

type NetworkStatus added in v0.10.0

type NetworkStatus string

type NetworkStatusResult added in v0.10.0

type NetworkStatusResult struct {
	Status NetworkStatus `json:"status"`
}

type RBACError added in v0.9.15

type RBACError struct {
	DisplayName string
	Namespace   string
	Resource    string
	Verb        string
}

func (RBACError) Error added in v0.9.15

func (e RBACError) Error() string

type TimeInfo added in v0.10.2

type TimeInfo struct {
	Timezone        string `json:"timezone"`
	NTPSynchronized bool   `json:"ntp_synchronized"`
	NTPActive       bool   `json:"ntp_active"`
}

Jump to

Keyboard shortcuts

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