runtime: increment trigger/service counters on the bus
This commit is contained in:
@@ -82,12 +82,13 @@ runController rootDir bus (Controller name machine _enabled) = do
|
||||
defaultMain :: IO ()
|
||||
defaultMain = withSocketsDo $ do
|
||||
severity <- maybe InfoS (const DebugS) <$> lookupEnv "HA_DEBUG"
|
||||
withBus severity $ \bus -> do
|
||||
store <- System.Metrics.newStore
|
||||
System.Metrics.registerGcMetrics store
|
||||
appMetrics <- HomeAssistant.Runtime.Metrics.registerAppMetrics store
|
||||
withBus severity appMetrics $ \bus -> do
|
||||
token <- getEnv "HA_TOKEN"
|
||||
host <- getEnv "HA_HOST"
|
||||
rootPath <- fromMaybe "/tmp/" <$> lookupEnv "HA_LIB_DIR"
|
||||
store <- System.Metrics.newStore
|
||||
System.Metrics.registerGcMetrics store
|
||||
rrdPath <- fromMaybe "hass-controller.rrd" <$> lookupEnv "HA_RRD_PATH"
|
||||
rrdtool <- fromMaybe "rrdtool" <$> lookupEnv "HA_RRDTOOL"
|
||||
let active = [c | c@(Controller _ _ True) <- controllers]
|
||||
|
||||
Reference in New Issue
Block a user