@@ -4064,7 +4064,7 @@ data NodeOSStats = NodeOSStats {
4064 , nodeOSCPUIdle :: Int
4064 , nodeOSCPUIdle :: Int
4065 , nodeOSCPUUser :: Int
4065 , nodeOSCPUUser :: Int
4066 , nodeOSCPUSys :: Int
4066 , nodeOSCPUSys :: Int
4067− , nodeOSLoad :: LoadAvgs
4067+ , nodeOSLoad :: Maybe LoadAvgs
4068 , nodeOSUptime :: NominalDiffTime
4068 , nodeOSUptime :: NominalDiffTime
4069 , nodeOSTimestamp :: UTCTime
4069 , nodeOSTimestamp :: UTCTime
4070 } deriving (Eq, Show, Generic, Typeable)
4070 } deriving (Eq, Show, Generic, Typeable)
@@ -4189,7 +4189,7 @@ data NodePluginInfo = NodePluginInfo {
4189 , nodePluginJVM :: Bool
4189 , nodePluginJVM :: Bool
4190 -- ^ Is this plugin running on the JVM
4190 -- ^ Is this plugin running on the JVM
4191 , nodePluginDescription :: Text
4191 , nodePluginDescription :: Text
4192− , nodePluginVersion :: VersionNumber
4192+ , nodePluginVersion :: Maybe VersionNumber
4193 , nodePluginName :: PluginName
4193 , nodePluginName :: PluginName
4194 } deriving (Eq, Show, Generic, Typeable)
4194 } deriving (Eq, Show, Generic, Typeable)
@@ -4875,7 +4875,7 @@ instance FromJSON NodeOSStats where
4875 swap <- o .: "swap"
4875 swap <- o .: "swap"
4876 mem <- o .: "mem"
4876 mem <- o .: "mem"
4877 cpu <- o .: "cpu"
4877 cpu <- o .: "cpu"
4878− load <- o .: "load_average"
4878+ load <- (Just <$> o .: "load_average" <|> pure Nothing)
4879 NodeOSStats <$> swap .: "free_in_bytes"
4879 NodeOSStats <$> swap .: "free_in_bytes"
4880 <*> swap .: "used_in_bytes"
4880 <*> swap .: "used_in_bytes"
4881 <*> mem .: "actual_used_in_bytes"
4881 <*> mem .: "actual_used_in_bytes"
@@ -5044,11 +5044,11 @@ parseNodeInfo nid o =
5044instance FromJSON NodePluginInfo where
5044instance FromJSON NodePluginInfo where
5045 parseJSON = withObject "NodePluginInfo" parse
5045 parseJSON = withObject "NodePluginInfo" parse
5047− parse o = NodePluginInfo <$> o .: "site"
5047+ parse o = NodePluginInfo <$> o .: "site"
5048− <*> o .: "jvm"
5048+ <*> o .: "jvm"
5049− <*> o .: "description"
5049+ <*> o .: "description"
5050− <*> o .: "version"
5050+ <*> (Just <$> (o .: "version") <|> pure Nothing)
5051− <*> o .: "name"
5051+ <*> o .: "name"
5053instance FromJSON NodeHTTPInfo where
5053instance FromJSON NodeHTTPInfo where
5054 parseJSON = withObject "NodeHTTPInfo" parse
5054 parseJSON = withObject "NodeHTTPInfo" parse