diff --git a/fault-monitor/Makefile.am b/fault-monitor/Makefile.am
new file mode 100644
index 0000000..ba7603f
--- /dev/null
+++ b/fault-monitor/Makefile.am
@@ -0,0 +1,17 @@
+AM_DEFAULT_SOURCE_EXT = .cpp
+AM_CPPFLAGS = -I$(top_srcdir)
+
+noinst_HEADERS = fru-fault-monitor.hpp
+
+sbin_PROGRAMS = phosphor-fru-fault-monitor
+
+phosphor_fru_fault_monitor_SOURCES = \
+               fru-fault-monitor.cpp \
+               monitor-main.cpp
+
+phosphor_fru_fault_monitor_LDFLAGS = $(SDBUSPLUS_LIBS) \
+                                     $(PHOSPHOR_LOGGING_LIBS) \
+                                     $(PHOSPHOR_DBUS_INTERFACES_LIBS)
+phosphor_fru_fault_monitor_CFLAGS =  $(SDBUSPLUS_CFLAGS) \
+                                     $(PHOSPHOR_LOGGING_CFLAGS) \
+                                     $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
diff --git a/fault-monitor/fru-fault-monitor.cpp b/fault-monitor/fru-fault-monitor.cpp
new file mode 100644
index 0000000..1213128
--- /dev/null
+++ b/fault-monitor/fru-fault-monitor.cpp
@@ -0,0 +1,38 @@
+#include "fru-fault-monitor.hpp"
+namespace phosphor
+{
+namespace led
+{
+namespace fru
+{
+namespace fault
+{
+namespace monitor
+{
+
+void action(sdbusplus::bus::bus& bus,
+            const std::string& unit,
+            bool assert)
+{
+    return;
+}
+
+int Add::created(sd_bus_message* msg,
+                 void* data,
+                 sd_bus_error* retError)
+{
+    return 0;
+}
+
+int Remove::removed(sd_bus_message* msg,
+                    void* data,
+                    sd_bus_error* retError)
+{
+    return 0;
+}
+
+}//namespace monitor
+}//namespace fault
+}//namespace fru
+}//namespace led
+}//namespace phosphor
diff --git a/fault-monitor/fru-fault-monitor.hpp b/fault-monitor/fru-fault-monitor.hpp
new file mode 100644
index 0000000..8d5195d
--- /dev/null
+++ b/fault-monitor/fru-fault-monitor.hpp
@@ -0,0 +1,143 @@
+#pragma once
+
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/server.hpp>
+#include "config.h"
+
+namespace phosphor
+{
+namespace led
+{
+namespace fru
+{
+namespace fault
+{
+namespace monitor
+{
+
+/** @brief Assert or deassert an LED based on the input FRU
+  *  @param[in] bus       -  The Dbus bus object
+  *  @param[in] path      -  Inventory path of the FRU
+  *  @param[in] assert    -  Assert if true deassert if false
+  */
+void action(sdbusplus::bus::bus& bus,
+            const std::string& path,
+            bool assert);
+
+class Remove;
+
+/** @class Add
+ *  @brief Implementation of LED handling during FRU fault
+ *  @details This implements methods for watching for a FRU fault
+ *  being logged to assert the corresponding LED
+ */
+class Add
+{
+    public:
+        Add() = delete;
+        ~Add() = default;
+        Add(const Add&) = delete;
+        Add& operator=(const Add&) = delete;
+        Add(Add&&) = default;
+        Add& operator=(Add&&) = default;
+
+        /** @brief constructs Add a watch for FRU faults.
+         *  @param[in] bus -  The Dbus bus object
+         */
+        Add(sdbusplus::bus::bus& bus):
+            matchCreated(
+                bus,
+                "type='signal',"
+                "interface='org.freedesktop.DBus.ObjectManager',"
+                "member='InterfacesAdded',"
+                "path_namespace='/xyz/openbmc_project/logging'",
+                created,
+                this)
+        {
+            //Do nothing
+        }
+    private:
+
+        /** @brief sdbusplus signal match for fault created */
+        sdbusplus::server::match::match matchCreated;
+
+        std::vector<std::unique_ptr<Remove>> removeWatches;
+
+        /** @brief Callback function for fru fault created
+         *  @param[in] msg       - Data associated with subscribed signal
+         *  @param[in] data      - Pointer to this object instance
+         *  @param[out] retError - Error returned
+         *  @return zero on success and error code upon failure
+         */
+        static int created(sd_bus_message* msg,
+                           void* data,
+                           sd_bus_error* retError);
+};
+
+/** @class Remove
+ *  @brief Implementation of LED handling after resolution of FRU fault
+ *  @details Implement methods for watching the resolution of FRU faults
+ *  and deasserting corresponding LED.
+ */
+class Remove
+{
+    public:
+        Remove() = delete;
+        ~Remove() = default;
+        Remove(const Remove&) = delete;
+        Remove& operator=(const Remove&) = delete;
+        Remove(Remove&&) = default;
+        Remove& operator=(Remove&&) = default;
+
+        /** @brief constructs Remove
+         *  @param[in] bus  -  The Dbus bus object
+         *  @param[in] path -  Inventory path to fru
+         */
+        Remove(sdbusplus::bus::bus& bus, const std::string& path):
+            inventoryPath(path),
+            matchRemoved(
+                bus,
+                match(path).c_str(),
+                removed,
+                this)
+        {
+            //Do nothing
+        }
+
+    private:
+
+        /** @brief inventory path of the FRU */
+        std::string inventoryPath;
+
+        /** @brief sdbusplus signal matches for fault removed */
+        sdbusplus::server::match::match matchRemoved;
+
+        /** @brief Callback function for fru fault created
+         *  @param[in] msg       - Data associated with subscribed signal
+         *  @param[in] data      - Pointer to this object instance
+         *  @param[out] retError - Error returned
+         *  @return zero on success and error code upon failure
+         */
+        static int removed(sd_bus_message* msg,
+                           void* data,
+                           sd_bus_error* retError);
+
+        /** @brief function to create fault remove match for a fru
+         *  @param[in] path  - Inventory path of the faulty unit.
+         */
+        std::string match(const std::string& path)
+        {
+            std::string matchStmt =
+                "type='signal',"
+                "interface='org.freedesktop.DBus.Properties',"
+                "member='PropertiesChanged',"
+                "path='" + path +
+                "/" + CALLOUT_REV_ASSOCIATION + "'";
+            return matchStmt;
+        }
+};
+}//namespace monitor
+}//namespace fault
+}//namespace fru
+}//namespace led
+}//namespace phosphor
diff --git a/fault-monitor/monitor-main.cpp b/fault-monitor/monitor-main.cpp
new file mode 100644
index 0000000..0b4a5fb
--- /dev/null
+++ b/fault-monitor/monitor-main.cpp
@@ -0,0 +1,17 @@
+#include "fru-fault-monitor.hpp"
+
+int main(void)
+{
+    /** @brief Dbus constructs used by Fault Monitor */
+    sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
+
+    phosphor::led::fru::fault::monitor::Add monitor(bus);
+    /** @brief Wait for client requests */
+    while (true)
+    {
+        /** @brief process dbus calls / signals discarding unhandled */
+        bus.process_discard();
+        bus.wait();
+    }
+    return 0;
+}
