Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No data from systemd units in prometheus.exporter.unix #2497

Open
katt-999 opened this issue Jan 23, 2025 · 1 comment
Open

No data from systemd units in prometheus.exporter.unix #2497

katt-999 opened this issue Jan 23, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@katt-999
Copy link

katt-999 commented Jan 23, 2025

What's wrong?

Hello,

Actually running latest Alloy (v1.5.1) on a Virtual Machine.

This virtual machine is a test environment for the probable migration of node_exporter/promtail to Grafana Alloy. The linux distribution is FlatcarOS

Currently, I'm running the binary directly from the command line (see Steps to reproduce part)

During Alloy initialization, I don't see any mention for systemd from prometheus.exporter.unix (see log part).

Even from http://<virtual-machine-hostname>:12345/api/v0/component/prometheus.exporter.unix.local_system/metrics, we don't found any systemd data/metrics :
Image

Following attachment is the full output from prometheus.exporter.unix.local_system/metrics :
prometheus.exporter.unix.txt

Steps to reproduce

Inside a flatcar VM :

  1. Download v1.5.1 of Grafana Alloy archive and unzip it.
  2. on root user :
    # install <path to alloy binary> /opt/bin/alloy
  3. run directly alloy :
    # alloy run --storage.path=/var/lib/alloy/data config.alloy

System information

Linux dev-flatcar-vm-g2cxb 6.6.60-flatcar #1 SMP PREEMPT_DYNAMIC Mon Dec 9 13:56:20 -00 2024 x86_64 Intel(R) Xeon(R) CPU @ 2.20GHz GenuineIntel GNU/Linux

Software version

Grafana Alloy v1.5.1

Configuration

prometheus.exporter.unix "local_system" {
        systemd {
                task_metrics    = true
                start_time      = true
                enable_restarts = true
        }
}

prometheus.scrape "unix_metrics" {
        targets         = prometheus.exporter.unix.local_system.targets
        forward_to      = [prometheus.remote_write.metrics_service.receiver]
        scrape_interval = "10s"
}

prometheus.remote_write "metrics_service" {
        endpoint {
                url = "http://<my-prometheus-endpoint>:9090/api/v1/write"
        }
}

logging {
        level  = "debug"
        format = "logfmt"
}

Logs

s=2025-01-23T14:47:33.457527251Z level=info "boringcrypto enabled"=false
ts=2025-01-23T14:47:33.276148504Z level=info source=/go/pkg/mod/github.com/!kim!machine!gun/[email protected]/memlimit/memlimit.go:170 msg="memory is not limited, skipping: %v" package=github.com/KimMachineGun/automemlimit/memlimit !BADKEY="memory is not limited"
ts=2025-01-23T14:47:33.457642999Z level=info msg="no peer discovery configured: both join and discover peers are empty" service=cluster
ts=2025-01-23T14:47:33.457661529Z level=info msg="running usage stats reporter"
ts=2025-01-23T14:47:33.457678449Z level=info msg="starting complete graph evaluation" controller_path=/ controller_id="" trace_id=76d4615bcc7d30ac064f18d5348f8e65
ts=2025-01-23T14:47:33.457704286Z level=info msg="Parsed flag --collector.diskstats.device-exclude" component_path=/ component_id=prometheus.exporter.unix.local_system collector=diskstats flag=^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\d+n\d+p)\d+$
ts=2025-01-23T14:47:33.457723976Z level=info msg="Parsed flag --collector.filesystem.mount-points-exclude" component_path=/ component_id=prometheus.exporter.unix.local_system collector=filesystem flag=^/(dev|proc|run/credentials/.+|sys|var/lib/docker/.+)($|/)
ts=2025-01-23T14:47:33.457738871Z level=info msg="Parsed flag --collector.filesystem.fs-types-exclude" component_path=/ component_id=prometheus.exporter.unix.local_system collector=filesystem flag=^(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)$
ts=2025-01-23T14:47:33.457757048Z level=info msg="Enabled node_exporter collectors" component_path=/ component_id=prometheus.exporter.unix.local_system
ts=2025-01-23T14:47:33.457772462Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=arp
ts=2025-01-23T14:47:33.457781609Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=bcache
ts=2025-01-23T14:47:33.45779864Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=bonding
ts=2025-01-23T14:47:33.457814979Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=btrfs
ts=2025-01-23T14:47:33.457830407Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=conntrack
ts=2025-01-23T14:47:33.457841029Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=cpu
ts=2025-01-23T14:47:33.457850079Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=cpufreq
ts=2025-01-23T14:47:33.457859207Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=diskstats
ts=2025-01-23T14:47:33.457873887Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=dmi
ts=2025-01-23T14:47:33.457890062Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=edac
ts=2025-01-23T14:47:33.457904954Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=entropy
ts=2025-01-23T14:47:33.457919231Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=fibrechannel
ts=2025-01-23T14:47:33.457928771Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=filefd
ts=2025-01-23T14:47:33.457943142Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=filesystem
ts=2025-01-23T14:47:33.457958107Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=hwmon
ts=2025-01-23T14:47:33.457969166Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=infiniband
ts=2025-01-23T14:47:33.457977787Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=ipvs
ts=2025-01-23T14:47:33.457992576Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=loadavg
ts=2025-01-23T14:47:33.458006962Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=mdadm
ts=2025-01-23T14:47:33.458016704Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=meminfo
ts=2025-01-23T14:47:33.458051126Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=netclass
ts=2025-01-23T14:47:33.458060374Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=netdev
ts=2025-01-23T14:47:33.458069039Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=netstat
ts=2025-01-23T14:47:33.458077971Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=nfs
ts=2025-01-23T14:47:33.458089649Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=nfsd
ts=2025-01-23T14:47:33.458099395Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=nvme
ts=2025-01-23T14:47:33.458108211Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=os
ts=2025-01-23T14:47:33.458117376Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=powersupplyclass
ts=2025-01-23T14:47:33.458126491Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=pressure
ts=2025-01-23T14:47:33.458135346Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=processes
ts=2025-01-23T14:47:33.458144526Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=rapl
ts=2025-01-23T14:47:33.458152939Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=schedstat
ts=2025-01-23T14:47:33.458161599Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=selinux
ts=2025-01-23T14:47:33.458170972Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=sockstat
ts=2025-01-23T14:47:33.458182284Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=softnet
ts=2025-01-23T14:47:33.458196364Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=stat
ts=2025-01-23T14:47:33.458206502Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=tapestats
ts=2025-01-23T14:47:33.458218529Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=textfile
ts=2025-01-23T14:47:33.458230352Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=thermal_zone
ts=2025-01-23T14:47:33.458238875Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=time
ts=2025-01-23T14:47:33.45824876Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=timex
ts=2025-01-23T14:47:33.458258127Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=udp_queues
ts=2025-01-23T14:47:33.458285306Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=uname
ts=2025-01-23T14:47:33.458294186Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=vmstat
ts=2025-01-23T14:47:33.458309661Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=xfs
ts=2025-01-23T14:47:33.458324096Z level=info component_path=/ component_id=prometheus.exporter.unix.local_system collector=zfs
@katt-999 katt-999 added the bug Something isn't working label Jan 23, 2025
@katt-999
Copy link
Author

I forget to mention, with node_exporter, systemd metrics/data are available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant