Skip to content

cadvisor should be configurable to look for rootfs elsewhere #306

@james-callahan

Description

@james-callahan

Request

Currently the cadvisor component looks in the current root / for all the information it wants.

I believe we need to figure out how to get a true plumbed through to inHostNamespace in https://github.com/google/cadvisor/blob/2129e1c4fae8567551d1ac252c7a1dec27617e21/container/containerd/factory.go#L80C3-L80C18

Slack link: https://grafana.slack.com/archives/C01050C3D8F/p1699607777165129

Use case

I wish to monitor my talos system containerd instance (see https://www.talos.dev/v1.5/learn-more/components/#containerd)

Trying:

prometheus.exporter.cadvisor "system" {
  containerd_host      = "/run/containerd/containerd.sock"
  containerd_namespace = "system"
}

prometheus.scrape "system_cadvisor" {
  targets    = prometheus.exporter.cadvisor.system.targets
  forward_to = [prometheus.relabel.system_cadvisor.receiver]
}

prometheus.relabel "system_cadvisor" {
  rule {
    target_label = "job"
    replacement  = "integrations/cadvisor/system"
  }
  forward_to = [prometheus.relabel.cadvisor.receiver]
}

Did scrape my containers, but didn't fill in many fields in including e.g. id. I believe these need various mount points such as /sys to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions