diff --git a/sdnr/wt/devicemanager/feature/pom.xml b/sdnr/wt/devicemanager/feature/pom.xml
index a5efb1f..d99f071 100644
--- a/sdnr/wt/devicemanager/feature/pom.xml
+++ b/sdnr/wt/devicemanager/feature/pom.xml
@@ -21,7 +21,9 @@
  * ============LICENSE_END=========================================================
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
@@ -34,7 +36,7 @@
     <groupId>org.onap.ccsdk.parent</groupId>
     <artifactId>single-feature-parent</artifactId>
     <version>1.2.2-SNAPSHOT</version>
-    <relativePath/>
+    <relativePath />
   </parent>
 
   <dependencyManagement>
diff --git a/sdnr/wt/devicemanager/installer/pom.xml b/sdnr/wt/devicemanager/installer/pom.xml
index c41cfa4..08464f5 100755
--- a/sdnr/wt/devicemanager/installer/pom.xml
+++ b/sdnr/wt/devicemanager/installer/pom.xml
@@ -21,14 +21,16 @@
  * ============LICENSE_END=========================================================
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
     <groupId>org.onap.ccsdk.parent</groupId>
     <artifactId>odlparent-lite</artifactId>
     <version>1.2.2-SNAPSHOT</version>
-    <relativePath/>
+    <relativePath />
   </parent>
 
   <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
diff --git a/sdnr/wt/devicemanager/model/pom.xml b/sdnr/wt/devicemanager/model/pom.xml
index 8b2c148..c2e59e6 100644
--- a/sdnr/wt/devicemanager/model/pom.xml
+++ b/sdnr/wt/devicemanager/model/pom.xml
@@ -21,7 +21,9 @@
  * ============LICENSE_END=========================================================
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
   <artifactId>sdnr-wt-devicemanager-model</artifactId>
@@ -33,7 +35,7 @@
     <groupId>org.onap.ccsdk.parent</groupId>
     <artifactId>binding-parent</artifactId>
     <version>1.2.2-SNAPSHOT</version>
-    <relativePath/>
+    <relativePath />
   </parent>
 
   <properties>
@@ -66,3 +68,4 @@
     </plugins>
   </build>
 </project>
+
diff --git a/sdnr/wt/devicemanager/provider/pom.xml b/sdnr/wt/devicemanager/provider/pom.xml
index 566001b..f29859f 100644
--- a/sdnr/wt/devicemanager/provider/pom.xml
+++ b/sdnr/wt/devicemanager/provider/pom.xml
@@ -15,7 +15,9 @@
     language governing permissions and limitations under the License.
     ============LICENSE_END=========================================================
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
@@ -28,7 +30,7 @@
     <groupId>org.onap.ccsdk.parent</groupId>
     <artifactId>binding-parent</artifactId>
     <version>1.2.2-SNAPSHOT</version>
-    <relativePath/>
+    <relativePath></relativePath>
   </parent>
 
   <properties>
@@ -95,6 +97,11 @@
       <artifactId>sal-netconf-connector</artifactId>
       <scope>provided</scope>
     </dependency>
+     <dependency>
+      <groupId>org.opendaylight.mdsal</groupId>
+      <artifactId>mdsal-singleton-common-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
     <dependency>
       <groupId>org.json</groupId>
       <artifactId>json</artifactId>
@@ -367,6 +374,7 @@
               org.opendaylight.controller.md.sal.binding.api;version="[1.6,2)",
               org.opendaylight.controller.md.sal.common.api.data;version="[1.6,2)",
               org.opendaylight.controller.sal.binding.api;version="[1.6,2)",
+              org.opendaylight.mdsal.singleton.common.api;version="[2.0,3)",
               org.opendaylight.yangtools.concepts;version="[2.0,3)",
               org.opendaylight.yangtools.yang.binding;version="[0.12,1)",
               org.opendaylight.yangtools.yang.common;version="[2.0,3)",
@@ -486,3 +494,4 @@
     </plugins>
   </build>
 </project>
+
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/archiveservice/ArchiveCleanProvider.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/archiveservice/ArchiveCleanProvider.java
new file mode 100644
index 0000000..44fae6d
--- /dev/null
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/archiveservice/ArchiveCleanProvider.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.archiveservice;
+
+import java.util.Date;
+
+public interface ArchiveCleanProvider {
+
+    /**
+     * Remove all index data older, than specified
+     * @param olderAreOutdated time to specify older elements
+     * @return number of removed elements
+     */
+    int doIndexClean(Date olderAreOutdated);
+
+    /**
+     * Get number of elements older then
+     * @param olderAreOutdated date to compare with and specify older elements
+     * @return number of elements
+     */
+    public int getNumberOfOldObjects(Date olderAreOutdated);
+
+
+}
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/archiveservice/ArchiveCleanService.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/archiveservice/ArchiveCleanService.java
new file mode 100644
index 0000000..eb48b87
--- /dev/null
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/archiveservice/ArchiveCleanService.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.archiveservice;
+
+import java.util.Date;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.config.HtDevicemanagerConfiguration;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.config.IConfigChangedListener;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.config.impl.EsConfig;
+import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService;
+import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+
+public class ArchiveCleanService implements AutoCloseable, IConfigChangedListener, Runnable,ClusterSingletonService {
+
+    private static final Logger LOG = LoggerFactory.getLogger(ArchiveCleanService.class);
+    private static final ServiceGroupIdentifier IDENT = ServiceGroupIdentifier.create("ElasticSearchArchiveCleanService");
+    
+    private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
+    private final ArchiveCleanProvider[] indexCleanList;
+    private final HtDevicemanagerConfiguration htconfig;
+    private final Runnable doClean;
+
+    private EsConfig config;
+    private Future<?> taskReference;
+	private boolean isMaster;
+
+    public ArchiveCleanService(HtDevicemanagerConfiguration config, ArchiveCleanProvider... indexCleanList) {
+        this.config = config.getEs();
+        this.htconfig = config;
+        this.htconfig.registerConfigChangedListener(this);
+        this.indexCleanList = indexCleanList;
+        this.doClean = this;
+        this.taskReference = null;
+
+        this.reinit();
+    }
+
+    private void reinit() {
+
+        if (taskReference != null) {
+            taskReference.cancel(false);
+        }
+        if(this.isMaster) {
+        if (this.config.getArchiveCheckIntervalSeconds() > 0) {
+            LOG.info("DBCleanService is turned on for entries older than {} seconds",
+                    this.config.getArchiveLifetimeSeconds());
+            taskReference = this.scheduler.scheduleAtFixedRate(doClean, 0,
+                    this.config.getArchiveCheckIntervalSeconds(), TimeUnit.SECONDS);
+        } else {
+            LOG.info("DBCleanService is turned off");
+        }
+        }
+        else {
+        	LOG.info("service is inactive on this node. active on another node.");
+        }
+    }
+
+    public Date getDateForOldElements() {
+        return new Date(System.currentTimeMillis() - config.getArchiveLifetimeSeconds() * 1000);
+    }
+
+    public int countOldEntries() {
+        int cnt = 0;
+        Date olderAreOutdated = getDateForOldElements();
+        for (ArchiveCleanProvider indexCleanElement : indexCleanList) {
+            if (indexCleanElement != null) {
+                indexCleanElement.getNumberOfOldObjects(olderAreOutdated);
+            }
+        }
+        return cnt;
+    }
+
+    @Override
+    public void run() {
+
+        try {
+            int removed = 0;
+            Date olderElementToBeRemoved = getDateForOldElements();
+            LOG.trace("cleaning logs from entries older than {}", olderElementToBeRemoved);
+
+            for (ArchiveCleanProvider indexCleanElement : indexCleanList) {
+                if (indexCleanElement != null) {
+                    removed += indexCleanElement.doIndexClean(olderElementToBeRemoved);
+                }
+            }
+            if (removed > 0) {
+                LOG.trace("Removed elements: {}",removed);
+            }
+        } catch (Exception e) {
+            LOG.warn("problem executing dbclean", e);
+        }
+    }
+
+    @Override
+    public void onConfigChanged() {
+        LOG.debug("config changed. reninit timer");
+        ArchiveCleanService.this.config = EsConfig.reload();
+        ArchiveCleanService.this.reinit();
+    };
+
+    @Override
+    public void close() throws Exception {
+        this.htconfig.unregisterConfigChangedListener(this);
+        this.scheduler.shutdown();
+    }
+
+    @Override
+    public String toString() {
+        return "ArchivCleanService [ArchiveCheckIntervalSeconds=" + config.getArchiveCheckIntervalSeconds()
+                + "ArchiveLifetimeSeconds=" + config.getArchiveLifetimeSeconds() + "]";
+    }
+
+	@Override
+	public ServiceGroupIdentifier getIdentifier() {
+		 return IDENT;
+	}
+
+	@Override
+	public void instantiateServiceInstance() {
+		LOG.info("We take Leadership");
+		this.isMaster=true;
+		this.reinit();
+	}
+
+	@Override
+	public ListenableFuture<? extends Object> closeServiceInstance() {
+		LOG.info("We lost Leadership");
+		this.isMaster=false;
+		this.reinit();
+		return Futures.immediateFuture(null);
+	}
+}
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/database/HtDataBaseReaderAndWriter.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/database/HtDataBaseReaderAndWriter.java
index f13b106..a742a94 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/database/HtDataBaseReaderAndWriter.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/database/HtDataBaseReaderAndWriter.java
@@ -54,7 +54,12 @@
         this.mapper = new HtMapper<>( clazz );
 
     }
-
+    /**
+     * @return dataTypeName
+     */
+    public String getDataTypeName() {
+        return this.dataTypeName;
+    }
     /**
      * Remove Object from database
      * @param object Object with content
@@ -201,23 +206,33 @@
         }
         return res;
     }
-
-
     /**
-     * Read all existing objects of a type
-     * @return the list of all objects
+     * Get all elements of related type
+     * @return all Elements
      */
     public List<T> doReadAll() {
+        return doReadAll(null);
+    }
+    /**
+     * Read all existing objects of a type
+     * @param query for the elements
+     * @return the list of all objects
+     */
+    public List<T> doReadAll(QueryBuilder query) {
 
         List<T> res = new ArrayList<>();
         int idx = 0;                //Idx for getAll
         int iterateLength = 100;    //Step width for iterate
 
         SearchHit hits[];
-
-
         do {
-            hits = db.doReadAllJsonData(idx, iterateLength, dataTypeName);
+            if(query!=null) {
+                log.trace("read data in {} {} with query {}",db.getNetworkIndex(),dataTypeName,query);
+                hits=db.doReadByQueryJsonData(0, 99999, dataTypeName, query);
+            }
+            else {
+                hits = db.doReadAllJsonData(idx, iterateLength, dataTypeName);
+            }
             log.debug("Read: {} elements: {}  Failures: {}",dataTypeName,hits.length, mapper.getMappingFailures());
 
             T object;
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/database/HtDatabaseWebAPIClient.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/database/HtDatabaseWebAPIClient.java
index 2593079..ed09d34 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/database/HtDatabaseWebAPIClient.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/database/HtDatabaseWebAPIClient.java
@@ -95,4 +95,8 @@
 
         return sresponse;
     }
+
+	public void insertEntry(String index, String type, JSONObject data) throws IOException {
+		this.sendRequest(String.format("/%s/%s/", index,type), "POST", data);
+	}
 }
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/internalTypes/Resources.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/internalTypes/Resources.java
index 330ff8d..3a899f8 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/internalTypes/Resources.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/internalTypes/Resources.java
@@ -255,7 +255,7 @@
     }
 
     private static Enumeration<URL> getResourceFolderFiles(String folder) {
-        LOG.info("Get ressource: {}", folder);
+        LOG.debug("Get resource: {}", folder);
         URL url = getUrlForRessource(folder);
         String path = url.getPath();
         File[] files = new File(path).listFiles();
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/netconf/ONFCoreNetworkElementFactory.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/netconf/ONFCoreNetworkElementFactory.java
index bda77f2..2ed02c1 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/netconf/ONFCoreNetworkElementFactory.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/netconf/ONFCoreNetworkElementFactory.java
@@ -18,7 +18,6 @@
 package org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf;
 
 import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.container.Capabilities;
@@ -50,7 +49,6 @@
 
     private static final Logger LOG = LoggerFactory.getLogger(ONFCoreNetworkElementFactory.class);
 
-    @SuppressWarnings("deprecation")
     public static @Nonnull ONFCoreNetworkElementRepresentation create(String mountPointNodeName, DataBroker dataBroker,
             WebSocketServiceClient webSocketService, HtDatabaseEventsService databaseService,
             InstanceIdentifier<Node> instanceIdentifier, DataBroker mountpointDataBroker, ProviderClient dcaeProvider,
@@ -59,7 +57,6 @@
 
         ONFCoreNetworkElementRepresentation res = null;
         try (ReadOnlyTransaction tx = dataBroker.newReadOnlyTransaction();){
-            CheckedFuture<Optional<Node>, ReadFailedException> checkedFuture = tx.read(LogicalDatastoreType.OPERATIONAL, instanceIdentifier);
             Optional<Node> nodeOption = tx.read(LogicalDatastoreType.OPERATIONAL, instanceIdentifier).checkedGet();
             if (nodeOption.isPresent()) {
                 Node node = nodeOption.get();
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/netconf/util/NetconfTimeStamp.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/netconf/util/NetconfTimeStamp.java
index a9e451a..0dc6f03 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/netconf/util/NetconfTimeStamp.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/base/netconf/util/NetconfTimeStamp.java
@@ -101,10 +101,18 @@
      * @return String with Date in NETCONF/YANG Format Version 1.0.
      */
     public String getTimeStampAsNetconfString() {
-        return getRightFormattedDate(new Date().getTime());
+        return this.getRightFormattedDate(new Date().getTime());
     }
 
     /**
+     * Get actual timestamp as NETCONF specific type NETCONF/YANG 1.0 Format
+
+     * @return String with Date in NETCONF/YANG Format Version 1.0.
+     */
+    public String getTimeStampAsNetconfString(Date date) {
+        return getRightFormattedDate(date.getTime());
+    }
+    /**
      * Get actual timestamp as NETCONF specific type NETCONF/YANG 1.0 Format in GMT
      *
      * @return DateAndTime Type 1.0. Date in NETCONF/YANG Format Version 1.0.
@@ -113,6 +121,15 @@
         return DateAndTime.getDefaultInstance(getTimeStampAsNetconfString());
     }
 
+    /**
+     * Get time from date as NETCONF specific type NETCONF/YANG 1.0 Format in GMT
+     * @param date specifying the date and time
+     * @return DateAndTime Type 1.0. Date in NETCONF/YANG Format Version 1.0.
+     */
+    public DateAndTime getTimeStamp(Date date) {
+        return DateAndTime.getDefaultInstance(getTimeStampAsNetconfString(date));
+    }
+
 
     /**
      * Return the String with a NETCONF time converted to long
@@ -252,4 +269,6 @@
         }
     }
 
+
+
 }
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/config/impl/AkkaConfig.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/config/impl/AkkaConfig.java
index 55d5b9a..eeccf60 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/config/impl/AkkaConfig.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/config/impl/AkkaConfig.java
@@ -59,6 +59,10 @@
         return this.cluserConfig != null ? this.cluserConfig.isCluster() : false;
     }
 
+    public boolean isClusterAndFirstNode() {
+        return isSingleNode() || isCluster() && getClusterConfig().getRoleMemberIndex() == 1;
+    }
+
     public static AkkaConfig load() throws Exception {
         return load(DEFAULT_FILENAME);
     }
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/config/impl/EsConfig.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/config/impl/EsConfig.java
index 958a0df..bdfbf65 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/config/impl/EsConfig.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/config/impl/EsConfig.java
@@ -29,13 +29,29 @@
     public static final String ESDATATYPENAME = "database";
     private static final String EMPTY = "empty";
     private static final String PROPERTY_KEY_CLUSTER = "esCluster";
+    private static final String PROPERTY_KEY_ARCHIVE_INTERVAL = "esArchiveCheckIntervalSeconds";
+    private static final String PROPERTY_KEY_ARCHIVE_LIMIT = "esArchiveLifetimeSeconds";
+
     private static final String DEFAULT_VALUE_CLUSTER = "";
+    /**
+     * check db data in this interval [in seconds]
+     * 0 deactivated
+     */
+    private static final long DEFAULT_ARCHIVE_INTERVAL_SEC = 0;
+    /**
+     * keep data for this time [in seconds]
+     * 30 days
+     */
+    private static final long DEFAULT_ARCHIVE_LIMIT_SEC = 60 * 60 * 24 * 30;
+
     private static EsConfig esConfig;
 
     private String cluster;
     private String host;
     private String node;
     private String index;
+    private long archiveCheckIntervalSeconds;
+    private long archiveLifetimeSeconds;
 
     private EsConfig() {
         super();
@@ -43,6 +59,8 @@
         this.node = EMPTY;
         this.index = EMPTY;
         this.cluster = DEFAULT_VALUE_CLUSTER;
+        this.archiveCheckIntervalSeconds = DEFAULT_ARCHIVE_INTERVAL_SEC;
+        this.archiveLifetimeSeconds = DEFAULT_ARCHIVE_LIMIT_SEC;
     }
 
     public EsConfig cloneWithIndex(String _index) {
@@ -51,6 +69,8 @@
         c.host = this.host;
         c.node = this.node;
         c.cluster = this.cluster;
+        c.archiveCheckIntervalSeconds = this.archiveCheckIntervalSeconds;
+        c.archiveLifetimeSeconds = this.archiveLifetimeSeconds;
         return c;
     }
 
@@ -90,6 +110,22 @@
         this.index = index;
     }
 
+    public long getArchiveCheckIntervalSeconds() {
+        return this.archiveCheckIntervalSeconds;
+    }
+
+    public void setArchiveCheckIntervalSeconds(long x) {
+        this.archiveCheckIntervalSeconds = x;
+    }
+
+    public long getArchiveLifetimeSeconds() {
+        return this.archiveLifetimeSeconds;
+    }
+
+    public void setArchiveLimit(long x) {
+        this.archiveLifetimeSeconds = x;
+    }
+
     @Override
     public String toString() {
         return "EsConfig [cluster=" + cluster + ", host=" + host + ", node=" + node + ", index=" + index + "]";
@@ -112,9 +148,13 @@
         this.cluster = c;
         this.node = String.format("%s%s", this.cluster, "n1");
         this.host = "localhost";
+        this.archiveCheckIntervalSeconds = this.getLong(PROPERTY_KEY_ARCHIVE_INTERVAL, DEFAULT_ARCHIVE_INTERVAL_SEC);
+        this.archiveLifetimeSeconds = this.getLong(PROPERTY_KEY_ARCHIVE_LIMIT, DEFAULT_ARCHIVE_LIMIT_SEC);
 
         if (save) {
             config.setProperty(SECTION_MARKER_ES + "." + PROPERTY_KEY_CLUSTER, this.cluster);
+            config.setProperty(SECTION_MARKER_ES + "." + PROPERTY_KEY_ARCHIVE_INTERVAL, this.archiveCheckIntervalSeconds);
+            config.setProperty(SECTION_MARKER_ES + "." + PROPERTY_KEY_ARCHIVE_LIMIT, this.archiveLifetimeSeconds);
             this.save();
         }
     }
@@ -170,15 +210,21 @@
         } else if (!node.equals(other.node)) {
             return false;
         }
+        if (archiveCheckIntervalSeconds != other.archiveCheckIntervalSeconds) {
+            return false;
+        }
+        if (archiveLifetimeSeconds != other.archiveLifetimeSeconds) {
+            return false;
+        }
         return true;
     }
 
     @Override
-    public void save()
-    {
+    public void save() {
         this.getConfig().setProperty(SECTION_MARKER_ES + "." + PROPERTY_KEY_CLUSTER, this.cluster);
         super.save();
     }
+
     public static boolean isInstantiated() {
         return esConfig != null;
     }
@@ -213,7 +259,7 @@
     }
 
     public static void clear() {
-        esConfig=null;
+        esConfig = null;
     }
 
 }
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorImpl.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorImpl.java
index 0141b26..89ee376 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorImpl.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/devicemonitor/impl/DeviceMonitorImpl.java
@@ -6,9 +6,9 @@
  * =================================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  * in compliance with the License. You may obtain a copy of the License at
- * 
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software distributed under the License
  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  * or implied. See the License for the specific language governing permissions and limitations under
@@ -61,6 +61,7 @@
  * @author herbert
  */
 
+@SuppressWarnings("deprecation")
 public class DeviceMonitorImpl implements AutoCloseable {
 
     private static final Logger LOG = LoggerFactory.getLogger(DeviceMonitorImpl.class);
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerImpl.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerImpl.java
index f0efe7a..97595dd 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerImpl.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerImpl.java
@@ -24,6 +24,7 @@
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.aaiconnector.impl.AaiProviderClient;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.archiveservice.ArchiveCleanService;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.HtDatabaseNode;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.ONFCoreNetworkElementFactory;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.ONFCoreNetworkElementRepresentation;
@@ -71,6 +72,8 @@
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
+import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration;
 
 @SuppressWarnings("deprecation")
 public class DeviceManagerImpl implements DeviceManagerService, AutoCloseable, ResyncNetworkElementsListener {
@@ -92,6 +95,7 @@
     private RpcProviderRegistry rpcProviderRegistry = null;
     @SuppressWarnings("unused")
     private NotificationPublishService notificationPublishService = null;
+    private ClusterSingletonServiceProvider clusterSingletonServiceProvider;
 
     private final ConcurrentHashMap<String, ONFCoreNetworkElementRepresentation> networkElementRepresentations =
             new ConcurrentHashMap<>();
@@ -116,6 +120,9 @@
     private Thread threadDoClearCurrentFaultByNodename = null;
     private int refreshCounter = 0;
     private AkkaConfig akkaConfig;
+    private ArchiveCleanService archiveCleanService;
+    @SuppressWarnings("unused")
+	private ClusterSingletonServiceRegistration cssRegistration;
 
     // Blueprint 1
     public DeviceManagerImpl() {
@@ -137,7 +144,9 @@
     public void setMountPointService(MountPointService mountPointService) {
         this.mountPointService = mountPointService;
     }
-
+    public void setClusterSingletonService(ClusterSingletonServiceProvider clusterSingletonService) {
+    	this.clusterSingletonServiceProvider = clusterSingletonService;
+    }
     public void init() {
 
         LOG.info("Session Initiated start {}", APPLICATION_NAME);
@@ -146,11 +155,11 @@
         this.rpcApiService = new DeviceManagerApiServiceImpl(rpcProviderRegistry);
         // Get configuration
         HtDevicemanagerConfiguration config = HtDevicemanagerConfiguration.getConfiguration();
-        this.akkaConfig = null;
         try {
             this.akkaConfig = AkkaConfig.load();
             LOG.debug("akka.conf loaded: " + akkaConfig.toString());
         } catch (Exception e1) {
+            this.akkaConfig = null;
             LOG.warn("problem loading akka.conf: " + e1.getMessage());
         }
         GeoConfig geoConfig = null;
@@ -180,8 +189,7 @@
             LOG.error("Can only run with local database. Stop initialization of devicemanager.");
         } else {
             // init Database Values only if singleNode or clusterMember=1
-            if (akkaConfig == null || akkaConfig.isSingleNode() || akkaConfig != null && akkaConfig.isCluster()
-                    && akkaConfig.getClusterConfig().getRoleMemberIndex() == 1) {
+            if (akkaConfig == null || akkaConfig.isClusterAndFirstNode()) {
                 // Create DB index if not existing and if database is running
                 try {
                     this.configService = new IndexConfigService(htDatabase);
@@ -192,6 +200,7 @@
             }
             // start service for device maintenance service
             this.maintenanceService = new MaintenanceServiceImpl(htDatabase);
+
             // Websockets
             try {
                 this.webSocketService = new WebSocketServiceClientImpl2(rpcProviderRegistry);
@@ -210,14 +219,17 @@
                 LOG.warn("No configuration available. Don't start event manager");
             } else {
                 this.databaseClientEvents = new HtDatabaseEventsService(htDatabase);
+                //Make sure to start for one cluster node only
+                if (akkaConfig == null || akkaConfig.isClusterAndFirstNode() || akkaConfig.isSingleNode()) {
+                 }
 
                 String myDbKeyNameExtended = MYDBKEYNAMEBASE + "-" + dbConfig.getCluster();
 
-
                 this.odlEventListener = new ODLEventListener(myDbKeyNameExtended, webSocketService,
                         databaseClientEvents, dcaeProviderClient, aotsMProvider, maintenanceService);
             }
-
+            this.archiveCleanService = new ArchiveCleanService(config, databaseClientEvents, mwtnService);
+            this.cssRegistration = this.clusterSingletonServiceProvider.registerClusterSingletonService(this.archiveCleanService);
             // PM
             PmConfig configurationPM = config.getPm();
             LOG.info("Performance manager configuration: {}", configurationPM);
@@ -275,7 +287,7 @@
         close(maintenanceService);
         close(rpcApiService);
         close(notificationDelayService);
-
+        close(archiveCleanService);
         LOG.info("DeviceManagerImpl closing done");
     }
 
@@ -300,8 +312,11 @@
 
     /**
      * For each mounted device a mountpoint is created and this listener is called.
+     * Mountpoint was created or existing. Managed device is now fully connected to node/mountpoint.
+     * @param action provide action
+     * @param nNodeId id of the mountpoint
+     * @param nNode mountpoint contents
      */
-    @Override
     public void startListenerOnNodeForConnectedState(Action action, NodeId nNodeId, NetconfNode nNode) {
 
         String mountPointNodeName = nNodeId.getValue();
@@ -384,7 +399,8 @@
         ne.initSynchronizationExtension();
 
         // Setup Service that monitors registration/ deregistration of session
-        odlEventListener.registration(mountPointNodeName);
+        ConnectionStatus csts = nNode.getConnectionStatus();
+        sendCreateOrUpdateNotification(mountPointNodeName, action, csts);
 
         if (aaiProviderClient != null) {
             aaiProviderClient.onDeviceRegistered(mountPointNodeName);
@@ -399,52 +415,121 @@
         LOG.info("Starting Event listener on Netconf device :: Name : {} finished", mountPointNodeName);
     }
 
-    @Override
-    public void enterNonConnectedState(NodeId nNodeId, NetconfNode nNode) {
+    /**
+     * Mountpoint created or existing. Managed device is actually disconnected from node/ mountpoint.
+     * Origin state: Connecting, Connected
+     * Target state: are UnableToConnect or Connecting
+     * @param action create or update
+     * @param nNodeId id of the mountpoint
+     * @param nNode mountpoint contents
+     */
+    public void enterNonConnectedState(Action action, NodeId nNodeId, NetconfNode nNode) {
         String mountPointNodeName = nNodeId.getValue();
-        LOG.info("enter Non ConnectedState for device :: Name : {}", mountPointNodeName);
+        ConnectionStatus csts = nNode.getConnectionStatus();
 
-        ONFCoreNetworkElementRepresentation ne = networkElementRepresentations.remove(mountPointNodeName);
-        if (ne != null) {
-            // Handling transition mountpoint connected -> connecting
-            this.maintenanceService.deleteIfNotRequired(mountPointNodeName);
-            int problems = ne.removeAllCurrentProblemsOfNode();
-            LOG.debug("Removed all {} problems from database at deregistration for {}", problems, mountPointNodeName);
-            if (odlEventListener != null) {
-                odlEventListener.deRegistration(mountPointNodeName);
-            }
-            if (performanceManager != null) {
-                performanceManager.deRegistration(mountPointNodeName);
-            }
-            if (aaiProviderClient != null) {
-                aaiProviderClient.onDeviceUnregistered(mountPointNodeName);
-            }
-        } else {
-            // Handling -> create not connected mountpoint, or change other beside connected.
-            ConnectionStatus csts = nNode.getConnectionStatus();
-            if (csts != null) {
-                odlEventListener.updateRegistration(mountPointNodeName, csts.getClass().getSimpleName(), csts.getName());
-            } else {
-                LOG.info("Unknown connection status");
-            }
-        }
+        sendCreateOrUpdateNotification(mountPointNodeName, action, csts);
+
+        // Handling if mountpoint exist. connected -> connecting/UnableToConnect
+        stopListenerOnNodeForConnectedState(mountPointNodeName);
+
         if (deviceMonitor != null) {
             deviceMonitor.deviceDisconnectIndication(mountPointNodeName);
         }
 
     }
 
-    @Override
+    /**
+     * Mountpoint removed indication.
+     * @param nNodeId id of the mountpoint
+     */
     public void removeMountpointState(NodeId nNodeId) {
         String mountPointNodeName = nNodeId.getValue();
         LOG.info("mountpointNodeRemoved {}", nNodeId.getValue());
+
+        stopListenerOnNodeForConnectedState(mountPointNodeName);
         deviceMonitor.removeMountpointIndication(mountPointNodeName);
+        if (odlEventListener != null) {
+            odlEventListener.deRegistration(mountPointNodeName);
+        }
+    }
+
+    /**
+     * Do all tasks necessary to move from mountpoint state connected -> connecting
+     * @param mountPointNodeName provided
+     * @param ne representing the device connected to mountpoint
+     */
+    private void stopListenerOnNodeForConnectedState( String mountPointNodeName) {
+        ONFCoreNetworkElementRepresentation ne = networkElementRepresentations.remove(mountPointNodeName);
+        if (ne != null) {
+            this.maintenanceService.deleteIfNotRequired(mountPointNodeName);
+            int problems = ne.removeAllCurrentProblemsOfNode();
+            LOG.debug("Removed all {} problems from database at deregistration for {}", problems, mountPointNodeName);
+            if (performanceManager != null) {
+                performanceManager.deRegistration(mountPointNodeName);
+            }
+            if (aaiProviderClient != null) {
+                aaiProviderClient.onDeviceUnregistered(mountPointNodeName);
+            }
+        }
+    }
+
+    private void sendCreateOrUpdateNotification(String mountPointNodeName, Action action, ConnectionStatus csts) {
+        LOG.info("enter Non ConnectedState for device :: Name : {} Action {} ConnectionStatus {}", mountPointNodeName, action, csts);
+        if (action == Action.CREATE) {
+            odlEventListener.registration(mountPointNodeName);
+        } else {
+            odlEventListener.updateRegistration(mountPointNodeName, ConnectionStatus.class.getSimpleName(), csts != null ? csts.getName() : "null");
+        }
+    }
+
+    /**
+     * Handle netconf/mountpoint changes
+     */
+    @Override
+    public void netconfChangeHandler(Action action, @Nullable ConnectionStatus csts, NodeId nodeId, NetconfNode nnode) {
+        switch (action) {
+            case REMOVE:
+                removeMountpointState(nodeId); // Stop Monitor
+                //deviceManagerService.enterNonConnectedState(nodeId, nnode); // Remove Mountpoint handler
+                break;
+
+            case UPDATE:
+            case CREATE:
+                if (csts != null) {
+                    switch (csts) {
+                        case Connected: {
+                            startListenerOnNodeForConnectedState(action, nodeId, nnode);
+                            break;
+                        }
+                        case UnableToConnect:
+                        case Connecting: {
+                            enterNonConnectedState(action, nodeId, nnode);
+                            break;
+                        }
+                    }
+                } else {
+                    LOG.debug("NETCONF Node handled with null status for action", action);
+                }
+                break;
+        }
     }
 
     /*-------------------------------------------------------------------------------------------
      * Functions
      */
 
+    public ArchiveCleanService getArchiveCleanService() {
+        return this.archiveCleanService;
+    }
+
+    public HtDatabaseEventsService getDatabaseClientEvents() {
+        return databaseClientEvents;
+    }
+
+    public IndexMwtnService getMwtnService() {
+        return mwtnService;
+    }
+
     /**
      * Async RPC Interface implementation
      */
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerService.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerService.java
index 13fbc64..ce34401 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerService.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/DeviceManagerService.java
@@ -16,8 +16,9 @@
  * ============LICENSE_END==========================================================================
  ******************************************************************************/
 package org.onap.ccsdk.features.sdnr.wt.devicemanager.impl;
-import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeConnectionStatus.ConnectionStatus;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
 
 public interface DeviceManagerService {
@@ -28,23 +29,11 @@
         UPDATE
     }
     /**
-     * Mountpoint was created or existing. Managed device is now fully connected to node/mountpoint.
-     * @param action provide action
-     * @param nNodeId id of the mountpoint
-     * @param nNode mountpoint contents
+     * MountpointChangeHandler, called to indicate change to DeviceManager
+     * @param action provided
+     * @param csts provided
+     * @param nodeId provided
+     * @param nnode provided
      */
-    void startListenerOnNodeForConnectedState(@Nonnull  Action action, @Nonnull NodeId nNodeId, @Nonnull NetconfNode nNode);
-
-    /**
-     * Mountpoint created or existing. Managed device is actually disconnected from node/ mountpoint.
-     * @param nNodeId id of the mountpoint
-     * @param nNode mountpoint contents
-     */
-    void enterNonConnectedState(@Nonnull NodeId nNodeId, @Nonnull NetconfNode nNode);
-
-    /**
-     * Mountpoint removed indication.
-     * @param nNodeId id of the mountpoint
-     */
-    void removeMountpointState(@Nonnull NodeId nNodeId);
+    void netconfChangeHandler(Action action, @Nullable ConnectionStatus csts, NodeId nodeId, NetconfNode nnode);
 }
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/service/HtDatabaseEventsService.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/service/HtDatabaseEventsService.java
index 90b0799..0a38e0f 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/service/HtDatabaseEventsService.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/service/HtDatabaseEventsService.java
@@ -18,23 +18,24 @@
 package org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.database.service;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import javax.annotation.Nonnull;
+import org.elasticsearch.index.query.QueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.archiveservice.ArchiveCleanProvider;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.HtDataBaseReaderAndWriter;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.HtDatabaseClientAbstract;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.HtDatabaseNode;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.IndexClientBuilder;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.ONFCoreNetworkElement12Equipment;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.util.NetconfTimeStamp;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.database.types.EsEventBase;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.database.types.EsFaultCurrent;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.database.types.EsFaultLog;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.database.types.equipment.EsEquipment;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.database.types.equipment.EsToplevelEquipment;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.database.types.equipment.ExtendedEquipment;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.xml.AttributeValueChangedNotificationXml;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.xml.MwtNotificationBase;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.xml.ObjectCreationNotificationXml;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.xml.ObjectDeletionNotificationXml;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.xml.ProblemNotificationXml;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -44,9 +45,11 @@
  *
  * @author herbert
  */
-public class HtDatabaseEventsService {
+public class HtDatabaseEventsService implements ArchiveCleanProvider {
     private static final Logger LOG = LoggerFactory.getLogger(HtDatabaseEventsService.class);
 
+    private static final NetconfTimeStamp NETCONFTIME_CONVERTER = NetconfTimeStamp.getConverter();
+
     ///** Filename in the resources with maven initialized version information  */
     //private static final String RESOURCENAME = "version.properties"; // could also be a constant
     ///** Index name to be used */
@@ -88,19 +91,7 @@
 
     // --- Function
 
-    public void writeEventLog(ObjectCreationNotificationXml event) {
-        writeEventGeneric(event);
-    }
-
-    public void writeEventLog(ObjectDeletionNotificationXml event) {
-        writeEventGeneric(event);
-    }
-
-    public void writeEventLog(AttributeValueChangedNotificationXml event) {
-        writeEventGeneric(event);
-    }
-
-    private void writeEventGeneric(MwtNotificationBase event) {
+    public void writeEventLog(MwtNotificationBase event) {
         if (client == null) {
             LOG.debug("No DB, can not write: {}",event.toString());
             return;
@@ -224,5 +215,33 @@
         }
     }
 
+    @Override
+    public int doIndexClean(Date olderAreOutdated) {
+
+        String netconfTimeStamp = NETCONFTIME_CONVERTER.getTimeStampAsNetconfString(olderAreOutdated);
+        int removed = 0;
+
+        QueryBuilder queryEventBase = EsEventBase.getQueryForTimeStamp(netconfTimeStamp);
+        removed += eventRWEventLog.doRemoveByQuery(queryEventBase);
+
+        QueryBuilder queryFaultLog = EsFaultLog.getQueryForTimeStamp(netconfTimeStamp);
+        removed += eventRWFaultLog.doRemoveByQuery(queryFaultLog);
+        return removed;
+    }
+
+    @Override
+    public int getNumberOfOldObjects(Date olderAreOutdated) {
+
+        String netconfTimeStamp = NETCONFTIME_CONVERTER.getTimeStampAsNetconfString(olderAreOutdated);
+        int numberOfElements = 0;
+
+        QueryBuilder queryEventBase = EsEventBase.getQueryForTimeStamp(netconfTimeStamp);
+        numberOfElements += eventRWEventLog.doReadAll(queryEventBase).size();
+
+        QueryBuilder queryFaultLog = EsFaultLog.getQueryForTimeStamp(netconfTimeStamp);
+        numberOfElements += eventRWFaultLog.doReadAll(queryFaultLog).size();
+
+        return numberOfElements;
+    }
 
 }
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/types/EsEventBase.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/types/EsEventBase.java
index bcd2849..568e01f 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/types/EsEventBase.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/types/EsEventBase.java
@@ -17,6 +17,8 @@
  ******************************************************************************/
 package org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.database.types;
 
+import org.elasticsearch.index.query.QueryBuilder;
+import org.elasticsearch.index.query.RangeQueryBuilder;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.EsObject;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.xml.MwtNotificationBase;
 
@@ -30,6 +32,9 @@
 
     public static final String ESDATATYPENAME = "eventlog";
 
+    private static final String EVENTLOG_FIELD_TIMESTAMP = "event.timeStamp";
+
+
     private MwtNotificationBase event;
 
     public MwtNotificationBase getProblem() {
@@ -40,4 +45,13 @@
         this.event = event;
     }
 
+    /**
+     * Query to get older Elements
+     * @param netconfTimeStamp to identify older Elements
+     * @return QueryBuilder for older elements related to timestamp
+     */
+    public static QueryBuilder getQueryForTimeStamp(String netconfTimeStamp) {
+      return new RangeQueryBuilder(EVENTLOG_FIELD_TIMESTAMP).lt(netconfTimeStamp);
+    }
+
  }
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/types/EsFaultLog.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/types/EsFaultLog.java
index 06a893a..e15aba5 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/types/EsFaultLog.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/database/types/EsFaultLog.java
@@ -17,6 +17,8 @@
  ******************************************************************************/
 package org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.database.types;
 
+import org.elasticsearch.index.query.QueryBuilder;
+import org.elasticsearch.index.query.RangeQueryBuilder;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.EsObject;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.xml.ProblemNotificationXml;
 
@@ -30,6 +32,8 @@
 
     public static final String ESDATATYPENAME = "faultlog";
 
+    private static final String FAULTLOG_FIELD_TIMESTAMP = "fault.timeStamp";
+
     private ProblemNotificationXml fault;
 
     public ProblemNotificationXml getProblem() {
@@ -40,4 +44,13 @@
         this.fault = fault;
     }
 
+    /**
+     * Get older Elements
+     * @param netconfTimeStamp to identify query elements older than this timestamp.
+     * @return QueryBuilder for related elements
+     */
+    public static QueryBuilder getQueryForTimeStamp(String netconfTimeStamp) {
+        return new RangeQueryBuilder(FAULTLOG_FIELD_TIMESTAMP).lt(netconfTimeStamp);
+    }
+
  }
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/listener/NetconfChangeListener.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/listener/NetconfChangeListener.java
index fc56075..a521bb9 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/listener/NetconfChangeListener.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/listener/NetconfChangeListener.java
@@ -45,6 +45,7 @@
 // 07.09.18 Switched to DataTreeChangeListener from ClusteredDataTreeChangeListener -> DM Service is
 // running at all nodes
 // This is not correct
+@SuppressWarnings("deprecation")
 public class NetconfChangeListener implements ClusteredDataTreeChangeListener<Node>, AutoCloseable {
 
     private static final Logger LOG = LoggerFactory.getLogger(NetconfChangeListener.class);
@@ -156,33 +157,8 @@
                 if (nodeIdString.equals(CONTROLLER)) {
                     LOG.debug("Stop processing for [{}]", nodeIdString);
                 } else {
-                    // Action related to mountpoint status
-                    switch (action) {
-                        case REMOVE:
-                            deviceManagerService.removeMountpointState(nodeId); // Stop Monitor
-                            deviceManagerService.enterNonConnectedState(nodeId, nnode); // Remove Mountpoint handler
-                            break;
-
-                        case UPDATE:
-                        case CREATE:
-                            if (csts != null) {
-                                switch (csts) {
-                                    case Connected: {
-                                        deviceManagerService.startListenerOnNodeForConnectedState(action, nodeId,
-                                                nnode);
-                                        break;
-                                    }
-                                    case UnableToConnect:
-                                    case Connecting: {
-                                        deviceManagerService.enterNonConnectedState(nodeId, nnode);
-                                        break;
-                                    }
-                                }
-                            } else {
-                                LOG.debug("NETCONF Node handled with null status for action", action);
-                            }
-                            break;
-                    }
+                    // Action forwarded to devicehandler
+                    deviceManagerService.netconfChangeHandler(action, csts, nodeId, nnode);
                 }
             }
         } catch (NullPointerException e) {
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/listener/ODLEventListener.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/listener/ODLEventListener.java
index ecaf06b..4b87b58 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/listener/ODLEventListener.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/listener/ODLEventListener.java
@@ -47,17 +47,18 @@
 public class ODLEventListener {
 
     private static final Logger LOG = LoggerFactory.getLogger(ODLEventListener.class);
+
     private static final NetconfTimeStamp NETCONFTIME_CONVERTER = NetconfTimeStamp.getConverter();
 
-
     private final String ownKeyName;
-
     private final WebSocketServiceClient webSocketService;
     private final HtDatabaseEventsService databaseService;
     private final ProviderClient dcaeProvider;
     private final ProviderClient aotsMProvider;
-    private int eventNumber;
     private final MaintenanceService maintenanceService;
+
+    private int eventNumber;
+
     /*---------------------------------------------------------------
      * Construct
      */
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/xml/WebSocketServiceClientImpl2.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/xml/WebSocketServiceClientImpl2.java
index 6ca7a5c..c8f7696 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/xml/WebSocketServiceClientImpl2.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/impl/xml/WebSocketServiceClientImpl2.java
@@ -31,6 +31,7 @@
  * Wrapper for forwarding web-socket notifications to the web-socket service, that is running as
  * bundle.
  */
+@SuppressWarnings("deprecation")
 public class WebSocketServiceClientImpl2 implements WebSocketServiceClient {
 
     private static final Logger LOG = LoggerFactory.getLogger(ODLEventListener.class);
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/index/database/types/EsEventOdluxLog.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/index/database/types/EsEventOdluxLog.java
new file mode 100644
index 0000000..14f7d24
--- /dev/null
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/index/database/types/EsEventOdluxLog.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.index.database.types;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.elasticsearch.index.query.QueryBuilder;
+import org.elasticsearch.index.query.RangeQueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.EsObject;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.internalTypes.InternalDateAndTime;
+
+/**
+ * Event log, used by Odlux client.
+ * Not used for writing any data by devicemanager.
+ * Type introduced to implement IndexCleanService
+ */
+
+public class EsEventOdluxLog extends EsObject {
+
+    public static final String ESDATATYPENAME = "log";
+
+    private static final String LOG_FIELD_TIMESTAMP = "timestamp";
+
+    private String type;
+    private String component;
+    private String message;
+    private String timestamp;
+
+    /**
+     * For jackson
+     */
+    protected EsEventOdluxLog() {
+    }
+    /**
+     * Constructor
+     * @param type string
+     * @param component string
+     * @param message string
+     * @param timestamp string with netconf format string
+     */
+    public EsEventOdluxLog(String type, String component, String message, InternalDateAndTime timestamp) {
+        super();
+        this.type = type;
+        this.component = component;
+        this.message = message;
+        this.timestamp = timestamp.getValue();
+    }
+
+    @JsonProperty("type")
+    public String getType() {
+        return type;
+    }
+
+    @JsonProperty("component")
+    public String getComponent() {
+        return component;
+    }
+
+    @JsonProperty("message")
+    public String getMessage() {
+        return message;
+    }
+
+    @JsonProperty(LOG_FIELD_TIMESTAMP)
+    public String getTimestamp() {
+        return timestamp;
+    }
+
+    /**
+     * Query to get older Elements
+     * @param netconfTimeStamp to identify older Elements
+     * @return QueryBuilder for older elements related to timestamp
+     */
+    public static QueryBuilder getQueryForTimeStamp(String netconfTimeStamp) {
+      return new RangeQueryBuilder(LOG_FIELD_TIMESTAMP).lt(netconfTimeStamp);
+    }
+
+ }
diff --git a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/index/impl/IndexMwtnService.java b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/index/impl/IndexMwtnService.java
index e175515..0e6b032 100644
--- a/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/index/impl/IndexMwtnService.java
+++ b/sdnr/wt/devicemanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/index/impl/IndexMwtnService.java
@@ -17,9 +17,15 @@
  ******************************************************************************/
 package org.onap.ccsdk.features.sdnr.wt.devicemanager.index.impl;
 
+import java.util.Date;
+import org.elasticsearch.index.query.QueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.archiveservice.ArchiveCleanProvider;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.HtDataBaseReaderAndWriter;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.HtDatabaseClientAbstract;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.HtDatabaseNode;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.IndexClientBuilder;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.util.NetconfTimeStamp;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.index.database.types.EsEventOdluxLog;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -28,9 +34,10 @@
  * @author herbert
  *
  */
-public class IndexMwtnService implements AutoCloseable {
+public class IndexMwtnService implements AutoCloseable, ArchiveCleanProvider {
 
     private static final Logger LOG = LoggerFactory.getLogger(IndexMwtnService.class);
+    private static final NetconfTimeStamp NETCONFTIME_CONVERTER = NetconfTimeStamp.getConverter();
 
     /** Index name to be used */
     public static final String INDEX = "mwtn";
@@ -39,6 +46,9 @@
     /** Location of configuration data **/
     private static final String MODELDATA = "elasticsearch/index/mwtn/modelDescription";
 
+    private final HtDataBaseReaderAndWriter<EsEventOdluxLog> eventRWOdluxLog;
+
+
     private final HtDatabaseClientAbstract client;
 
     // --- Construct and initialize
@@ -46,11 +56,15 @@
     public IndexMwtnService(HtDatabaseNode database) throws Exception {
         LOG.info("Create {} start", this.getClass().getSimpleName());
 
+
         IndexClientBuilder clientBuilder = IndexClientBuilder.getBuilder(INDEX)
                 .setMappingSettingJsonFileName(MAPPING)
                 .setModelDataDirectory(MODELDATA);
         client = clientBuilder.create(database);
         clientBuilder.close();
+
+        eventRWOdluxLog = new HtDataBaseReaderAndWriter<>(client, EsEventOdluxLog.ESDATATYPENAME, EsEventOdluxLog.class);
+
         LOG.info("Create {} finished. DB Service sucessfully started.", this.getClass().getSimpleName());
     }
 
@@ -62,10 +76,42 @@
         return client;
     }
 
+    /**
+     * Write into Odlux log, used by client
+     * @param logEntry as test data
+     */
+    public void writeOdluxEventForTestpurpose(EsEventOdluxLog logEntry) {
+        eventRWOdluxLog.doWrite(logEntry);
+    }
 
 
     @Override
     public void close() throws Exception {
-        client.close();
+        if (client != null) {
+            client.close();
+        }
+    }
+
+    @Override
+    public int doIndexClean(Date olderAreOutdated) {
+
+        String netconfTimeStamp = NETCONFTIME_CONVERTER.getTimeStampAsNetconfString(olderAreOutdated);
+
+        QueryBuilder queryOdluxLog = EsEventOdluxLog.getQueryForTimeStamp(netconfTimeStamp);
+        int removed = eventRWOdluxLog.doRemoveByQuery(queryOdluxLog);
+        return removed;
+
+    }
+
+    @Override
+    public int getNumberOfOldObjects(Date olderAreOutdated) {
+
+        String netconfTimeStamp = NETCONFTIME_CONVERTER.getTimeStampAsNetconfString(olderAreOutdated);
+        int numberOfElements = 0;
+
+        QueryBuilder queryOdluxLog = EsEventOdluxLog.getQueryForTimeStamp(netconfTimeStamp);
+        numberOfElements += eventRWOdluxLog.doReadAll(queryOdluxLog).size();
+
+        return numberOfElements;
     }
 }
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/index/mwtn/modelDescription/maintenancemode.json b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/index/mwtn/modelDescription/maintenancemode.json
index 3d0a414..9e26dfe 100644
--- a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/index/mwtn/modelDescription/maintenancemode.json
+++ b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/index/mwtn/modelDescription/maintenancemode.json
@@ -1,22 +1 @@
-{
-    "maintenancemode": {
-        "DragonWave-Z3":{
-            "node":"DragonWave-Z3",
-            "filter": [{
-                "definition":{},
-                "description":"",
-                "start":"2018-01-01T10:00+00:00",
-                "end":"2018-10-10T10:00+00:00"
-            }]
-        },
-        "MaintenanceMode":{
-            "node":"MaintenanceMode",
-            "filter": [{
-                "definition":{},
-                "description":"",
-                "start":"2018-01-01T10:00+00:00",
-                "end":"2018-10-10T10:00+00:00"
-            }]
-        }
-    }
-}
\ No newline at end of file
+{}
\ No newline at end of file
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml b/sdnr/wt/devicemanager/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
index a9a4e18..b946e10 100644
--- a/sdnr/wt/devicemanager/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
+++ b/sdnr/wt/devicemanager/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
@@ -36,13 +36,16 @@
 
   <reference id="rpcProviderRegistry" interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"
     odl:type="default" />
-
+    
+  <reference id="clusterSingletonService"
+    interface="org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider"/>
 
  <bean id="provider" class="org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.DeviceManagerImpl" init-method="init" destroy-method="close">
     <property name="dataBroker" ref="dataBroker"/>
     <property name="rpcProviderRegistry" ref="rpcProviderRegistry" />
     <property name="notificationPublishService" ref="notificationPublishService" />
     <property name="mountPointService" ref="mountPointService" />
+    <property name="clusterSingletonService" ref="clusterSingletonService" />
   </bean>
 
 
diff --git a/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestDevMgrPropertiesFile.java b/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestDevMgrPropertiesFile.java
index 74d2d22..1f488b2 100644
--- a/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestDevMgrPropertiesFile.java
+++ b/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestDevMgrPropertiesFile.java
@@ -163,14 +163,14 @@
     }
 
 
-    private void sleep(int milliseconds) {
+    private static void sleep(int milliseconds) {
         try {
             Thread.sleep(milliseconds);
         } catch (InterruptedException e) {
         }
     }
 
-    private void writeFile(File f, String content) {
+    public static void writeFile(File f, String content) {
          try {
             Files.asCharSink(f, StandardCharsets.UTF_8).write(content);
         } catch (IOException e) {
diff --git a/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestDeviceManagerWithDatabase.java b/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestDeviceManagerWithDatabase.java
index 661194c..435e8e1 100644
--- a/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestDeviceManagerWithDatabase.java
+++ b/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestDeviceManagerWithDatabase.java
@@ -1,22 +1,17 @@
 /*******************************************************************************
- * ============LICENSE_START=======================================================
- * ONAP : ccsdk feature sdnr wt
- *  ================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
- * All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * ============LICENSE_START======================================================= ONAP : ccsdk
+ * feature sdnr wt ================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * ================================================================================ Licensed under
+ * the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License. ============LICENSE_END=========================================================
  ******************************************************************************/
 package org.onap.ccsdk.features.sdnr.wt.devicemanager.test;
 
@@ -30,27 +25,35 @@
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.Scanner;
+import java.util.concurrent.TimeUnit;
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.archiveservice.ArchiveCleanService;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.database.HtDatabaseWebAPIClient;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.internalTypes.Resources;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.container.Capabilities;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.DeviceManagerImpl;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.DeviceManagerService.Action;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.test.mock.ClusterSingletonServiceProviderMock;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.test.mock.DataBrokerNetconfMock;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.test.mock.MountPointMock;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.test.mock.MountPointServiceMock;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.test.mock.NotificationPublishServiceMock;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.test.mock.RpcProviderRegistryMock;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.test.util.DBCleanServiceHelper;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.test.util.ReadOnlyTransactionMountpoint1211Mock;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.test.util.ReadOnlyTransactionMountpoint1211pMock;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.test.util.ReadOnlyTransactionMountpoint12Mock;
 import org.opendaylight.controller.md.sal.binding.api.MountPointService;
 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService;
+import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
+import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
 import org.slf4j.Logger;
@@ -63,7 +66,7 @@
 
     private static Path KARAF_ETC = Paths.get("etc");
     private static DeviceManagerImpl deviceManager;
-    private static MountPointMock  mountPoint;
+    private static MountPointMock mountPoint;
     private static DataBrokerNetconfMock dataBrokerNetconf;
 
     private static final Logger LOG = LoggerFactory.getLogger(TestDeviceManagerWithDatabase.class);
@@ -73,25 +76,26 @@
     @BeforeClass
     public static void before() throws InterruptedException, IOException {
 
-         System.out.println("Logger: "+LOG.getClass().getName() + " " + LOG.getName());
+        System.out.println("Logger: " + LOG.getClass().getName() + " " + LOG.getName());
         // Call System property to get the classpath value
         Path etc = KARAF_ETC;
         delete(etc);
 
-        System.out.println("Create empty:"+etc.toString());
+        System.out.println("Create empty:" + etc.toString());
         Files.createDirectories(etc);
 
-        //Create mocks
+        // Create mocks
         ReadOnlyTransactionMountpoint12Mock readOnlyTransaction = new ReadOnlyTransactionMountpoint12Mock();
         dataBrokerNetconf = new DataBrokerNetconfMock();
         dataBrokerNetconf.setReadOnlyTransaction(readOnlyTransaction);
         mountPoint = new MountPointMock();
         mountPoint.setReadOnlyTransaction(readOnlyTransaction);
-        MountPointService mountPointService = new MountPointServiceMock(mountPoint);
+        ClusterSingletonServiceProvider clusterSingletonService = new ClusterSingletonServiceProviderMock();
+		MountPointService mountPointService = new MountPointServiceMock(mountPoint);
         NotificationPublishService notificationPublishService = new NotificationPublishServiceMock();
         RpcProviderRegistry rpcProviderRegistry = new RpcProviderRegistryMock();
 
-        //start using blueprint interface
+        // start using blueprint interface
         String msg = "";
         try {
             deviceManager = new DeviceManagerImpl();
@@ -100,7 +104,7 @@
             deviceManager.setMountPointService(mountPointService);
             deviceManager.setNotificationPublishService(notificationPublishService);
             deviceManager.setRpcProviderRegistry(rpcProviderRegistry);
-
+            deviceManager.setClusterSingletonService(clusterSingletonService);
             deviceManager.init();
         } catch (Exception e) {
             StringWriter sw = new StringWriter();
@@ -110,17 +114,17 @@
             e.printStackTrace();
         }
         readOnlyTransaction.close();
-        System.out.println("Initialization status: "+deviceManager.isDevicemanagerInitializationOk());
-        assertTrue("Devicemanager not initialized: "+msg, deviceManager.isDevicemanagerInitializationOk());
+        System.out.println("Initialization status: " + deviceManager.isDevicemanagerInitializationOk());
+        assertTrue("Devicemanager not initialized: " + msg, deviceManager.isDevicemanagerInitializationOk());
         System.out.println("Initialization done");
-
+        waitfordatabase();
     }
 
     @AfterClass
     public static void after() throws InterruptedException, IOException {
 
         System.out.println("Start shutdown");
-        //close using blueprint interface
+        // close using blueprint interface
         try {
             deviceManager.close();
         } catch (Exception e) {
@@ -143,18 +147,6 @@
     }
 
     @Test
-    public void test1() throws InterruptedException  {
-
-        System.out.println("Test1: Wait for database");
-        int timeout = DATABASETIMEOUTSECONDS;
-        while ( !deviceManager.isDatabaseInitializationFinished() && timeout-- > 0) {
-            System.out.println("Test1: "+timeout);
-            Thread.sleep(1000); //On second
-        }
-        System.out.println("Test1: database initialized");
-    }
-
-    @Test
     public void test2() {
         System.out.println("Test2: slave mountpoint");
 
@@ -190,7 +182,7 @@
         NodeId nodeId = new NodeId("mountpointTest3");
 
         Capabilities capabilities = Capabilities.getAvailableCapabilities(nNode);
-        System.out.println("Node capabilites: "+capabilities);
+        System.out.println("Node capabilites: " + capabilities);
 
         try {
             deviceManager.startListenerOnNodeForConnectedState(Action.CREATE, nodeId, nNode);
@@ -223,7 +215,7 @@
         NodeId nodeId = new NodeId("mountpointTest4");
 
         Capabilities capabilities = Capabilities.getAvailableCapabilities(nNode);
-        System.out.println("Node capabilites: "+capabilities);
+        System.out.println("Node capabilites: " + capabilities);
 
         try {
             deviceManager.startListenerOnNodeForConnectedState(Action.CREATE, nodeId, nNode);
@@ -257,7 +249,7 @@
         NodeId nodeId = new NodeId("mountpointTest5");
 
         Capabilities capabilities = Capabilities.getAvailableCapabilities(nNode);
-        System.out.println("Node capabilites: "+capabilities);
+        System.out.println("Node capabilites: " + capabilities);
 
         try {
             deviceManager.startListenerOnNodeForConnectedState(Action.CREATE, nodeId, nNode);
@@ -283,9 +275,9 @@
         System.out.println("Test6: Write zip data file file");
         File testFile = new File("etc/elasticsearch_update.zip");
         Resources.extractFileTo("elasticsearch_update.zip", testFile);
-        int wait=130;
-        while ( testFile.exists() && wait-- > 0) {
-            System.out.println("Waiting "+wait);
+        int wait = 130;
+        while (testFile.exists() && wait-- > 0) {
+            System.out.println("Waiting " + wait);
             try {
                 Thread.sleep(1000);
             } catch (InterruptedException e) {
@@ -298,11 +290,92 @@
 
     }
 
-    //********************* Private
+    @Test
+    public void test7() throws Exception {
+        final int NUM = 5;
+        final int ARCHIVE_DAYS = 30;
+        final long ARCHIVE_LIMIT_SEC = TimeUnit.SECONDS.convert(ARCHIVE_DAYS, TimeUnit.DAYS);
+        final long ARCHIVE_INTERVAL_SEC = 10;
+        File propFile = KARAF_ETC.resolve("devicemanager.properties").toFile();
+
+        ArchiveCleanService service = deviceManager.getArchiveCleanService();
+        DBCleanServiceHelper helper = new DBCleanServiceHelper(deviceManager);
+
+        // setEsConfg
+        TestDevMgrPropertiesFile.writeFile(propFile, getContent(ARCHIVE_LIMIT_SEC, ARCHIVE_INTERVAL_SEC));
+        //give time to read file
+        sleep(5);
+        System.out.println("Archive clean service configuration "+service);
+        System.out.println("To delete elements older: "+service.getDateForOldElements());
+        System.out.println("Status of elements is: "+service.countOldEntries());
+
+        // create old data and check if the will be cleaned completely
+        int elements = helper.writeDataToLogs(NUM, ARCHIVE_DAYS+5, 0 /*Hours*/);
+        System.out.println("Written elements are: "+elements);
+
+        waitForDeletion(service, 2 * ARCHIVE_INTERVAL_SEC, elements, "Entries are not cleared completely as expected");
+
+        // create partial old and newer data and check that only half of all data are cleaned
+        // New data are not counted as "old" ..
+        int elementsToRemove = elements = helper.writeDataToLogs(NUM, ARCHIVE_DAYS+5, 0);
+        elements += helper.writeDataToLogs(NUM, ARCHIVE_DAYS-5, 0);
+        waitForDeletion(service, 2 * ARCHIVE_INTERVAL_SEC, elementsToRemove, "Entries are not cleared exactly half as expected");
+
+        // create only newer data and check that nothing is cleaned
+        elements = helper.writeDataToLogs(NUM, ARCHIVE_DAYS+2, 0);
+        waitForDeletion(service, 2 * ARCHIVE_INTERVAL_SEC, elements, "Some entries were removed, but shouldn't.");
+
+        service.close();
+    }
+
+    // ********************* Private
+
+    private void waitForDeletion(ArchiveCleanService service, long timeout, long numberAtBeginning, String faultMessage) {
+        int numberEntries = 0;
+        while (timeout-- > 0) {
+            sleep(1000);
+            numberEntries = service.countOldEntries();
+            if (numberEntries <= 0) {
+                break;
+            }
+        }
+        if (timeout == 0) {
+            fail(faultMessage + " Timeout at:" + timeout + " Entries at beginning " + numberAtBeginning
+                    + " remaining" + numberEntries);
+        }
+    }
+
+
+    private static void waitfordatabase() throws InterruptedException {
+
+        System.out.println("Test1: Wait for database");
+        int timeout = DATABASETIMEOUTSECONDS;
+        while (!deviceManager.isDatabaseInitializationFinished() && timeout-- > 0) {
+            System.out.println("Test1: " + timeout);
+            Thread.sleep(1000); // On second
+        }
+        System.out.println("Ddatabase initialized");
+    }
+
+    private static void sleep(int millis) {
+        try {
+            Thread.sleep(millis);
+        } catch (InterruptedException e) {
+            LOG.warn(e.getMessage());
+            Thread.interrupted();
+        }
+    }
+
+    private static void waitEnter() {
+        Scanner sc = new Scanner(System.in);
+        System.out.println("Enter");
+        sc.next();
+        sc.close();
+    }
 
     private static void delete(Path etc) throws IOException {
         if (Files.exists(etc)) {
-            System.out.println("Found and remove:"+etc.toString());
+            System.out.println("Found and remove:" + etc.toString());
             delete(etc.toFile());
         }
     }
@@ -318,5 +391,21 @@
         }
     }
 
+    private String getContent(long archiveLimitSeconds, long esArchiveCheckIntervalSeconds) {
+        return "[dcae]\n" + "dcaeUserCredentials=admin:admin\n" + "dcaeUrl=http://localhost:45/abc\n"
+                + "dcaeHeartbeatPeriodSeconds=120\n" + "dcaeTestCollector=no\n" + "\n" + "[aots]\n"
+                + "userPassword=passwd\n" + "soapurladd=off\n" + "soapaddtimeout=10\n" + "soapinqtimeout=20\n"
+                + "userName=user\n" + "inqtemplate=inqreq.tmpl.xml\n" + "assignedto=userid\n"
+                + "addtemplate=addreq.tmpl.xml\n" + "severitypassthrough=critical,major,minor,warning\n"
+                + "systemuser=user\n" + "prt-offset=1200\n" + "soapurlinq=off\n" + "#smtpHost=\n" + "#smtpPort=\n"
+                + "#smtpUsername=\n" + "#smtpPassword=\n" + "#smtpSender=\n" + "#smtpReceivers=\n" + "\n" + "[es]\n"
+                + "esCluster=sendateodl5\n" + "esArchiveLifetimeSeconds=" + archiveLimitSeconds + "\n" + "esArchiveCheckIntervalSeconds="
+                + esArchiveCheckIntervalSeconds + "\n" + "\n" + "[aai]\n" + "#keep comment\n"
+                + "aaiHeaders=[\"X-TransactionId: 9999\"]\n" + "aaiUrl=off\n" + "aaiUserCredentials=AAI:AAI\n"
+                + "aaiDeleteOnMountpointRemove=true\n" + "aaiTrustAllCerts=false\n" + "aaiApiVersion=aai/v13\n"
+                + "aaiPropertiesFile=aaiclient.properties\n" + "\n" + "[pm]\n" + "pmCluster=sendateodl5\n"
+                + "pmEnabled=true\n" + "[toggleAlarmFilter]\n" + "taEnabled=false\n" + "taDelay=5555\n" + "";
+    }
+
 
 }
diff --git a/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/mock/ClusterSingletonServiceProviderMock.java b/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/mock/ClusterSingletonServiceProviderMock.java
new file mode 100644
index 0000000..30b6481
--- /dev/null
+++ b/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/mock/ClusterSingletonServiceProviderMock.java
@@ -0,0 +1,19 @@
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.test.mock;
+
+import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService;
+import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
+import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration;
+
+public class ClusterSingletonServiceProviderMock implements ClusterSingletonServiceProvider {
+
+	@Override
+	public void close() throws Exception {
+	
+	}
+
+	@Override
+	public ClusterSingletonServiceRegistration registerClusterSingletonService(ClusterSingletonService service) {
+		return null;
+	}
+
+}
diff --git a/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/util/DBCleanServiceHelper.java b/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/util/DBCleanServiceHelper.java
new file mode 100644
index 0000000..4e46e18
--- /dev/null
+++ b/sdnr/wt/devicemanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/util/DBCleanServiceHelper.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.test.util;
+
+import java.util.Date;
+import java.util.concurrent.TimeUnit;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.internalTypes.InternalDateAndTime;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.internalTypes.InternalSeverity;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.util.NetconfTimeStamp;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.DeviceManagerImpl;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.database.service.HtDatabaseEventsService;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.xml.ObjectCreationNotificationXml;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.impl.xml.ProblemNotificationXml;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.index.database.types.EsEventOdluxLog;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.index.impl.IndexMwtnService;
+
+public class DBCleanServiceHelper {
+
+    private static final NetconfTimeStamp NETCONFTIME_CONVERTER = NetconfTimeStamp.getConverter();
+
+    private final HtDatabaseEventsService databaseEventService;
+    private final IndexMwtnService mwtnService;
+
+    /**
+     * Helper to fill data into the database
+     * @param deviceManager devicemanger to get services
+     */
+    public DBCleanServiceHelper(DeviceManagerImpl deviceManager) {
+        this.databaseEventService = deviceManager.getDatabaseClientEvents();
+        this.mwtnService = deviceManager.getMwtnService();
+    }
+
+    /**
+     * Write data into database with specific date and content profile.
+     * @param number of data to be written for each log
+     * @param days starting day, relative to actual date
+     * @param hours starting hour ... increased by one hour for each write
+     * @return integer with the amount of written data
+     */
+    public int writeDataToLogs(int number, int days, int hours) {
+        int res = 0;
+        for (Integer t=0; t < number; t++) { //Test "sdnevents", "eventlog"
+            ObjectCreationNotificationXml notificationXml = new ObjectCreationNotificationXml(
+                    "Testpoint"+t, t.toString(), getInternalDateAndTime(days, hours+t), "ObjectId"+t);
+            databaseEventService.writeEventLog(notificationXml);
+            res++;
+        }
+
+        for (Integer t=0; t < number; t++) { //Test "sdnevents", "faultlog"
+            ProblemNotificationXml fault = new ProblemNotificationXml(
+                    "ProblemNode"+t, "Problemuuid", "Problemname", InternalSeverity.Major, t.toString(), getInternalDateAndTime(days, hours+t));
+            databaseEventService.writeFaultLog(fault);
+            res++;
+        }
+
+        for (Integer t=0; t < number; t++) { //Test "mwtn", "log"
+            EsEventOdluxLog odluxEvent = new EsEventOdluxLog("Odluxevent"+t, "Problemuuid", "Message", getInternalDateAndTime(days, hours+t));
+            mwtnService.writeOdluxEventForTestpurpose(odluxEvent);
+            res++;
+        }
+
+        return res;
+    }
+
+    /**************************************************************
+     * Private section
+     */
+
+    private InternalDateAndTime getInternalDateAndTime(int days, int hours) {
+        Date actual = new Date(new Date().getTime() - TimeUnit.MILLISECONDS.convert(days, TimeUnit.DAYS) - TimeUnit.MILLISECONDS.convert(hours, TimeUnit.HOURS));
+        InternalDateAndTime timeStamp = InternalDateAndTime.valueOf(NETCONFTIME_CONVERTER.getTimeStamp(actual));
+        return timeStamp;
+    }
+
+
+}
diff --git a/sdnr/wt/devicemanager/provider/src/test/resources/simplelogger.properties b/sdnr/wt/devicemanager/provider/src/test/resources/simplelogger.properties
index 5a8d431..eec5d3a 100644
--- a/sdnr/wt/devicemanager/provider/src/test/resources/simplelogger.properties
+++ b/sdnr/wt/devicemanager/provider/src/test/resources/simplelogger.properties
@@ -10,9 +10,10 @@
 # Must be one of ("trace", "debug", "info", "warn", or "error").
 # If not specified, the default logging detail level is used.
 # org.slf4j.simpleLogger.log.xxx.yyy=debug
-org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager=debug
+org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager=info
+org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager.archiveservice=debug
 org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager.base.internalTypes.Resources=info
-org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.container=trace
+org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.container=info
 
 # Set to true if you want the current date and time to be included in output messages.
 # Default is false, and will output the number of milliseconds elapsed since startup.
diff --git a/sdnr/wt/devicemanager/provider/src/test/resources/test.properties b/sdnr/wt/devicemanager/provider/src/test/resources/test.properties
index 943c25b..de49c58 100644
--- a/sdnr/wt/devicemanager/provider/src/test/resources/test.properties
+++ b/sdnr/wt/devicemanager/provider/src/test/resources/test.properties
@@ -26,6 +26,14 @@
 
 [es]
 esCluster=sendateodl5
+#time limit to keep increasing data in database [in seconds] 
+#60*60*24*30 (30days)
+esArchiveLimit=2592000
+#folder where removed data will be stored
+esArchiveFolder=./backup
+#interval to archive database [in seconds]
+#60*60*24 (1day)
+esArchiveInterval=86400
 
 [aai]
 #keep comment
