> +-- | This function computes the JSON representation of the LV status.
> +buildJsonReport :: IO J.JSValue
> +buildJsonReport = do
> +  fp <- getCurrentDirectory
> +  setCurrentDirectory C.dataCollectorDiagnoseDirectory
> +  cmds <- getDirectoryContents "."
> +  validCmds <- filterM isValid cmds
> +  outs <- forM validCmds (\cmd -> readProcess cmd [] "")

This is not how the node status data collector is specified. You're
running all whitelisted commands instead of the data collector specified
in the configuration, provided it is whitelisted. Note that the secpification
says

  The monitoring daemon will get one additional dedicated data collector
  for node health. The collector will call an external command supposed
  to do any hardware-specific diagnose for the node it is running on.
  That command is configurable, but needs to be white-listed ahead of
  time by the node. For convenience, the empty string will stand for a
  build-in diagnose that always reports that everything is OK; this will
  also be the default value for this collector.
  
  Note that the self-diagnose data collector itself can, and usually will,
  call separate diagnose tools for separate subsystems. However, it always
  has to provide a consolidated description of the overall health state
  of the node.

Also, speaking of the configuration, for each data collector we have
the sampling frequency as part of the configuration; therefore, changing
the set of built-in data collectors requires changes at configuration 
up/downgrade.

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores

Reply via email to