`jhack debug-log`: your new unified logging panel for k8s charming

This command is only available starting from jhack 0.4.4.

Since already a week went by without a new developer tool, I spent last Friday to hack together a shiny addition to jhack.

If you develop charms on kubernetes, you know the pain of monitoring the pebble logs for all the services you’re managing: ssh into the unit, run pebble <service> logs… And if the image of a container you are deploying does not support ssh, you need to tinker with an obscure PEBBLE_SOCKET envvar…

No more!

Run jhack debug-log myapp/0 and savour the eye-candy. The example below is a snapshot for a tempo-coordinator-k8s unit on my local machine:

What you are seeing:

  • on the left, the filtered juju debug-log for the unit
  • on the right:
    • at the top, the pebble logs for the “nginx” service in the “nginx” container
    • below, the the pebble logs for the “nginx” service in the “nginx-prometheus-exporter” container
    • at the bottom: a neat little tree overview of the various pebble log streams (and the status of the services that generate them).

For more configuration and documentation, look at the CLI help!

If you have suggestions about log streams that you would like to show in jhack debug-log, let me know! Would you like a syslog panel for machine charms? Can do! Open a feature request on the repo and we’ll see what we can do :slight_smile:

Otherwise, happy hacking!

8 Likes

Do you know that I love you?

2 Likes

image

2 Likes