Skip to content

node_systemd_unit_state metric is missing on /metrics endpoint #3228

@saimanoj90

Description

@saimanoj90

Host operating system:

Linux edge-***** 5.14.21-150500.55.59-default #1 SMP PREEMPT_DYNAMIC Thu Apr 18 12:59:33 UTC 2024 (e8ae24a) x86_64 x86_64 x86_64 GNU/Linux

node_exporter version:
node_exporter, version 1.8.2 (branch: HEAD, revision: f1e0e83)
build user: root@03d440803209
build date: 20240714-11:53:45
go version: go1.22.5
platform: linux/amd64
tags: unknown

node_exporter command line flags

/bin/node_exporter --path.procfs=/host/proc
--path.sysfs=/host/sys --path.rootfs=/host/root
--path.udev.data=/host/root/run/udev/data
--web.listen-address=[0.0.0.0]:9100 --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
--collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$ --collector.systemd.unit-include=k3s.service,stylus-agent.service,stylus-operator.service,sshd.service,systemd-resolved.service,systemd-journald.service,kdump.service,rsyslog.service,firewalld.service,chronyd.service,systemd-networkd.service,systemd-sysctl.service,systemd-logind.service,logrotate.service
--collector.systemd

Are you running node_exporter as a container?

Yes, running as a pod in k3s cluster with hostPID: true and hostNetwork: true (effectively running on host)

What did you do that produced an error?
edge-XX:~ # curl -s http://127.0.0.1:9100/metrics | grep -v "#" | grep node_systemd
node_systemd_system_running 0
node_systemd_units{state="activating"} 0
node_systemd_units{state="active"} 1176
node_systemd_units{state="deactivating"} 0
node_systemd_units{state="failed"} 1
node_systemd_units{state="inactive"} 100
node_systemd_version{version="249.17+suse.218.g2cb4d40f1c"} 249.17

What did you expect to see?

I expect node_systemd_unit_state metric to be exported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions