Safe Haskell | None |
---|
Monitoring daemon backend
This module holds implements the querying of the monitoring daemons for dynamic utilisation data.
Synopsis
- data Report
- = CPUavgloadReport CPUavgload
- | InstanceCpuReport (Map String Double)
- data DataCollector = DataCollector {}
- mkCpuReport :: DCReport -> Maybe Report
- updateNodeCpuFromReport :: (Node, Report) -> Node
- updateCpuUtilDataFromNode :: List -> Node -> List
- useNodeTotalCPU :: [(Node, Report)] -> (List, List) -> Result (List, List)
- totalCPUCollector :: DataCollector
- mkXenCpuReport :: DCReport -> Maybe Report
- useInstanceCpuData :: [(Node, Report)] -> (List, List) -> Result (List, List)
- xenCPUCollector :: DataCollector
- collectors :: Options -> [DataCollector]
- mkReport :: DataCollector -> Maybe DCReport -> Maybe Report
- type MonDData = (String, [DCReport])
- type MapMonDData = Map String [DCReport]
- fromFile :: DataCollector -> Node -> MapMonDData -> Maybe DCReport
- getDCCName :: Maybe DCCategory -> String
- prepareUrl :: DataCollector -> Node -> URLString
- fromCurl :: DataCollector -> Node -> IO (Maybe DCReport)
- pMonDN :: JSRecord -> Result MonDData
- pMonDData :: String -> Result [MonDData]
- queryAMonD :: Maybe MapMonDData -> DataCollector -> Node -> IO (Maybe Report)
- queryAllMonDs :: Maybe MapMonDData -> (List, List) -> DataCollector -> WriterT All IO (List, List)
- queryAllMonDDCs :: ClusterData -> Options -> WriterT All IO ClusterData
General definitions
The actual data types for MonD's Data Collectors.
CPUavgloadReport CPUavgload | |
InstanceCpuReport (Map String Double) |
data DataCollector Source #
Type describing a data collector basic information.
DataCollector | |
|
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.
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.