ganeti
Safe HaskellNone

Ganeti.HTools.Backend.MonD

Description

Monitoring daemon backend

This module holds implements the querying of the monitoring daemons for dynamic utilisation data.

Synopsis

General definitions

data Report Source #

The actual data types for MonD's Data Collectors.

Constructors

CPUavgloadReport CPUavgload 
InstanceCpuReport (Map String Double) 

data DataCollector Source #

Type describing a data collector basic information.

Constructors

DataCollector 

Fields

Node-total CPU load average data collector

mkCpuReport :: DCReport -> Maybe Report Source #

Parse a DCReport for the node-total CPU collector.

updateNodeCpuFromReport :: (Node, Report) -> Node Source #

Take reports of node CPU values and update a node accordingly.

updateCpuUtilDataFromNode :: List -> Node -> List Source #

Update the instance CPU-utilization data, asuming that each virtual CPU contributes equally to the node CPU load.

useNodeTotalCPU :: [(Node, Report)] -> (List, List) -> Result (List, List) Source #

Update cluster data from node CPU load reports.

totalCPUCollector :: DataCollector Source #

The node-total CPU collector.

Xen instance CPU-usage collector

mkXenCpuReport :: DCReport -> Maybe Report Source #

Parse results of the Xen-Cpu-load data collector.

useInstanceCpuData :: [(Node, Report)] -> (List, List) -> Result (List, List) Source #

Update cluster data based on the per-instance CPU usage reports

xenCPUCollector :: DataCollector Source #

Collector for per-instance CPU data as observed by Xen

Collector choice

collectors :: Options -> [DataCollector] Source #

The list of Data Collectors used by hail and hbal.

Querying infrastructure

mkReport :: DataCollector -> Maybe DCReport -> Maybe Report Source #

Return the data from correct combination of a Data Collector and a DCReport.

type MonDData = (String, [DCReport]) Source #

MonDs Data parsed by a mock file. Representing (node name, list of reports produced by MonDs Data Collectors).

type MapMonDData = Map String [DCReport] Source #

A map storing MonDs data.

fromFile :: DataCollector -> Node -> MapMonDData -> Maybe DCReport Source #

Get data report for the specified Data Collector and Node from the map.

getDCCName :: Maybe DCCategory -> String Source #

Get Category Name.

prepareUrl :: DataCollector -> Node -> URLString Source #

Prepare url to query a single collector.

fromCurl :: DataCollector -> Node -> IO (Maybe DCReport) Source #

Query a specified MonD for a Data Collector.

pMonDN :: JSRecord -> Result MonDData Source #

Parse a node's JSON record.

pMonDData :: String -> Result [MonDData] Source #

Parse MonD data file contents.

queryAMonD :: Maybe MapMonDData -> DataCollector -> Node -> IO (Maybe Report) Source #

Query a single MonD for a single Data Collector.

queryAllMonDs :: Maybe MapMonDData -> (List, List) -> DataCollector -> WriterT All IO (List, List) Source #

Query all MonDs for a single Data Collector. Return the updated cluster, as well as a bit inidicating wether the collector succeeded.

queryAllMonDDCs :: ClusterData -> Options -> WriterT All IO ClusterData Source #

Query all MonDs for all Data Collector. Return the cluster enriched by dynamic data, as well as a bit indicating wether all collectors could be queried successfully.