diff --git a/health_monitor.cpp b/health_monitor.cpp
index b839ae7..0c732b0 100644
--- a/health_monitor.cpp
+++ b/health_monitor.cpp
@@ -10,12 +10,12 @@
 
 using namespace phosphor::health::utils;
 
-void HealthMonitor::create()
+auto HealthMonitor::startup() -> sdbusplus::async::task<>
 {
     info("Creating Health Monitor with config size {SIZE}", "SIZE",
          configs.size());
     constexpr auto BMCInventoryItem = "xyz.openbmc_project.Inventory.Item.Bmc";
-    auto bmcPaths = findPaths(bus, BMCInventoryItem);
+    auto bmcPaths = findPaths(ctx.get_bus(), BMCInventoryItem);
 
     for (auto& [type, collectionConfig] : configs)
     {
@@ -23,18 +23,24 @@
              std::to_underlying(type));
         collections[type] =
             std::make_unique<CollectionIntf::HealthMetricCollection>(
-                bus, type, collectionConfig, bmcPaths);
+                ctx.get_bus(), type, collectionConfig, bmcPaths);
     }
+
+    co_await run();
 }
 
-void HealthMonitor::run()
+auto HealthMonitor::run() -> sdbusplus::async::task<>
 {
     info("Running Health Monitor");
-    for (auto& [type, collection] : collections)
+    while (!ctx.stop_requested())
     {
-        debug("Reading Health Metric Collection for {TYPE}", "TYPE",
-              std::to_underlying(type));
-        collection->read();
+        for (auto& [type, collection] : collections)
+        {
+            debug("Reading Health Metric Collection for {TYPE}", "TYPE",
+                  std::to_underlying(type));
+            collection->read();
+        }
+        co_await sdbusplus::async::sleep_for(ctx, std::chrono::seconds(5));
     }
 }
 
@@ -50,17 +56,9 @@
     constexpr auto healthMonitorServiceName = "xyz.openbmc_project.HealthMon";
 
     info("Creating health monitor");
-    HealthMonitor healthMonitor{ctx.get_bus()};
+    HealthMonitor healthMonitor{ctx};
     ctx.request_name(healthMonitorServiceName);
 
-    ctx.spawn([&]() -> sdbusplus::async::task<> {
-        while (!ctx.stop_requested())
-        {
-            healthMonitor.run();
-            co_await sdbusplus::async::sleep_for(ctx, std::chrono::seconds(5));
-        }
-    }());
-
     ctx.run();
     return 0;
 }
diff --git a/health_monitor.hpp b/health_monitor.hpp
index 31d16ba..29c6247 100644
--- a/health_monitor.hpp
+++ b/health_monitor.hpp
@@ -2,6 +2,8 @@
 
 #include "health_metric_collection.hpp"
 
+#include <sdbusplus/async.hpp>
+
 #include <unordered_map>
 
 namespace phosphor::health::monitor
@@ -14,23 +16,24 @@
   public:
     HealthMonitor() = delete;
 
-    HealthMonitor(sdbusplus::bus_t& bus) :
-        bus(bus), configs(ConfigIntf::getHealthMetricConfigs())
+    explicit HealthMonitor(sdbusplus::async::context& ctx) :
+        ctx(ctx), configs(ConfigIntf::getHealthMetricConfigs())
     {
-        create();
+        ctx.spawn(startup());
     }
 
-    /** @brief Run the health monitor */
-    void run();
-
   private:
+    /** @brief Setup and run a new health monitor object */
+    auto startup() -> sdbusplus::async::task<>;
+    /** @brief Run the health monitor */
+    auto run() -> sdbusplus::async::task<>;
+
     using map_t = std::unordered_map<
         MetricIntf::Type,
         std::unique_ptr<CollectionIntf::HealthMetricCollection>>;
-    /** @brief Create a new health monitor object */
-    void create();
-    /** @brief D-Bus bus connection */
-    sdbusplus::bus_t& bus;
+
+    /** @brief D-Bus context */
+    sdbusplus::async::context& ctx;
     /** @brief Health metric configs */
     ConfigIntf::HealthMetric::map_t configs;
     map_t collections;
