ConfigMap parameter handling change
[ric-plt/submgr.git] / docs / user-guide.rst
index 3247860..5977110 100755 (executable)
@@ -67,9 +67,10 @@ Architecture
       header when E2 Termination sends the subscribed message to xApp. When xApp wants to delete the subscription, the same sequence number
       must be included in the ASN.1 encoded RIC Subscription Delete Request message sent to Subscription Manager.
 
-      Subscription Manager allocates RIC Requestor ID. Currently the ID value is always 123. In merge case subscription is created only for
-      the first requestor. RAN gets the Request of the xApp who makes the first subscription. RAN uses Subscription Manager allocated Requestor
-      ID in all RIC Indication messages it sends to RIC for the subscription.
+      Subscription Manager allocates and substitutes RIC Requestor ID for E2 interface communication. Currently the ID value is always 123.
+      RAN gets the Request of the xApp who makes the first subscription. RAN uses Subscription Manager allocated Requestor ID in all RIC
+      Indication messages it sends to RIC for the subscription.  Subscription Manager returns the same RIC Requestor ID in response message
+      to xApp as was in the request. In merge case subscription is created only for the first requestor.
 
       TransactionId (Xid) in RMR message header is used to track messages between xApp and Subscription Manager. xApp allocates it. Subscription
       Manager returns TransactionId received from xApp in response message to xApp. xApp uses it to map response messages to request messages
@@ -251,6 +252,71 @@ Architecture
     were not successfully completed, Subscription Manager sends delete request to BTS and removes routes created for those. Restoring subscriptions from
     db can be disable via submgr-config.yaml file by setting "readSubsFromDb": "false".
 
+Metrics
+-------
+ Subscription Manager adds following statistic counters:
+
+ Subscription create counters:
+               - SubReqFromXapp: The total number of SubscriptionRequest messages received from xApp
+               - SubRespToXapp: The total number of SubscriptionResponse messages sent to xApp
+               - SubFailToXapp: The total number of SubscriptionFailure messages sent to xApp
+               - SubReqToE2: The total number of SubscriptionRequest messages sent to E2Term
+               - SubReReqToE2: The total number of SubscriptionRequest messages resent to E2Term
+               - SubRespFromE2: The total number of SubscriptionResponse messages from E2Term
+               - SubFailFromE2: The total number of SubscriptionFailure messages from E2Term
+               - SubReqTimerExpiry: The total number of SubscriptionRequest timer expires
+               - RouteCreateFail: The total number of subscription route create failure
+               - RouteCreateUpdateFail: The total number of subscription route create update failure
+               - MergedSubscriptions: The total number of merged Subscriptions
+
+ Subscription delete counters:
+               - SubDelReqFromXapp: The total number of SubscriptionDeleteResponse messages received from xApp
+               - SubDelRespToXapp: The total number of SubscriptionDeleteResponse messages sent to xApp
+               - SubDelReqToE2: The total number of SubscriptionDeleteRequest messages sent to E2Term
+               - SubDelReReqToE2: The total number of SubscriptionDeleteRequest messages resent to E2Term
+               - SubDelRespFromE2: The total number of SubscriptionDeleteResponse messages from E2Term
+               - SubDelFailFromE2: The total number of SubscriptionDeleteFailure messages from E2Term
+               - SubDelReqTimerExpiry: The total number of SubscriptionDeleteRequest timer expires
+               - RouteDeleteFail: The total number of subscription route delete failure
+               - RouteDeleteUpdateFail: The total number of subscription route delete update failure
+               - UnmergedSubscriptions: The total number of unmerged Subscriptions
+
+ SDL failure counters:
+               - SDLWriteFailure: The total number of SDL write failures
+               - SDLReadFailure: The total number of SDL read failures
+               - SDLRemoveFailure: The total number of SDL read failures
+
+Configurable parameters
+-----------------------
+ Subscription Manager has following configurable parameters.
+   - Retry timeout for RIC Subscription Request message
+      - e2tSubReqTimeout_ms: 2000 is the default value
+
+   - Retry timeout for RIC Subscription Delete Request message
+      - e2tSubDelReqTime_ms: 2000 is the default value
+
+   - Waiting time for RIC Subscription Response and RIC Subscription Delete Response messages
+      - e2tRecvMsgTimeout_ms: 2000 is the default value
+
+   - Try count for RIC Subscription Request message   
+      - e2tMaxSubReqTryCount: 2 is the default value
+
+   - Try count for RIC Subscription Delete Request message   
+      - e2tMaxSubDelReqTryCount: 2 is the default value
+   
+   - Are subscriptions read from database in Subscription Manager startup
+      - readSubsFromDb: "true"  is the default value
+ The parameters can be changed on the fly via Kubernetes Configmap. Default parameters values are defined in Helm chart
+
+ Use following command to open Subscription Manager's Configmap in Nano editor. Firts change parameter and then store the
+ change by pressing first Ctrl + o. Close editor by pressing the Ctrl + x. The change is visible in Subscription Manager's
+ log after some 20 - 30 seconds.
+ .. code-block:: none
+
+  KUBE_EDITOR="nano" kubectl edit cm configmap-ricplt-submgr-submgrcfg -n ricplt
+
 REST interface for debugging and testing
 ----------------------------------------
  Give following commands to get Subscription Manager pod's IP address
@@ -267,14 +333,18 @@ REST interface for debugging and testing
 
   10.244.0.181
 
+ Get metrics
+
+ .. code-block:: none
+
+  Example: curl -s GET "http://10.244.0.181:8080/ric/v1/metrics"
+
  Get subscriptions
 
  .. code-block:: none
 
   Example: curl -X GET "http://10.244.0.181:8088/ric/v1/subscriptions"
 
-  []
-
  Delete single subscription from db
 
  .. code-block:: none