Heartbeat Microservice User Documentation 02/76102/1
authorPrakashH <pbhandar@techmahindra.com>
Tue, 22 Jan 2019 08:19:43 +0000 (08:19 +0000)
committerPrakashH <pbhandar@techmahindra.com>
Tue, 22 Jan 2019 08:19:43 +0000 (08:19 +0000)
User Documentation for heartbeat Microservice
Issue-ID: DCAEGEN2-280

Change-Id: I158680b11b5d5de4a0d58f4d2f03816e2b1941fc
Signed-off-by: PrakashH <pbhandar@techmahindra.com>
docs/sections/services/heartbeat-ms/architecture.rst [new file with mode: 0644]
docs/sections/services/heartbeat-ms/build_setup.rst [new file with mode: 0644]
docs/sections/services/heartbeat-ms/design.rst [new file with mode: 0644]
docs/sections/services/heartbeat-ms/index.rst [new file with mode: 0644]
docs/sections/services/heartbeat-ms/testprocedure.rst [new file with mode: 0644]
docs/sections/services/serviceindex.rst

diff --git a/docs/sections/services/heartbeat-ms/architecture.rst b/docs/sections/services/heartbeat-ms/architecture.rst
new file mode 100644 (file)
index 0000000..f97fa24
--- /dev/null
@@ -0,0 +1,47 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+\r
+.. _architecture:\r
+\r
+High-level architecture of Heartbeat Microservice\r
+=================================================\r
+\r
+**Heartbeat Microservice**’s startup script (misshtbtd.py) gets the\r
+configuration from CBS and parses these entries and saves them in the\r
+postgres database having table name **vnf_table_1**. Each entry in the\r
+configuration is for a particular eventName. Each entry has missed\r
+heartbeat count, heartbeat interval, Control loop name etc. along with\r
+many other parameters. \r
+\r
+Whenever a heartbeat event is received, the sourceName, lastEpochTime\r
+and other information is stored in another postgres database having\r
+table name **vnf_table_2**. It is designed to process the heartbeat event\r
+having different sourceNames having same eventName. In such case,\r
+sourceName count is maintained in vnf_table_1 which would give number of\r
+SouceNames that have same eventName. As and when new sourceName is\r
+received, sourceName count is incremented in vnf_table_1\r
+\r
+The heartbeat Microservice is designed to support multiple instances of\r
+HB Microservice to run simultaneously. The first instance of the HB\r
+Microservice would assume the role of active instance, and instances\r
+that started running later would become inactive instances. If the\r
+active HB microservice is not responding or killed, the inactive HB\r
+instance would take over the active role. To achieve this functionality,\r
+one more postgres table **hb_common** is introduced which has parameters\r
+specific to active instances such as process id/hostname of the active\r
+instance, last accessed time updated by active instance.\r
+\r
+Heartbeat Microservice supports the periodic download of CBS\r
+configuration. The periodicity of download can be configured.\r
+\r
+Heartbeat Microservice also supports the download of CBS configuration\r
+whenever configuration changes. Here Docker container would call the\r
+function/method to download the CBS configuration.\r
+\r
+The heartbeat microservice has 2 states\r
+\r
+**Reconfiguration state**– Download configuration from CBS and update\r
+the vnf_table_1 is in progress.\r
+\r
+**Running state** – Normal working that comprises of receiving of HB\r
+events and sending of control loop event if required conditions are met.\r
diff --git a/docs/sections/services/heartbeat-ms/build_setup.rst b/docs/sections/services/heartbeat-ms/build_setup.rst
new file mode 100644 (file)
index 0000000..f2943cc
--- /dev/null
@@ -0,0 +1,210 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+\r
+.. _build_setup:\r
+\r
+\r
+Build and Setup procedure\r
+=========================\r
+\r
+ONAP Repository\r
+---------------\r
+\r
+Use the below repository for Heartbeat Microservice.\r
+\r
+   https://gerrit.onap.org/r/#/admin/projects/dcaegen2/services/heartbeat\r
+\r
+POD 25 access\r
+-------------\r
+\r
+To run heartbeat Micro Service in development environment, POD25\r
+access is required. Please get the access and install Openvpn.\r
+\r
+Connect to POD25 setup using Openvpn and the credentials obtained.\r
+\r
+Docker build procedure\r
+----------------------\r
+\r
+Clone the code using below command\r
+   .. code-block:: bash\r
+      git clone https://gerrit.onap.org/r/dcaegen2/services/heartbeat \r
+\r
+give executable permission to mvn-phase-script.sh if not there\r
+already\r
+   .. code-block:: bash\r
+\r
+      chmod +x mvn-phase-script.sh\r
+\r
+**Setting up the postgres DB, group/consumer IDs, CBS download and\r
+CBS polling. The following environment variables are to be set.**\r
+\r
+   For postgres and CBS download, the environment setting file to be\r
+   passed while running the Docker. The file would contain following\r
+   parameters. The sample values are shown for reference.\r
+\r
+    ::\r
+          pg_ipAddress=10.0.4.1\r
+          pg_portNum=5432\r
+          pg_userName=postgres\r
+          pg_passwd=abc\r
+          #Below parameters for CBS download\r
+          SERVICE_NAME=mvp-dcaegen2-heartbeat-static\r
+          CONSUL_HOST=10.12.6.50\r
+          HOSTNAME=mvp-dcaegen2-heartbeat-static\r
+          #Below parameter for heartbeat worker process to receive message\r
+          groupID=group1\r
+          consumerID=1\r
+\r
+   If the postgres parameters are not there in environment setting file,\r
+   then it takes the values from    miss_htbt_service/config/hbproperties.yaml \r
+   file. Make sure that postgres running in the machine where pg_ipAddress \r
+   parameter is mentioned. \r
+   \r
+   Run below netstat command to check postgres port number and IP address are fine.\r
+\r
+   .. code-block:: bash\r
+      netstat -ant\r
+\r
+   If CBS parameters are not there in the environment setting file, then\r
+   local config file (etc/config.json) is considered as a default\r
+   configuration file.\r
+\r
+   For CBS polling CBS_polling_allowed & CBS_polling_interval to be set\r
+   appropriately in miss_htbt_service/config/hbproperties.yaml file\r
+\r
+   The sample values in miss_htbt_service/config/hbproperties.yaml file\r
+   are as follows\r
+    .. code-block:: YAML\r
+       \r
+          pg_ipAddress: 10.0.4.1\r
+          pg_portNum: 5432\r
+          pg_userName: postgres\r
+          pg_passwd: postgres\r
+          pg_dbName: hb_vnf\r
+          CBS_polling_allowed: True\r
+          CBS_polling_interval: 300\r
+\r
+   PS: Change the groupID and consumerID in the environment accordingly\r
+   for each HB instance so that HB worker process receive the HB event\r
+   correctly. Usually groupID remains the same for all instance of HB\r
+   where as consumerID would be changed for each instance of HB Micro\r
+   service. If groupID and consumerID is not provided, then it takes\r
+   “DefaultGroup” and “1” respectively.\r
+\r
+**Setting CBS configuration parameters using the consule KV URL.**\r
+\r
+   The sample consul KV is as below.\r
+   ::\r
+      http://10.12.6.50:8500/ui/#/dc1/kv/mvp-dcaegen2-heartbeat-static\r
+\r
+   Go to the above link and click on KEY/VALUE tab\r
+\r
+   Click on mvp-dcaegen2-heartbeat-static\r
+\r
+   Copy the configuration in the box provided and click on update. \r
+   \r
+   The sample configuration is as below\r
+   \r
+   .. code-block:: json\r
+   \r
+               {\r
+                       "heartbeat_config": {\r
+                               "vnfs": [{\r
+                                               "eventName": "Heartbeat_S",\r
+                                               "heartbeatcountmissed": 3,\r
+                                               "heartbeatinterval": 60,\r
+                                               "closedLoopControlName": "ControlLoopEvent1",\r
+                                               "policyVersion": "1.0.0.5",\r
+                                               "policyName": "vFireWall",\r
+                                               "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName",\r
+                                               "target_type": "VM",\r
+                                               "target": "genVnfName",\r
+                                               "version": "2.0"\r
+                                       },\r
+                                       {\r
+                                               "eventName": "Heartbeat_vFW",\r
+                                               "heartbeatcountmissed": 3,\r
+                                               "heartbeatinterval": 60,\r
+                                               "closedLoopControlName": "ControlLoopEvent1",\r
+                                               "policyVersion": "1.0.0.5",\r
+                                               "policyName": "vFireWall",\r
+                                               "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName",\r
+                                               "target_type": "VNF",\r
+                                               "target": "genVnfName",\r
+                                               "version": "2.0"\r
+                                       }\r
+                               ]\r
+                       },\r
+\r
+                       "streams_publishes": {\r
+                               "ves_heartbeat": {\r
+                                       "dmaap_info": {\r
+                                               "topic_url": "http://10.12.5.252:3904/events/unauthenticated.DCAE_CL_OUTPUT/"\r
+                                       },\r
+                                       "type": "message_router"\r
+                               }\r
+                       },\r
+                       "streams_subscribes": {\r
+                               "ves_heartbeat": {\r
+                                       "dmaap_info": {\r
+                                               "topic_url": "http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/"\r
+                                       },\r
+                                       "type": "message_router"\r
+                               }\r
+                       }\r
+               }\r
+\r
+**Build the Docker using below command with a image name**\r
+\r
+   .. code-block:: bash\r
+\r
+     sudo Docker build --no-cache --network=host -f ./Dockerfile -t\r
+     heartbeat.test1:latest .\r
+\r
+ To check whether image is built or not, run below command\r
+\r
+   .. code-block:: bash\r
+      sudo Docker images |grep heartbeat.test1\r
+\r
+**Run the Docker using below command which uses the environment file\r
+mentioned in the above section.**\r
+\r
+   .. code-block:: bash\r
+      sudo Docker run -d --name hb1 --env-file env.list\r
+      heartbeat.test1:latest\r
+\r
+ To check the logs, run below command\r
\r
+   .. code-block:: bash\r
+      sudo Docker logs -f hb1\r
+\r
+**To stop the Docker run**\r
+\r
+   Get the Docker container ID from below command\r
+\r
+   .. code-block:: bash\r
+\r
+       sudo Docker ps -a \| grep heartbeat.test1\r
+\r
+   Run below commands to stop the Docker run\r
+   \r
+   .. code-block:: bash\r
+   \r
+       sudo Docker stop <Docker container ID)\r
+       sudo Docker rm -f hb1\r
+\r
+**Initiate the maven build**\r
+\r
+   To run the maven build, execute any one of them.\r
+   \r
+   .. code-block:: bash\r
+      sudo mvn -s settings.xml deploy\r
+      OR\r
+      sudo mvn -s settings.xml -X deploy\r
+\r
+   If there is a libxml-xpath related issue, then install the\r
+   libxml-xpath as below. If the issue is something else, follow the\r
+   link given as part of the build failure.\r
+  \r
+   .. code-block:: bash\r
+      sudo apt install libxml-xpath-perl\r
diff --git a/docs/sections/services/heartbeat-ms/design.rst b/docs/sections/services/heartbeat-ms/design.rst
new file mode 100644 (file)
index 0000000..fa4490f
--- /dev/null
@@ -0,0 +1,166 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+\r
+.. _design:\r
+\r
+Design\r
+======\r
+\r
+There are 4 processes created as below\r
+\r
+Main process\r
+------------\r
\r
+This is the initial process which does the following.\r
+\r
+- Download CBS configuration and update the vnf_table_1\r
+- Spawns HB worker process, DB Monitoring process and CBS polling\r
+  process (if required)\r
+- Periodically update the hb_common table\r
+\r
+HB worker process\r
+-----------------\r
+\r
+This process is created by main process and does the following.\r
+\r
+- It waits on the HB Json event message from DMaaP message router\r
+- It receives the HB Json message and retrieves sourceName,\r
+  lastEpochTime, eventName in the incoming message\r
+- It checks for the received eventName against the eventName in\r
+  vnf_table_1. If eventName is not matched, then it discards the\r
+  message.\r
+- It checks for the received sourceName in the vnf_table_2. If the\r
+  sourceName is already there in vnf_table_2, then it updates the\r
+  received HB Json message in vnf_table_2 against that sourceName. If\r
+  the sourceName is not there in vnf_table_2, then it adds an entry in\r
+  vnf_table_2 for that eventName and increments the sourceName count in\r
+  vnf_table_1\r
+\r
+DB Monitoring process\r
+---------------------\r
+\r
+This process is created by main process and does the following.\r
+\r
+- The DB monitoring process scans through each entry of vnf_table_1 and\r
+  looks at the corresponding vnf_table_2 and checks the condition for\r
+  Control Loop event is met or not\r
+- If it finds that the multiple consecutive HB are missed, it raises\r
+  the Control Loop event.\r
+- It also clears the control loop event by looking at recently received\r
+  HB message.\r
+- Because of reconfiguration procedure, some of the existing entries in\r
+  vnf_table_1 may become invalid. DB Monitoring process would clean the\r
+  DB by looking at validity flag maintained in each vnf_table_1 table\r
+  entry. If not valid, it removes the entry in vnf_table_1 and also\r
+  removes the corresponding entries of vnf_table_2.\r
+\r
+CBS polling process\r
+-------------------\r
+\r
+If the local configuration file (config/hbproperties.yaml) indicates\r
+that CBS polling is required, then main process would create the CBS \r
+polling process. It does the following.\r
+\r
+- It takes the CBS polling interval from the configuration file.\r
+\r
+- For every CBS polling interval, it sets the hb_common with state as\r
+  reconfiguration to indicate the main process to download CBS\r
+  configuration\r
+\r
+CBS configuration download support\r
+----------------------------------\r
+\r
+Apart from the above, a function/method is provided to Docker container\r
+that would download the CBS configuration whenever the configuration\r
+changes. This method/function would read hb_common state and change the\r
+state to reconfiguration.\r
+\r
+Heartbeat Microserice Multi instance support\r
+--------------------------------------------\r
+\r
+In order to work smoothly in an environment having multiple HB micro\r
+services instances, processes would work differently as mentioned below.\r
+\r
+**Main Process:**\r
+\r
+    Active Instance:\r
+     - Download CBS configuration and process it\r
+     - Spawns processes\r
+     - Periodically update hb_common with last accessed time to indicate that active instance is Alive.\r
+        \r
+    Inactive Instance:\r
+        - Spawns processes\r
+        - Constantly check hb_common entry for last accessed time\r
+        - If the last accessed time is more than a minute or so, then it assumes the role of active instance \r
+    \r
+**HB worker process:** Both active and inactive instance behaves the sames as metnioned in the Design section.\r
+\r
+**DB Monitoring process:** Both active periodically checks its process ID/hostname with hb_common data to know whether it is an active instance or not. If inactive instance it does nothing. If active instance, it behaves as mentioned in design section.\r
+\r
+**CBS Polling process:** Periodically checks its process ID/hostname with hb_common data to know whether it is an active instance or not. If inactive instance it does nothing. If active instance, it behaves as mentioned in design section.\r
+\r
+Handling of some of the failure scenarios\r
+-----------------------------------------\r
+\r
+Failure to download the configuration from CBS – In this case, local\r
+configuration file etc/config.json is considered as the configuration\r
+file and vnf_table_1 is updated accordingly.\r
+\r
+The Reconfiguration procedure is as below\r
+-----------------------------------------\r
+\r
+- If the state is Reconfiguration, then HB worker process, DB\r
+  monitoring process and CBS polling process would wait for\r
+  reconfiguration to complete.\r
+- Set each entry as invalid by using validity flag in vnf_table_1\r
+- Download the json file from CBS.\r
+- Set the validity flag to indicate to valid when an entry is updated.\r
+\r
+Postgres Database\r
+-----------------\r
+\r
+There are 3 tables maintained.\r
+\r
+**Vnf_table_1 table:** \r
+This is table is indexed by eventName. Each entry\r
+has following parameters in it.\r
+\r
+- eventName\r
+- Configured heartbeat Missed Count\r
+- Configured Heartbeat Interval\r
+- Number of SourceName having same eventName\r
+- Validity flag that indicates VNF entry is valid or not\r
+- It also has following parameter related to Control loop event\r
+   - policyVersion\r
+   - policyName\r
+   - policyScope\r
+   - target_type\r
+   - target\r
+   - closedLoopControlName\r
+   - version\r
+\r
+**Vnf_table_2 table:** \r
+For each sourceName there would be an entry in vnf_table_2. \r
+This is indexed by eventName and SourceName. Each entry has\r
+below parameters\r
+\r
+- SourceName\r
+- Last received heartbeat epoch time\r
+- Control loop event raised flag. 0 indicates not raised, 1 indicates\r
+  CL event raised\r
+\r
+**hb_common table:** \r
+This is a single entry table.\r
+\r
+- The configuration status which would have one of the below.\r
+   - **RECONFIGURATION** – indicates CBS configuration processing is in\r
+      progress.\r
+   - **RUNNING** – CBS configuration is completed and ready to process HB\r
+      event and send CL event.\r
+- The process ID – This indicates the main process ID of the active HB\r
+  instance which is responsible to take care of reconfiguration\r
+- The source Name – It has 2 parts, hostname and service name. The\r
+  hostname is the Docker container ID. The service name is the\r
+  environment variable set for SERVICE_NAME\r
+- The last accessed time – The time last accessed by the main process\r
+  having the above process ID.\r
diff --git a/docs/sections/services/heartbeat-ms/index.rst b/docs/sections/services/heartbeat-ms/index.rst
new file mode 100644 (file)
index 0000000..4b67e98
--- /dev/null
@@ -0,0 +1,24 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+\r
+Heartbeat Microservice (version 2.1.0)\r
+======================================\r
+\r
+The main objective of **Heartbeat Microservice** is to receive the periodic\r
+heartbeat from the configured eventNames and report the loss of heartbeat\r
+onto DMaap if number of consecutive missed heartbeat count is more than \r
+the configured missed heartbeat count\r
+\r
+Heartbeat Microservice overview and functions\r
+---------------------------------------------\r
+\r
+.. toctree::\r
+    :maxdepth: 1\r
+       \r
+       architecture\r
+       design\r
+       build_setup\r
+       testprocedure\r
+       \r
+\r
\r
diff --git a/docs/sections/services/heartbeat-ms/testprocedure.rst b/docs/sections/services/heartbeat-ms/testprocedure.rst
new file mode 100644 (file)
index 0000000..6f80fc4
--- /dev/null
@@ -0,0 +1,435 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+\r
+.. _testprocedure:\r
+\r
+Test procedures and Postgres Database access\r
+============================================\r
+\r
+Postgres DB access\r
+------------------\r
+\r
+Login into postgres DB\r
+\r
+Run below commands to login into postgres DB and connect to HB Micro service DB.\r
+\r
+::\r
+     sudo su postgres\r
+     psql\r
+        \l hb_vnf\r
+\r
+Sample output is as below\r
+\r
+::\r
+               ubuntu@r3-dcae:~$ sudo su postgres\r
+               postgres@r3-dcae:/home/ubuntu$ psql\r
+               psql (9.5.14)\r
+               Type "help" for help.\r
+\r
+               postgres=# \l\r
+                                                                                 List of databases\r
+                  Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges\r
+               -----------+----------+----------+-------------+-------------+-----------------------\r
+                hb_vnf    | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\r
+                postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |\r
+                template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\r
+                                  |          |          |             |             | postgres=CTc/postgres\r
+                template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +\r
+                                  |          |          |             |             | postgres=CTc/postgres\r
+               (4 rows)\r
+\r
+               postgres=# \c hb_vnf\r
+               You are now connected to database "hb_vnf" as user "postgres".\r
+               hb_vnf=# \r
+\r
+Delete all tables before starting Docker run or local run\r
+---------------------------------------------------------\r
+\r
+After login into postgres and connect to hb_vnf as mentioned in (4.a), use below commands to delete the tables if exists\r
+\r
+DROP TABLE vnf_table_1;\r
+DROP TABLE vnf_table_2;\r
+DROP TABLE hb_common;\r
+\r
+The sample output is as below\r
+\r
+::\r
+\r
+               hb_vnf=# DROP TABLE vnf_table_1;\r
+               DROP TABLE\r
+               hb_vnf=# DROP TABLE vnf_table_2;\r
+               DROP TABLE\r
+               hb_vnf=# DROP TABLE hb_common;\r
+               DROP TABLE\r
+               hb_vnf=#\r
+\r
+Use select command to check the contents of vnf_table_1, vnf_table_2 and hb_common\r
+----------------------------------------------------------------------------------\r
+\r
+SELECT * FROM vnf_table_1;\r
+SELECT * FROM vnf_table_2;\r
+SELECT * FROM hb_common;\r
+\r
+The sample output is as below\r
+\r
+::\r
+\r
+               hb_vnf=# SELECT * FROM vnf_table_1;\r
+\r
+                 event_name   | heartbeat_missed_count | heartbeat_interval | closed_control_loop_name | policy_version | policy_name |                        policy_scope                         | target_type |   target   | version | source_name_count | validity_flag\r
+               ---------------+------------------------+--------------------+--------------------------+----------------+-------------+-------------------------------------------------------------+-------------+------------+---------+-------------------+---------------\r
+                Heartbeat_S   |                      4 |                 60 | ControlLoopEvent1        | 1.0.0.5        | vFireWall   | resource=sampleResource,type=sampletype,CLName=sampleCLName | VM          | genVnfName | 2.0     |                 0 |             1\r
+                Heartbeat_vFW |                      4 |                 50 | ControlLoopEvent1        | 1.0.0.5        | vFireWall   | resource=sampleResource,type=sampletype,CLName=sampleCLName | VNF         | genVnfName | 2.0     |                 0 |             1\r
+               (2 rows)\r
+\r
+               hb_vnf=# SELECT * FROM vnf_table_2;\r
+                 event_name   | source_name_key | last_epo_time | source_name  | cl_flag\r
+               ---------------+-----------------+---------------+--------------+---------\r
+                Heartbeat_vFW |               1 | 1544705272479 | SOURCE_NAME1 |       0\r
+               (1 row)\r
+\r
+               hb_vnf=#\r
+\r
+               hb_vnf=# SELECT * FROM hb_common;\r
+                process_id |                source_name                 | last_accessed_time | current_state\r
+               ------------+--------------------------------------------+--------------------+---------------\r
+                                 8 | 21d744ae8cd5-mvp-dcaegen2-heartbeat-static |         1544710271 | RUNNING\r
+               (1 row)\r
+\r
+               hb_vnf=#\r
+\r
+Testing procedures\r
+==================\r
+\r
+Injecting event into HB micro service\r
+-------------------------------------\r
+\r
+Once after starting the Docker run or local run, below commands run from tests/ directory would send event to HB worker process\r
+\r
+::\r
+\r
+       curl -i -X POST -d {"test":"msg"} --header "Content-Type: application/json" http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT\r
+       curl -i -X POST -d @test1.json --header "Content-Type: application/json" http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT\r
+       curl -i -X POST -d @test2.json --header "Content-Type: application/json" http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT\r
+       curl -i -X POST -d @test3.json --header "Content-Type: application/json" http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT\r
+\r
+The sample output is as below\r
+\r
+::\r
+\r
+               ubuntu@r3-aai-inst2:~/heartbeat12Dec/heartbeat/tests$ curl -i -X POST -d @test1.json --header "Content-Type: application/json" http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT\r
+               HTTP/1.1 200 OK\r
+               Date: Wed, 12 Dec 2018 12:41:26 GMT\r
+               Content-Type: application/json\r
+               Accept: */*\r
+               breadcrumbId: ID-22f076777975-37104-1543559663227-0-563929\r
+               User-Agent: curl/7.47.0\r
+               X-CSI-Internal-WriteableRequest: true\r
+               Content-Length: 41\r
+               Server: Jetty(9.3.z-SNAPSHOT)\r
+\r
+               {\r
+                       "serverTimeMs": 0,\r
+                       "count": 1\r
+               }\r
+\r
+\r
+\r
+               curl -i -X POST -d @test1.json --header "Content-Type: application/json" http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT\r
+               ubuntu@r3-aai-inst2:~/heartbeat12Dec/heartbeat/tests$ curl -i -X POST -d @test2.json --header "Contet-Type: application/json" http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT\r
+               HTTP/1.1 200 OK\r
+               Date: Wed, 12 Dec 2018 12:41:39 GMT\r
+               Content-Type: application/json\r
+               Accept: */*\r
+               breadcrumbId: ID-22f076777975-37104-1543559663227-0-563937\r
+               User-Agent: curl/7.47.0\r
+               X-CSI-Internal-WriteableRequest: true\r
+               Content-Length: 41\r
+               Server: Jetty(9.3.z-SNAPSHOT)\r
+\r
+               {\r
+                       "serverTimeMs": 0,\r
+                       "count": 1\r
+               }\r
+\r
+\r
+               ubuntu@r3-aai-inst2:~/heartbeat12Dec/heartbeat/tests$ curl -i -X POST -d @test3.json --header "Contet-Type: application/json" http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT\r
+               HTTP/1.1 200 OK\r
+               Date: Wed, 12 Dec 2018 12:41:39 GMT\r
+               Content-Type: application/json\r
+               Accept: */*\r
+               breadcrumbId: ID-22f076777975-37104-1543559663227-0-563937\r
+               User-Agent: curl/7.47.0\r
+               X-CSI-Internal-WriteableRequest: true\r
+               Content-Length: 41\r
+               Server: Jetty(9.3.z-SNAPSHOT)\r
+\r
+               {\r
+                       "serverTimeMs": 0,\r
+                       "count": 1\r
+               }\r
+\r
+Testing Control loop event\r
+--------------------------\r
+\r
+- Modify the Json as below\r
+       Modify the lastEpochTime and startEpochTime with current time in Test1.json\r
+       Modify the eventName in Test1.json to one of the eventName in vnf_table_1 \r
+\r
+- Inject the Test1.json as mentioned in above section\r
+\r
+- Get missed heartbeat count (for e.g 3) and heartbeat interval (for e.g. 60 seconds) for the eventName from  vnf_table_1. Wait for heartbeat to miss multiple time, i.e. 3 * 60seconds = 180 seconds.\r
+\r
+After waiting for the specified period, you would see the control loop event. The sample one is as below.\r
+\r
+::\r
+\r
+       2018-12-13 12:51:13,016 | __main__ | db_monitoring | db_monitoring | 95 |  INFO | ('DBM:Time to raise Control Loop Event for target type - ', 'VNF')\r
+       2018-12-13 12:51:13,016 | __main__ | db_monitoring | db_monitoring | 132 |  INFO | ('DBM: CL Json object is', '{"closedLoopEventClient": "DCAE_Heartbeat_MS", "policyVersion": "1.0.0.5", "policyName": "vFireWall", "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName", "target_type": "VNF", "AAI": {"generic-vnf.vnf-name": "SOURCE_NAME1"}, "closedLoopAlarmStart": 1544705473016, "closedLoopEventStatus": "ONSET", "closedLoopControlName": "ControlLoopEvent1", "version": "2.0", "target": "genVnfName", "requestID": "8c1b8bd8-06f7-493f-8ed7-daaa4cc481bc", "from": "DCAE"}')\r
+\r
+The postgres DB also have a CL_flag set indicating control loop event with ONSET is raised.\r
+\r
+::\r
+\r
+               hb_vnf=# SELECT * FROM vnf_table_2;\r
+                 event_name   | source_name_key | last_epo_time | source_name  | cl_flag\r
+               ---------------+-----------------+---------------+--------------+---------\r
+                Heartbeat_vFW |               1 | 1544705272479 | SOURCE_NAME1 |       1\r
+               (1 row)\r
+\r
+               hb_vnf=#\r
+\r
+**The sample log from startup is as below**\r
+\r
+::\r
+\r
+               ubuntu@r3-aai-inst2:~/heartbeat12Dec/heartbeat$ sudo Docker run -d --name hb1 --env-file env.list heartbeat.test1:latest102413e8af4ab754e008cee43a01bf3d5439820aa91cfb4e099a140a7931fd71\r
+               ubuntu@r3-aai-inst2:~/heartbeat12Dec/heartbeat$ sudo Docker logs -f hb1\r
+               /usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.\r
+                 """)\r
+               2018-12-12 12:39:58,968 | __main__ | misshtbtd | main | 309 |  INFO | MSHBD:Execution Started\r
+               2018-12-12 12:39:58,970 | __main__ | misshtbtd | main | 314 |  INFO | ('MSHBT:HB Properties -', '10.0.4.1', '5432', 'postgres', 'abc', 'hb_vnf', True, 300)\r
+               2018-12-12 12:39:58,970 | onap_dcae_cbs_docker_client.client | client | _get_uri_from_consul | 36 |  DEBUG | Trying to lookup service: http://10.12.6.50:8500/v1/catalog/service/config_binding_service\r
+               2018-12-12 12:39:58,974 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.6.50\r
+               2018-12-12 12:39:58,976 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.6.50:8500 "GET /v1/catalog/service/config_binding_service HTTP/1.1" 200 375\r
+               2018-12-12 12:39:58,979 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.6.50\r
+               2018-12-12 12:39:58,988 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.6.50:10000 "GET /service_component/mvp-dcaegen2-heartbeat-static HTTP/1.1" 200 1015\r
+               2018-12-12 12:39:58,989 | onap_dcae_cbs_docker_client.client | client | _get_path | 83 |  INFO | get_config returned the following configuration: {"heartbeat_config": {"vnfs": [{"eventName": "Heartbeat_S", "heartbeatcountmissed": 3, "heartbeatinterval": 60, "closedLoopControlName": "ControlLoopEvent1", "policyVersion": "1.0.0.5", "policyName": "vFireWall", "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName", "target_type": "VM", "target": "genVnfName", "version": "2.0"}, {"eventName": "Heartbeat_vFW", "heartbeatcountmissed": 3, "heartbeatinterval": 60, "closedLoopControlName": "ControlLoopEvent1", "policyVersion": "1.0.0.5", "policyName": "vFireWall", "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName", "target_type": "VNF", "target": "genVnfName", "version": "2.0"}]}, "streams_publishes": {"ves_heartbeat": {"dmaap_info": {"topic_url": "http://10.12.5.252:3904/events/unauthenticated.DCAE_CL_OUTPUT/"}, "type": "message_router"}}, "streams_subscribes": {"ves_heartbeat": {"dmaap_info": {"topic_url": "http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/"}, "type": "message_router"}}}\r
+               2018-12-12 12:39:58,989 | __main__ | misshtbtd | fetch_json_file | 254 |  INFO | MSHBD:current config logged to : ../etc/download.json\r
+               2018-12-12 12:39:58,996 | __main__ | misshtbtd | fetch_json_file | 272 |  INFO | ('MSHBT: The json file is - ', '../etc/config.json')\r
+               2018-12-12 12:39:59,028 | __main__ | misshtbtd | create_database | 79 |  INFO | ('MSHBT:Create_database:DB not exists? ', (False,))\r
+               2018-12-12 12:39:59,030 | __main__ | misshtbtd | create_database | 86 |  INFO | MSHBD:Database already exists\r
+               2018-12-12 12:39:59,032 | __main__ | misshtbtd | create_update_db | 281 |  INFO | ('MSHBT: DB parameters -', '10.0.4.1', '5432', 'postgres', 'abc', 'hb_vnf')\r
+               2018-12-12 12:39:59,099 | __main__ | misshtbtd | main | 325 |  INFO | ('MSHBD:Current process id is', 7)\r
+               2018-12-12 12:39:59,099 | __main__ | misshtbtd | main | 326 |  INFO | MSHBD:Now be in a continuous loop\r
+               2018-12-12 12:39:59,111 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 6, 'RUNNING', '8909e4332e34-mvp-dcaegen2-heartbeat-static', 1544618286)\r
+               2018-12-12 12:39:59,111 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 6, '8909e4332e34-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618286, 1544618399, 113)\r
+               2018-12-12 12:39:59,111 | __main__ | misshtbtd | main | 378 |  INFO | MSHBD:Active instance is inactive for long time: Time to switchover\r
+               2018-12-12 12:39:59,111 | __main__ | misshtbtd | main | 380 |  INFO | MSHBD:Initiating to become Active Instance\r
+               2018-12-12 12:39:59,111 | onap_dcae_cbs_docker_client.client | client | _get_uri_from_consul | 36 |  DEBUG | Trying to lookup service: http://10.12.6.50:8500/v1/catalog/service/config_binding_service\r
+               2018-12-12 12:39:59,114 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.6.50\r
+               2018-12-12 12:39:59,118 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.6.50:8500 "GET /v1/catalog/service/config_binding_service HTTP/1.1" 200 375\r
+               2018-12-12 12:39:59,120 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.6.50\r
+               2018-12-12 12:39:59,129 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.6.50:10000 "GET /service_component/mvp-dcaegen2-heartbeat-static HTTP/1.1" 200 1015\r
+               2018-12-12 12:39:59,129 | onap_dcae_cbs_docker_client.client | client | _get_path | 83 |  INFO | get_config returned the following configuration: {"heartbeat_config": {"vnfs": [{"eventName": "Heartbeat_S", "heartbeatcountmissed": 3, "heartbeatinterval": 60, "closedLoopControlName": "ControlLoopEvent1", "policyVersion": "1.0.0.5", "policyName": "vFireWall", "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName", "target_type": "VM", "target": "genVnfName", "version": "2.0"}, {"eventName": "Heartbeat_vFW", "heartbeatcountmissed": 3, "heartbeatinterval": 60, "closedLoopControlName": "ControlLoopEvent1", "policyVersion": "1.0.0.5", "policyName": "vFireWall", "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName", "target_type": "VNF", "target": "genVnfName", "version": "2.0"}]}, "streams_publishes": {"ves_heartbeat": {"dmaap_info": {"topic_url": "http://10.12.5.252:3904/events/unauthenticated.DCAE_CL_OUTPUT/"}, "type": "message_router"}}, "streams_subscribes": {"ves_heartbeat": {"dmaap_info": {"topic_url": "http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/"}, "type": "message_router"}}}\r
+               2018-12-12 12:39:59,129 | __main__ | misshtbtd | fetch_json_file | 254 |  INFO | MSHBD:current config logged to : ../etc/download.json\r
+               2018-12-12 12:39:59,139 | __main__ | misshtbtd | fetch_json_file | 272 |  INFO | ('MSHBT: The json file is - ', '../etc/config.json')\r
+               2018-12-12 12:39:59,139 | __main__ | misshtbtd | main | 386 |  INFO | ('MSHBD: Creating HB and DBM threads. The param pssed %d and %s', '../etc/config.json', 7)\r
+               2018-12-12 12:39:59,142 | __main__ | misshtbtd | create_process | 301 |  INFO | ('MSHBD:jobs list is', [<Process(Process-2, started)>, <Process(Process-3, started)>])\r
+               2018-12-12 12:39:59,221 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               /usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.\r
+                 """)\r
+               2018-12-12 12:39:59,815 | __main__ | htbtworker | <module> | 243 |  INFO | HBT:HeartBeat thread Created\r
+               2018-12-12 12:39:59,815 | __main__ | htbtworker | <module> | 245 |  INFO | ('HBT:The config file name passed is -%s', '../etc/config.json')\r
+               /usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.\r
+                 """)\r
+               2018-12-12 12:39:59,931 | __main__ | cbs_polling | pollCBS | 39 |  INFO | ('CBSP:Main process ID in hb_common is %d', 7)\r
+               2018-12-12 12:39:59,931 | __main__ | cbs_polling | pollCBS | 41 |  INFO | ('CBSP:My parent process ID is %d', '7')\r
+               2018-12-12 12:39:59,931 | __main__ | cbs_polling | pollCBS | 43 |  INFO | ('CBSP:CBS Polling interval is %d', 300)\r
+               /usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.\r
+                 """)\r
+               2018-12-12 12:39:59,937 | __main__ | db_monitoring | <module> | 231 |  INFO | DBM: DBM Process started\r
+               2018-12-12 12:39:59,939 | __main__ | db_monitoring | <module> | 236 |  INFO | ('DBM:Parent process ID and json file name', '7', '../etc/config.json')\r
+               2018-12-12 12:40:09,860 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:40:09,860 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:40:09,864 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:40:19,968 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:40:24,259 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618399)\r
+               2018-12-12 12:40:24,260 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618399, 1544618424, 25)\r
+               2018-12-12 12:40:24,260 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:40:24,267 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:40:24,810 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:40:24,812 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:40:34,837 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:40:34,838 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:40:34,839 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:40:39,994 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:40:49,304 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618424)\r
+               2018-12-12 12:40:49,304 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618424, 1544618449, 25)\r
+               2018-12-12 12:40:49,304 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:40:49,314 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:40:49,681 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:40:49,682 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:40:59,719 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:40:59,720 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:40:59,721 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:41:00,036 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:41:00,225 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 22\r
+               2018-12-12 12:41:00,226 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '["{\\"test\\":\\"msg\\"}"]')\r
+               2018-12-12 12:41:00,226 | __main__ | htbtworker | process_msg | 122 |  ERROR | ('HBT message process error - ', KeyError('event',))\r
+               2018-12-12 12:41:10,255 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:41:10,255 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:41:10,256 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:41:14,350 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618449)\r
+               2018-12-12 12:41:14,350 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618449, 1544618474, 25)\r
+               2018-12-12 12:41:14,350 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:41:14,359 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:41:20,075 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:41:25,193 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:41:25,193 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:41:35,222 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:41:35,222 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:41:35,223 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:41:35,838 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 662\r
+               2018-12-12 12:41:35,839 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '["{\\"event\\":{\\"commonEventHeader\\":{\\"startEpochMicrosec\\":1548313727714,\\"sourceId\\":\\"VNFA_SRC1\\",\\"eventId\\":\\"mvfs10\\",\\"nfcNamingCode\\":\\"VNFA\\",\\"timeZoneOffset\\":\\"UTC-05:30\\",\\"reportingEntityId\\":\\"cc305d54-75b4-431b-adb2-eb6b9e541234\\",\\"eventType\\":\\"platform\\",\\"priority\\":\\"Normal\\",\\"version\\":\\"4.0.2\\",\\"reportingEntityName\\":\\"ibcx0001vm002oam001\\",\\"sequence\\":1000,\\"domain\\":\\"heartbeat\\",\\"lastEpochMicrosec\\":1548313727714,\\"eventName\\":\\"Heartbeat_vDNS\\",\\"vesEventListenerVersion\\":\\"7.0.2\\",\\"sourceName\\":\\"SOURCE_NAME1\\",\\"nfNamingCode\\":\\"VNFA\\"},\\"heartbeatFields\\":{\\"heartbeatInterval\\":20,\\"heartbeatFieldsVersion\\":\\"3.0\\"}}}"]')\r
+               2018-12-12 12:41:35,839 | __main__ | htbtworker | process_msg | 125 |  INFO | ('HBT:Newly received HB event values ::', 'Heartbeat_vDNS', 1548313727714, 'SOURCE_NAME1')\r
+               2018-12-12 12:41:35,842 | __main__ | htbtworker | process_msg | 132 |  INFO | HBT:vnf_table_2 is already there\r
+               2018-12-12 12:41:35,842 | __main__ | htbtworker | process_msg | 183 |  INFO | HBT:eventName is not being monitored, Igonoring JSON message\r
+               2018-12-12 12:41:39,407 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618474)\r
+               2018-12-12 12:41:39,407 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618474, 1544618499, 25)\r
+               2018-12-12 12:41:39,407 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:41:39,418 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:41:40,118 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:41:45,864 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:41:45,864 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:41:45,865 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:41:46,482 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 661\r
+               2018-12-12 12:41:46,483 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '["{\\"event\\":{\\"commonEventHeader\\":{\\"startEpochMicrosec\\":1544608845841,\\"sourceId\\":\\"VNFB_SRC5\\",\\"eventId\\":\\"mvfs10\\",\\"nfcNamingCode\\":\\"VNFB\\",\\"timeZoneOffset\\":\\"UTC-05:30\\",\\"reportingEntityId\\":\\"cc305d54-75b4-431b-adb2-eb6b9e541234\\",\\"eventType\\":\\"platform\\",\\"priority\\":\\"Normal\\",\\"version\\":\\"4.0.2\\",\\"reportingEntityName\\":\\"ibcx0001vm002oam001\\",\\"sequence\\":1000,\\"domain\\":\\"heartbeat\\",\\"lastEpochMicrosec\\":1544608845841,\\"eventName\\":\\"Heartbeat_vFW\\",\\"vesEventListenerVersion\\":\\"7.0.2\\",\\"sourceName\\":\\"SOURCE_NAME2\\",\\"nfNamingCode\\":\\"VNFB\\"},\\"heartbeatFields\\":{\\"heartbeatInterval\\":20,\\"heartbeatFieldsVersion\\":\\"3.0\\"}}}"]')\r
+               2018-12-12 12:41:46,483 | __main__ | htbtworker | process_msg | 125 |  INFO | ('HBT:Newly received HB event values ::', 'Heartbeat_vFW', 1544608845841, 'SOURCE_NAME2')\r
+               2018-12-12 12:41:46,486 | __main__ | htbtworker | process_msg | 132 |  INFO | HBT:vnf_table_2 is already there\r
+               2018-12-12 12:41:46,486 | __main__ | htbtworker | process_msg | 136 |  INFO | ('HBT:', "Select source_name_count from vnf_table_1 where event_name='Heartbeat_vFW'")\r
+               2018-12-12 12:41:46,487 | __main__ | htbtworker | process_msg | 153 |  INFO | ('HBT:event name, source_name & source_name_count are', 'Heartbeat_vFW', 'SOURCE_NAME2', 1)\r
+               2018-12-12 12:41:46,487 | __main__ | htbtworker | process_msg | 157 |  INFO | ('HBT:eppc query is', "Select source_name from vnf_table_2 where event_name= 'Heartbeat_vFW' and source_name_key=1")\r
+               2018-12-12 12:41:46,487 | __main__ | htbtworker | process_msg | 165 |  INFO | ('HBT: Update vnf_table_2 : ', 0, [('SOURCE_NAME2',)])\r
+               2018-12-12 12:41:46,488 | __main__ | htbtworker | process_msg | 173 |  INFO | ('HBT: The source_name_key and source_name_count are ', 1, 1)\r
+               2018-12-12 12:41:56,508 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:41:56,508 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:41:56,509 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:42:00,160 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:42:04,456 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618499)\r
+               2018-12-12 12:42:04,456 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618499, 1544618524, 25)\r
+               2018-12-12 12:42:04,456 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:42:04,464 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:42:11,463 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:42:11,464 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:42:20,199 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:42:21,489 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:42:21,489 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:42:21,491 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:42:29,490 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618524)\r
+               2018-12-12 12:42:29,490 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618524, 1544618549, 25)\r
+               2018-12-12 12:42:29,490 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:42:29,503 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:42:36,431 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:42:36,433 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:42:40,235 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:42:46,467 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:42:46,467 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:42:46,468 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:42:54,539 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618549)\r
+               2018-12-12 12:42:54,539 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618549, 1544618575, 26)\r
+               2018-12-12 12:42:54,539 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:42:54,555 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:43:00,273 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:43:01,415 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:43:01,416 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:43:11,439 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:43:11,439 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:43:11,440 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:43:19,592 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618575)\r
+               2018-12-12 12:43:19,593 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618575, 1544618600, 25)\r
+               2018-12-12 12:43:19,593 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:43:19,601 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:43:20,309 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:43:26,383 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:43:26,384 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:43:36,399 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:43:36,400 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:43:36,401 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:43:40,346 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:43:44,635 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618600)\r
+               2018-12-12 12:43:44,635 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618600, 1544618625, 25)\r
+               2018-12-12 12:43:44,636 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:43:44,645 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:43:51,339 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:43:51,343 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:44:00,385 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:44:01,369 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:44:01,369 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:44:01,371 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:44:09,678 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618625)\r
+               2018-12-12 12:44:09,679 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618625, 1544618650, 25)\r
+               2018-12-12 12:44:09,679 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:44:09,687 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:44:16,313 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:44:16,313 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:44:20,422 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:44:26,338 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:44:26,338 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:44:26,339 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:44:34,721 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618650)\r
+               2018-12-12 12:44:34,721 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618650, 1544618675, 25)\r
+               2018-12-12 12:44:34,721 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:44:34,730 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:44:40,448 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:44:41,287 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:44:41,288 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:44:51,316 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:44:51,316 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:44:51,317 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:44:59,764 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618675)\r
+               2018-12-12 12:44:59,764 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618675, 1544618700, 25)\r
+               2018-12-12 12:44:59,764 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:44:59,773 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:45:00,038 | __main__ | cbs_polling | pollCBS | 52 |  INFO | CBSP:ACTIVE Instance:Change the state to RECONFIGURATION\r
+               2018-12-12 12:45:00,046 | misshtbtd | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:45:00,055 | __main__ | cbs_polling | pollCBS | 39 |  INFO | ('CBSP:Main process ID in hb_common is %d', 7)\r
+               2018-12-12 12:45:00,055 | __main__ | cbs_polling | pollCBS | 41 |  INFO | ('CBSP:My parent process ID is %d', '7')\r
+               2018-12-12 12:45:00,055 | __main__ | cbs_polling | pollCBS | 43 |  INFO | ('CBSP:CBS Polling interval is %d', 300)\r
+               2018-12-12 12:45:00,485 | __main__ | db_monitoring | db_monitoring | 225 |  INFO | DBM:Inactive instance or hb_common state is not RUNNING\r
+               2018-12-12 12:45:06,290 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:45:06,291 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:45:16,308 | __main__ | htbtworker | process_msg | 57 |  INFO | HBT:Waiting for hb_common state to become RUNNING\r
+               2018-12-12 12:45:20,517 | __main__ | db_monitoring | db_monitoring | 225 |  INFO | DBM:Inactive instance or hb_common state is not RUNNING\r
+               2018-12-12 12:45:24,806 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RECONFIGURATION', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618700)\r
+               2018-12-12 12:45:24,806 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RECONFIGURATION', 1544618700, 1544618725, 25)\r
+               2018-12-12 12:45:24,806 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RECONFIGURATION')\r
+               2018-12-12 12:45:24,806 | __main__ | misshtbtd | main | 357 |  INFO | MSHBD:Reconfiguration is in progress,Starting new processes by killing the present processes\r
+               2018-12-12 12:45:24,806 | onap_dcae_cbs_docker_client.client | client | _get_uri_from_consul | 36 |  DEBUG | Trying to lookup service: http://10.12.6.50:8500/v1/catalog/service/config_binding_service\r
+               2018-12-12 12:45:24,808 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.6.50\r
+               2018-12-12 12:45:24,810 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.6.50:8500 "GET /v1/catalog/service/config_binding_service HTTP/1.1" 200 375\r
+               2018-12-12 12:45:24,814 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.6.50\r
+               2018-12-12 12:45:24,820 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.6.50:10000 "GET /service_component/mvp-dcaegen2-heartbeat-static HTTP/1.1" 200 1015\r
+               2018-12-12 12:45:24,821 | onap_dcae_cbs_docker_client.client | client | _get_path | 83 |  INFO | get_config returned the following configuration: {"heartbeat_config": {"vnfs": [{"eventName": "Heartbeat_S", "heartbeatcountmissed": 3, "heartbeatinterval": 60, "closedLoopControlName": "ControlLoopEvent1", "policyVersion": "1.0.0.5", "policyName": "vFireWall", "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName", "target_type": "VM", "target": "genVnfName", "version": "2.0"}, {"eventName": "Heartbeat_vFW", "heartbeatcountmissed": 3, "heartbeatinterval": 60, "closedLoopControlName": "ControlLoopEvent1", "policyVersion": "1.0.0.5", "policyName": "vFireWall", "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName", "target_type": "VNF", "target": "genVnfName", "version": "2.0"}]}, "streams_publishes": {"ves_heartbeat": {"dmaap_info": {"topic_url": "http://10.12.5.252:3904/events/unauthenticated.DCAE_CL_OUTPUT/"}, "type": "message_router"}}, "streams_subscribes": {"ves_heartbeat": {"dmaap_info": {"topic_url": "http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/"}, "type": "message_router"}}}\r
+               2018-12-12 12:45:24,821 | __main__ | misshtbtd | fetch_json_file | 254 |  INFO | MSHBD:current config logged to : ../etc/download.json\r
+               2018-12-12 12:45:24,828 | __main__ | misshtbtd | fetch_json_file | 272 |  INFO | ('MSHBT: The json file is - ', '../etc/config.json')\r
+               2018-12-12 12:45:24,829 | __main__ | misshtbtd | create_update_db | 281 |  INFO | ('MSHBT: DB parameters -', '10.0.4.1', '5432', 'postgres', 'abc', 'hb_vnf')\r
+               2018-12-12 12:45:24,840 | __main__ | misshtbtd | create_update_vnf_table_1 | 162 |  INFO | MSHBT:Set Validity flag to zero in vnf_table_1 table\r
+               2018-12-12 12:45:24,841 | __main__ | misshtbtd | create_update_vnf_table_1 | 191 |  INFO | MSHBT:Updated vnf_table_1 as per the json configuration file\r
+               2018-12-12 12:45:24,843 | __main__ | misshtbtd | main | 362 |  INFO | ('MSHBD: parameters  passed to DBM and HB are %d and %s', 7)\r
+               2018-12-12 12:45:24,852 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:45:26,325 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:45:26,325 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:45:26,326 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:45:40,549 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+               2018-12-12 12:45:41,267 | urllib3.connectionpool | connectionpool | _make_request | 396 |  DEBUG | http://10.12.5.252:3904 "GET /events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000 HTTP/1.1" 200 2\r
+               2018-12-12 12:45:41,268 | __main__ | htbtworker | process_msg | 92 |  INFO | ('HBT:', '[]')\r
+               2018-12-12 12:45:49,885 | __main__ | misshtbtd | main | 331 |  INFO | ('MSHBT: hb_common values ', 7, 'RUNNING', '102413e8af4a-mvp-dcaegen2-heartbeat-static', 1544618725)\r
+               2018-12-12 12:45:49,886 | __main__ | misshtbtd | main | 335 |  INFO | ('MSHBD:pid,srcName,state,time,ctime,timeDiff is', 7, '102413e8af4a-mvp-dcaegen2-heartbeat-static', 'RUNNING', 1544618725, 1544618750, 25)\r
+               2018-12-12 12:45:49,886 | __main__ | misshtbtd | main | 351 |  INFO | ('MSHBD:config status is', 'RUNNING')\r
+               2018-12-12 12:45:49,894 | __main__ | misshtbtd | create_update_hb_common | 143 |  INFO | MSHBT:Updated  hb_common DB with new values\r
+               2018-12-12 12:45:51,291 | __main__ | htbtworker | process_msg | 71 |  INFO | ('\n\nHBT:eventnameList values ', ['Heartbeat_S', 'Heartbeat_vFW'])\r
+               2018-12-12 12:45:51,291 | __main__ | htbtworker | process_msg | 77 |  INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000\r
+               2018-12-12 12:45:51,292 | urllib3.connectionpool | connectionpool | _new_conn | 208 |  DEBUG | Starting new HTTP connection (1): 10.12.5.252\r
+               2018-12-12 12:46:00,585 | __main__ | db_monitoring | db_monitoring | 53 |  INFO | DBM: Active DB Monitoring Instance\r
+\r
index c500a05..9589a6a 100644 (file)
@@ -16,3 +16,4 @@ Service components under DCAE
    ./mapper/index.rst
    ./prh/index.rst
    ./dfc/index.rst
+   ./heartbeat-ms/index.rst