ceph

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package ceph allows to check the status of ceph clusters.

Index

Constants

View Source
const StatusOK = "HEALTH_OK"

StatusOK is the value that ceph reports as health status when everything is good.

Variables

This section is empty.

Functions

func Check

func Check(ctx context.Context) error

Check uses exec to execute the command `ceph status -f json` to get the current status of the cluster that is used by the host healthcheck is running on. If the exec succeeds the output is unmarshalled into Report. Lastly if the field Report->Health->Status is equal to the constant StatusOK nil is returned.

Types

type Report

type Report struct {
	Health struct {
		Status string `json:"status"`
	} `json:"health"`
}

Report is a representation of the data we are interested in within the JSON output of `ceph status`.

Jump to

Keyboard shortcuts

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