Murre is an on-demand, scaleable source of container resource metrics for K8s.

  • By groundcover
  • Last update: Jan 9, 2023
  • Comments: 16

Murre

murre

On demand Kubernetes metrics at scale

Read More »

slack

murre

What is Murre?

Murre is an on-demand, scaleable source of container resource metrics for K8s.

Murre fetchs CPU & memory resource metrics directly from the kubelet on each K8s Node. Murre also enriches the resources with the relevant K8s requests and limits from each PodSpec.

Why Murre?

Murre is a simple, stateless and minimilistic approach to K8s resource monitoring that works at any scale. Murre is free of any third-party dependencies, requiring nothing to be installed on the cluster.

Installing Murre

go install github.com/groundcover-com/murre@latest

Using Murre

  • Detect pods and containers with high CPU or memory utilization
murre --sortby-cpu-util
  • Find out how much of CPU and memory does a specific pod consumes
murre --pod kong-51xst
  • Focus on the resource consumption metrics in a specific namespace
murre --namespace production

Download

murre.zip

Comments(16)

  • 1

    [sc-5572] - added sort table by pod name functionality

    What this PR does / why we need it: Added sort by pod name functionality to murre, usage:

    murre --sortby-pod-name
    

    Which issue(s) this PR fixes: #17

    Special notes for your reviewer:

  • 2

    Error when auth-provider is oidc

    hi,

    when trying to use murre with a KUBECONFIG where the user has an auth-provider with name oidc i get

    ❯ murre --kubeconfig $KUBECONFIG
    panic: no Auth Provider found for name "oidc"
    
    goroutine 1 [running]:
    main.main()
            /home/usc/go/pkg/mod/github.com/groundcover-com/[email protected]/main.go:32 +0x112
    

    my KUBECONFIG looks like this:

    users:
      - name: userid
        user:
          auth-provider:
            config:
              client-id: XXXX
              client-secret: XXXX
              id-token: XXXX
              idp-certificate-authority: XXXX
              idp-issuer-url: XXXX
              refresh-token: XXXX
            name: oidc
    
  • 3

    502 Bad Gateway

    Describe the bug A clear and concise description of what the bug is.

    Error during setup

    To Reproduce Steps to reproduce the behavior:

    [[email protected] db]$ go install github.com/groundcover-com/[email protected]
    go: downloading gopkg.in/inf.v0 v0.9.1
    go: downloading gopkg.in/yaml.v3 v3.0.1
    go: downloading gopkg.in/yaml.v2 v2.4.0
    ../../../go/pkg/mod/k8s.io/[email protected]/pkg/api/resource/amount.go:23:2: unrecognized import path "gopkg.in/inf.v0": reading https://gopkg.in/inf.v0?go-get=1: 502 Bad Gateway
    	server response: Cannot obtain refs from GitHub: cannot talk to GitHub: Get https://github.com/go-inf/inf.git/info/refs?service=git-upload-pack: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
    ../../../go/pkg/mod/sigs.k8s.io/structured-merge-diff/[email protected]/value/value.go:26:2: unrecognized import path "gopkg.in/yaml.v2": reading https://gopkg.in/yaml.v2?go-get=1: 502 Bad Gateway
    	server response: Cannot obtain refs from GitHub: cannot talk to GitHub: Get https://github.com/go-yaml/yaml.git/info/refs?service=git-upload-pack: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
    ../../../go/pkg/mod/github.com/google/[email protected]/jsonschema/models.go:19:8: unrecognized import path "gopkg.in/yaml.v3": reading https://gopkg.in/yaml.v3?go-get=1: 502 Bad Gateway
    	server response: Cannot obtain refs from GitHub: cannot talk to GitHub: Get https://github.com/go-yaml/yaml.git/info/refs?service=git-upload-pack: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
    

    Desktop (please complete the following information):

    • OS: [e.g. iOS]

    Linux version 6.0.11-300.fc37.x86_64 ([email protected]) (gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4), GNU ld version 2.38-25.fc37) #1 SMP PREEMPT_DYNAMIC Fri Dec 2 20:47:45 UTC 2022 Fedora release 37 (Thirty Seven)

    [[email protected] ~]$ go version
    go version go1.19.3 linux/amd64
    
  • 4

    [sc-4559] - release action bugfix

    What this PR does / why we need it: go releaser command was: release --rm-dist . the . is redundant and caused failure on build, this pr removes it.

    Which issue(s) this PR fixes:

    Special notes for your reviewer:

  • 5

    [sc-5598] - updated project structure

    What this PR does / why we need it: In this PR we've changed the murre repo to use idiomatic golang package structure so users can run/import package for usage. We've also added cobra framework for more modern go cli.

    Special notes for your reviewer:

  • 6

    [sc-5375] - add gorelease and workflows

    What this PR does / why we need it: In this PR we've added github workflows for:

    • pr: for each PR we will build the project and fail if it won't, in the future we will want to run tests here as well.
    • release: on each new version tag the release workflow will run and build murre artifacts

    Which issue(s) this PR fixes: #9

    Special notes for your reviewer:

  • 7

    Maxlevin/sc 5314/remove unwanted output when using murre help

    What this PR does / why we need it: In pflag pkg, when user uses --help but there is no help flag defined the library returns pflag.ErrHelp error and exits.

    Output before the change:

    Usage of murre:
          --container string    filter by container
          --interval duration   seconds to wait between updates (default '5s') (default 5s)
          --kubeconfig string   (optional) absolute path to the kubeconfig file (default "/home/max/.kube/config")
          --namespace string    filter by namespace
          --pod string          filter by pod
          --sortby-cpu          sort by cpu
          --sortby-cpu-util     sort by cpu utilization
          --sortby-mem          sort by memory
          --sortby-mem-util     sort by memory utilization
    pflag: help requested
    exit status 2
    

    Output after the change:

    Usage: murre [options]
          --container string    filter by container
          --help                show help
          --interval duration   seconds to wait between updates (default '5s') (default 5s)
          --kubeconfig string   (optional) absolute path to the kubeconfig file (default "/home/max/.kube/config")
          --namespace string    filter by namespace
          --pod string          filter by pod
          --sortby-cpu          sort by cpu
          --sortby-cpu-util     sort by cpu utilization
          --sortby-mem          sort by memory
          --sortby-mem-util     sort by memory utilization
    

    Which issue(s) this PR fixes:

    • #7

    Special notes for your reviewer:

    • none
  • 8

    [sc-5307] - add support to all auth providers in k8s clientset

    What this PR does / why we need it: oidc auth provider support was missing when creating k8s clientset, so in this pr we've added:

    _ "k8s.io/client-go/plugin/pkg/client/auth"
    

    which imports all auth providers plugins, so we will now support:

    • azure
    • exec
    • gcp
    • oidc
    • openstack

    Which issue(s) this PR fixes: #11

    Special notes for your reviewer:

  • 9

    [sc-5313] - Added pr template

    What this PR does / why we need it: This PR adds this PR template to all new PRs starting now

    Which issue(s) this PR fixes:

    • none

    Special notes for your reviewer:

    • none
  • 10

    [sc-5305] - added kubeconfig env support

    What this PR does / why we need it: This PR adds $KUBECONFIG env support, we will override the default ~/.kube/config

    Which issue(s) this PR fixes: #5

    Special notes for your reviewer:

  • 11

    Sort by pod name

    Is your feature request related to a problem? Please describe. It looks that by default sorting is done by one of the default already existing sorting flag by utilization that changes the order of the displayed list. If I wish to just get a feel of the scope of pods I am looking at I prefer them in alphabetical order.

    Describe the solution you'd like Please add sort by pod name option. Flag ie: --sortby-name

    Please close if such sorting already exists and my apologies for making noise. Many thanks,

  • 12

    fix isse #24 - Show errors on pgm startup

    What this PR does / why we need it:

    It shows the error when murre command throws an exception.

    Which issue(s) this PR fixes:

    Fix isse #24

    Special notes for your reviewer:

  • 13

    Show errors on pgm startup

    Describe the bug Show the errors and not the command help if the arguments are missing or correct and the runtime throws.

    To Reproduce Steps to reproduce the behavior:

    1. Stop your minikube (or whatever k8s you use)
    2. Start murre
    3. See the command help instead of the actual error

    Expected behavior The actual exception should be reported to the output: showing the command arguments help is misleading when there is no usage error in the command line itself!

  • 14

    Fix empty screen issue #5 for multi-container pods

    What this PR does / why we need it:

    Extract metrics multi-container pods

    Which issue(s) this PR fixes:

    Please, follow all my comments under this issue.

    Special notes for your reviewer: Any other tree traversal method would work better than the current silent skipping.

  • 15

    Improve the install method of `murre`

    It feels somewhat "let me contribute to murre"/"this is for developers" like ... when one have to use go install ... to install murre on ones system. It would be great if it was possible to install murre itself with e.g. brew < which should work across Linux and MacOS at least. And then potentially chocolately on Windows.

    Especially it can be time consuming and cumbersome for newbies and first timers as go is a needed prerequisite in the go install ... >> to get murre flow.

    Plz think about it and thank you.

  • 16

    FEATURE REQUEST: `workload/Pod` side-by-side comparison to `node` sage

    Reading the initial release blog post on murre ( Murre - the lightweight K8s metrics monitoring tool ) it seems to me that murre is already getting the needed metrics relative to each individual node on the Kubernetes cluster being monitored. Making it possible to potentially get....:

    The following great feature:

    • To be able to view the Pod resource usage on e.g. let's say the left side of murre and on the right side then have a nodes view.
      • Further, expanding on the above. Making it possible in murre to make the view focused in on/be relative to a specific Pod/workload => so one can see how much of the total resources the specific Pod/workload is using relative to the node it's running on.
      • Along the same lines. Scoped to all Pods on a specific node. Make it possible to view the resource consumption of the cardinal set of Pods running on a node/each node. So how many resources do the node have left for more Pods.

    The goal is to be able to get a level of understanding on resource scarcity/overall consumption currently taking place on a cluster.

    I hope I'm making sense in the above and thank you for a great tool.

    😄