Enable RedHat Openshift Logging plugin using CLI

Solution Verified - Updated -


  • RedHat Openshift Container Platform
    • 4.x
  • RedHat Openshift Logging
    • 5.x


  • How can RedHat Openshift Logging plugin be enabled using CLI ?
  • Step 5 of this Deploying the LokiStack documentation mentions enabling Openshift Logging plugin using webconsole. How can this be achieved using CLI?


  • As per Deploying the LokiStack documentation, Openshift Logging plugin, i.e. logging-view-plugin is only available on OpenShift Container Platform 4.10 and later. The logging-view-plugin should appear automatically with cluster-logging-operator version >= 5.5 installed and with lokistack as a default log-store. If in case it has been disabled, the below oc patch command helps enable the same:

    $ oc patch consoles.operator.openshift.io cluster   --patch '{ "spec": { "plugins": ["logging-view-plugin"] }  }' --type=merge
    $ oc get consoles.operator.openshift.io cluster -o json | jq -r .spec.plugins
      "logging-view-plugin"                      <---------- this means that the plugin is enabled

Diagnostic Steps

  • Check the current status of logging-view-plugin. Below output shows that this plugin hasn't been enabled.

    $ oc get consoles.operator.openshift.io cluster -o json | jq -r .spec.plugins
      ""                               <---------this shows there aren't any plugins configured yet                         

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.