Configuring cluster logging to use Fusion Data Foundation

Configure Fusion Data Foundation as storage for the Fusion Data Foundation cluster logging.

About this task

Note: You can obtain all the logs when you configure logging for the first time in Fusion Data Foundation. However, after you uninstall and reinstall logging, the old logs are removed and only the new logs are processed.

Before you begin

Ensure you have the following:
  • You have administrative access to OpenShift Web Console.
  • Fusion Data Foundation Operator is installed and running in the openshift-storage namespace.
  • Cluster logging Operator is installed and running in the openshift-logging namespace.

Procedure

  1. Go to Administration > Custom Resource Definitions.
  2. From the Custom Resource Definitions page, click ClusterLogging.
  3. From the Custom Resource Definition Overview page, select View Instances. from the Actions menu.
    Alternatively, click the Instances tab.
  4. From the Cluster Logging page, click Create Cluster Logging.
    A refresh might be necessary to load the data.
  5. In the YAML, replace the storageClassName with the storageclass that uses the provisioner openshift-storage.rbd.csi.ceph.com.
    In the following example, the name of the storageclass is ocs-storagecluster-ceph-rbd.
    apiVersion: "logging.openshift.io/v1"
    kind: "ClusterLogging"
    metadata:
      name: "instance"
      namespace: "openshift-logging"
    spec:
      managementState: "Managed"
      logStore:
        type: "elasticsearch"
        elasticsearch:
          nodeCount: 3
          storage:
            storageClassName: ocs-storagecluster-ceph-rbd
            size: 200G  # Change as per your requirement
          redundancyPolicy: "SingleRedundancy"
      visualization:
        type: "kibana"
        kibana:
          replicas: 1
      curation:
        type: "curator"
        curator:
          schedule: "30 3 * * *"
      collection:
        logs:
          type: "fluentd"
          fluentd: {}
    If you have tainted the Fusion Data Foundation nodes, you must add toleration to enable scheduling of the daemonset pods for logging.
    spec:
    [...]
      collection:
        logs:
          fluentd:
            tolerations:
            - effect: NoSchedule
              key: node.ocs.openshift.io/storage
              value: 'true'
          type: fluentd
  6. Click Save.

What to do next

  1. Verify that the Persistent Volume Claims are bound to the elasticsearch pods.
    1. Go to Storage > Persistent Volume Claims.
    2. Set the Project dropdown to openshift-logging.
    3. Verify that Persistent Volume Claims are visible with a state of Bound, attached to elasticsearch-* pods.
      Figure 1. Cluster logging created and bound
      Screenshot of Persistent Volume Claims with a bound state attached to elasticsearch pods
  2. Verify that the new cluster logging is being used.
    1. Click Workload > Pods.
    2. Set the Project to openshift-logging.
    3. Verify that the new elasticsearch-* pods appear with a state of Running.
    4. Click the new elasticsearch-* pod to view pod details.
    5. From Volumes verify that the elasticsearch volume has a Type that matches your new Persistent Volume Claim. For example, elasticsearch-elasticsearch-cdm-9r624biv-3.
    6. Click the Persistent Volume Claim name and verify the storage class name in the PersistentVolumeClaim Overview page.
Note:
  • Make sure to use a shorter curator time to avoid PV full scenario on PVs attached to Elasticsearch pods.
    You can configure Curator to delete Elasticsearch data based on retention settings. It is recommended that you set the following default index data retention of 5 days as a default.
    config.yaml: |
        openshift-storage:
          delete:
            days: 5
    For more information about Elasticsearch, see Logging within the Red Hat OpenShift Container Platform product documentation.
  • To uninstall the cluster logging backed by Persistent Volume Claim, use the procedure removing the cluster logging operator from Fusion Data Foundation in the uninstall chapter of the respective deployment guide.