Modify Heapster logging verbosity

Solution Unverified - Updated

Environment

  • Red Hat OpenShift Enterprise
    • 3.1 - 3.11

Issue

  • Whats wrong with heapster?
  • How do I enable debug logging for heapster?
  • I need more information from the heapster pod
  • Heapster logging level is too high
  • How to reduce the logging level for heapster?

Resolution

LEVEL Description
3 Standard Logs
4 Debug
6 Display Requested Resources
7 HTTP Request Headers
8 (MAX) HTTP Request Content

- To modify the verbosity of logging for the heapster component, you will need to modify the replicationController (RC) and add an additional container command. - You can [manually](#manual) edit the RC `oc edit rc heapster` and add that to the file or use the following command to drop it into place:
oc patch rc heapster -p '{"spec":{"template":{"spec":{"containers":[{"command":"--vmodule=*=<LEVEL>"}]}}}}'
  • After you add this environment variable you should scale your heapster pod down to 0 and then back up to 1.
oc scale rc --replicas=0 heapster
oc scale rc --replicas=1 heapster

Manual steps to add the debug logs

  • First, Edit heapster's replicationController:
oc edit rc heapster
  • Next, Add vmodule:
    • Add - --vmodule=*=<LEVEL> under the spec.containers.command.
      (e.g)
    spec:
      containers:
      - command:
         ... snip ...
        - --vmodule=*=<LEVEL>
  • Finally, Scale re-deploy heapster pod by scale down/up.
oc scale rc --replicas=0 heapster
oc scale rc --replicas=1 heapster
SBR
Components
Category

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.