6 Viewing NF Deployment Data Collector Archive

  1. Unpack the archive provided by this module to view the information collected.

6.1 Loading the NF Logs, Metrics, Traces, Alerts Data

6.1.1 Creating or Updating the YAML File for the Loader Utility

The Loader utility YAML file is present in the CNC NF Data Collector tar package. You can either update the existing YAML file or create a new YAML file with the following parameters which can be configured. Oracle recommends to consider the existing file that is available with the tar package and update its parameters.

For information about parameter descriptions, refer to loader-custom-values.yaml Parameter Description.

If users of the Exporter utility wants to load the collected data to third-party tools to view them, then users can use the loader utility to load that data to third-party tools.
  1. Update the global.image.repository parameter by providing the name of the docker registry where the cnc-nfdata-collector image is present.
  2. Update the global.slaveNodeName parameter by providing the name of the kubernetes worker node that can load the collected data from this utility.
    To obtain the name of the worker node or slave node, run the kubectl get nodes command. The names of all the master and worker nodes of the kubernetes cluster are displayed in the Name column. You can provide the name of one of the worker nodes from the generated output.
  3. Update the global.inputPath parameter by providing the path of the exported-data directory present on the kubernetes cluster worker node in global.slaveNodeName.
    1. Ensure that the exported data is accessible by non-root users for read or write operation.
  4. Update the global.capacityStorage parameter by specifying the estimated amount of space required to occupy the collected data, for example, 2Gi, 200Mi, and so on.
    The value specified here is the space provided to kubernetes persistence volume that is mounted with this utility to enable collected data accessible to loader job.
  5. Update the global.elasticSearchURL parameter by specifying the URL for Elastic search.
    FQDN of Elastic search can also be provided. If Elastic search requires authentication, it can be provided in the URL as http://<user-name>:<password>@<elastic-search-url>:<elastic-search-port>.

    To find the FQDN, run kubectl get svc –n <namespace> and retrieve the Elastic search service name. After that, FQDN can be constructed as http://<elastic-search-service-name>.<namespace>:<port>. The default Elastic search port is 9200. The administrator of the cluster must be asked for the user name and password of Elastic search if required.

  6. Update the global.victoriaMetricsURL parameter by specifying the URL for the Victoria Metrics.
    FQDN of Victoria Metrics can also be provided.
6.1.1.1 loader-custom-values.yaml Parameter Description
The following table describes the parameters which can be customized while updating the loader-custom-values.yaml file.

Table 6-1 loader-custom-values.yaml Parameters

Parameter Description Default Value Range or Possible Value
global.image.repository Specifies the name of the docker registry that contains the cnc-nfdata-collector image. - -
global.inputPath Specifies the name of the Kubernetes slave that contains the exported-data/ directory.

Note: The path must include exported-data/.

/tmp -
global.slaveNodeName Specifies the name of the Kubernetes slave that stores the collected data, for example, the exported-data/ directory.

To obtain the name of the slave node or worker node, run the kubectl get nodes command. Then, provide the name of one of the worker nodes as mentioned in the Name column of the generated output.

- -
global.capacityStorage Specifies the amount of space that is utilized by the collected data, for example, 2Gi, 200Mi, and so on. 5Gi -
global.elasticSearchURL Provides the URL for Elastic search. FQDN of Elastic search can also be provided.
If Elastic search requires authentication, it can be provided in the URL as:
http://<user-name>:<password>@<elastic-search-url>:<elastic-search-port>
- -
global.victoriaMetricsURL Provides the URL for Victoria metrics. FQDN of Victoria metrics can also be provided. - -

Sample custom file

global:
  # Registry where cnc-nfdata-collector image present.
 image:
    repository: reg-1:5000

  # path on slave node where exported-data folder is present. path including the exported-data directory
 inputPath: /tmp/exported-data_2020-07-03_08:15:38

  #Mention the URL of elasticSearch here.
 elasticSearchURL: "https://elastic:r2qrkb46sx6hh5zk56wcrshr@10.178.246.56:30785"

 #Mention the URL of victoria here.
 victoriaMetricsURL: "http://10.178.246.56:32001"

 #Storage to be allocated to persistence
 capacityStorage: 5Gi

  #Name of the slave where fetched data has to be loaded
 slaveNodeName: k8s-slave-node-1

6.1.2 Loading the NF Logs, Metrics, Traces, Alerts Data

Create the YAML file as described in Creating or Updating the YAML File for the Loader Utility.
  1. Run the following commands to load the data:
    • For Helm 2:
      helm install ocnf-data-loader/ --name <helm-release> --namespace <k8s namespace> -f <loader_customized_values.yaml>
      Example:
      helm install ocnf-data-loader --name ocnf-data-loader --namespace ocnf-data-loader -f loader-custom-values.yaml
    • For Helm 3:
      helm install <helm-release> ocnf-data-loader/ --namespace <k8s namespace> -f <loader_customized_values.yaml>
      Example:
      helm install ocnf-data-loader ocnf-data-loader/ --namespace ocnf-data-loader -f loader-custom-values.yaml
      Where,
      • <helm-release> indicates the name provided by the user to identify the helm deployment.
      • <k8s namespace> indicates the name provided by the user to identify the kubernetes namespace of the utility. The job starts in this kubernetes namespace.
  2. Run the following command to check the status of the job:
    helm status <helm-release>
    Example:
    helm status ocnf-data-loader
  3. Run the following command to check the status of the pods:
    kubectl get pods -n <k8s namespace>

    Ensure that the Status column of all the pods must be Running and the Ready column of all the pods must be n/n, where n indicates the number of containers in the pod.

    Example:

    kubectl get pods -n ocnf-data-loader
    NAME                                      READY    STATUS    RESTARTS     AGE
    ocnf-data-loader-dsgsf643tr                3/3     Running     0          1m2s
  4. Run the following command to check the completion of the job:
    kubectl get pods -n <k8s namespace>

    Ensure that the Status column of all the pods must be Complete and the Ready column of all the pods must be 0/n, where n indicates the number of containers in the pod.

    Example:

    kubectl get pods -n ocnf-data-loader
    NAME                                      READY    STATUS     RESTARTS     AGE
    ocnf-data-loader-dsgsf643tr                0/3     Complete     0          3m2s
  5. Required: If you want to remove the job after it is complete, then run the following commands:
    • For Helm 2:
      helm del --purge <helm-release>

      Example:

      helm del --purge ocnf-data-loader
    • For Helm 3:
      helm uninstall <helm-release> -n <k8s namespace>

      Example:

      helm uninstall ocnf-data-loader -n ocnf-data-loader

6.1.3 Viewing the NF Logs, Metrics, and Traces

Perform the following procedure to view NF Logs, Metrics, and Traces.
  1. To view logs, do the following:
    1. Open the Kibana GUI that is integrated with Elastic search by using the Kibana URL.
    2. Provide the index pattern to scan the indices.
    3. Navigate to the Discover section to view the logs.
  2. Import the NF provided dashboards on Grafana to view metrics, otherwise follow these steps:
    1. Open the Grafana GUI that is integrated with Victoria Metrics by using the Grafana URL.
    2. Navigate to the Explore section and provide Prometheus as data source.
    3. Search for the required metrics in the Search box.
  3. To view traces, do the following:
    1. Open the Jaeger GUI that is integrated with Elastic search by using the Jaeger URL.
    2. Select the service name and operation that you want to view.

      Note:

      By default, Jaeger scans only the data of the past 3 days from Elastic search. If the data is older than 3 days, provide the --es.max-span-age parameter at the start of Jaeger. For example, --es.max-span-age 720h0m0s scans the data of the past 30 days.

6.1.4 Deleting the NF Logs, Traces, and Metrics

  1. Run the following command to delete logs and traces from internal Elastic Search:
    curl -X DELETE -k "http://<elastic-search-host>:<elastic-searchport>/_all" -H "Content-Type: application/json"

    Example:

    curl -X DELETE -k "https://elastic:76qt2b7rz87ms2cs6fmb2c4l@10.178.246.56:30731/_all" -H "Content-Type: application/json"
  2. Run the following command to delete metrics from internal Victoria Metrics:
    curl 'http://<victoria-metrics-URL>:<port>/api/v1/admin/tsdb/delete_series?match\[\]=<mertic-name>'

    Example:

    curl 'http://10.178.246.56:32001/api/v1/admin/tsdb/delete_series?match\[\]=http_requests_total'

    Note:

    To delete all the Victoria Metrics at once, run the kubectl delete pod <pod-name> -n <namespace> command.