ganeti
Safe HaskellNone

Ganeti.DataCollectors.Drbd

Description

DRBD data collector.

Synopsis

Documentation

defaultFile :: FilePath Source #

The default path of the DRBD status file. It is hardcoded because it is not likely to change.

defaultCharNum :: Int Source #

The default setting for the maximum amount of not parsed character to print in case of error. It is set to use most of the screen estate on a standard 80x25 terminal. TODO: add the possibility to set this with a command line parameter.

dcName :: String Source #

The name of this data collector.

dcVersion :: DCVersion Source #

The version of this data collector.

dcFormatVersion :: Int Source #

The version number for the data format of this data collector.

dcCategory :: Maybe DCCategory Source #

The category of this data collector.

dcKind :: DCKind Source #

The kind of this data collector.

dcReport :: IO DCReport Source #

The data exported by the data collector, taken from the default location.

Command line options

arguments :: [ArgCompletion] Source #

The list of arguments supported by the program.

getPairingInfo :: Maybe String -> IO (Result [DrbdInstMinor]) Source #

Get information about the pairing of DRBD minors and Ganeti instances on the current node. The information is taken from the Confd client or, if a filename is specified, from a JSON encoded file (for testing purposes).

computeStatus :: DRBDStatus -> DCStatus Source #

Compute the status code and message, given the current DRBD data The final state will have the code corresponding to the worst code of all the devices, and the error message given from the concatenation of the non-empty error messages.

computeDevStatus :: DeviceInfo -> (DCStatusCode, String) Source #

Compute the status of a DRBD device and its error message.

buildJsonReport :: FilePath -> Maybe FilePath -> IO JSValue Source #

This function computes the JSON representation of the DRBD status.

buildDCReport :: FilePath -> Maybe FilePath -> IO DCReport Source #

This function computes the DCReport for the DRBD status.

main :: Options -> [String] -> IO () Source #

Main function.