monitoring

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2016 License: Apache-2.0 Imports: 28 Imported by: 20

Documentation

Overview

Copyright 2016 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 Gravitational, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	SystemStatusRunning  SystemStatusType = "running"
	SystemStatusDegraded                  = "degraded"
	SystemStatusLoading                   = "loading"
	SystemStatusStopped                   = "stopped"
	SystemStatusUnknown                   = ""
)

Variables

This section is empty.

Functions

func ComponentStatusHealth

func ComponentStatusHealth(kubeAddr string) health.Checker

ComponentStatusHealth creates a checker of the kubernetes component statuses

func ConnectToKube

func ConnectToKube(hostPort string) (*kube.Client, error)

ConnectToKube establishes a connection to kubernetes on the specified address and returns an API client.

func DockerHealth

func DockerHealth(socketPath string) health.Checker

DockerHealth creates a checker that checks health of the docker daemon under the specified socketPath

func EtcdHealth

func EtcdHealth(addr string) health.Checker

EtcdHealth creates a checker that checks health of etcd

func IntraPodCommunication

func IntraPodCommunication(kubeAddr, nettestImage string) health.Checker

IntraPodCommunication creates a checker that runs a network test in the cluster by scheduling pods and verifying the communication

func KubeApiServerHealth

func KubeApiServerHealth(kubeAddr string) health.Checker

KubeApiServerHealth creates a checker for the kubernetes API server

func KubeletHealth

func KubeletHealth(addr string) health.Checker

KubeletHealth creates a checker for the kubernetes kubelet component

func NewComponentStatusChecker

func NewComponentStatusChecker(hostPort string) health.Checker

NewComponentStatusChecker returns a Checker that tests kubernetes component statuses

func NewHTTPHealthzChecker

func NewHTTPHealthzChecker(name, URL string, checker HttpResponseChecker) health.Checker

NewHTTPHealthzChecker is a Checker that tests the specified HTTP endpoint

func NewIntraPodChecker

func NewIntraPodChecker(kubeAddr, nettestContainerImage string) health.Checker

NewIntraPodChecker returns an instance of intraPodChecker.

func NewProbeFromErr

func NewProbeFromErr(name string, err error) *pb.Probe

NewProbeFromErr creates a new Probe given an error and a checker name

func NewSystemdChecker

func NewSystemdChecker() systemdChecker

func NewUnixSocketHealthzChecker

func NewUnixSocketHealthzChecker(name, URL, socketPath string, checker HttpResponseChecker) health.Checker

NewUnixSocketHealthzChecker returns a new Checker that tests the specified unix domain socket path and URL

func SystemdHealth

func SystemdHealth() health.Checker

SystemdHealth creates a checker that reports the status of systemd units

Types

type HttpHealthzChecker

type HttpHealthzChecker struct {
	URL string
	// contains filtered or unexported fields
}

HttpHealthzChecker is a health checker that can check servhice status over HTTP

func (*HttpHealthzChecker) Check

func (r *HttpHealthzChecker) Check(reporter health.Reporter)

Check runs an HTTP check and reports errors to the specified Reporter

func (*HttpHealthzChecker) Name

func (r *HttpHealthzChecker) Name() string

Name returns the name of this checker

type HttpResponseChecker

type HttpResponseChecker func(response io.Reader) error

HttpResponseChecker is a function that can validate service status from response

type KubeChecker

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

KubeChecker implements Checker that can check and report problems with kubernetes services.

func (*KubeChecker) Check

func (r *KubeChecker) Check(reporter health.Reporter)

Check runs the wrapped kubernetes service checker function and reports status to the specified reporter

func (*KubeChecker) Name

func (r *KubeChecker) Name() string

Name returns the name of this checker

type KubeStatusChecker

type KubeStatusChecker func(client *kube.Client) error

KubeStatusChecker is a function that can check status of kubernetes services.

type SystemStatusType

type SystemStatusType string

Jump to

Keyboard shortcuts

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