No description
  • Rust 92.4%
  • Nix 7.6%
Find a file
2023-05-18 17:23:50 +02:00
.github/workflows build for multiple architextures in ci 2021-12-12 16:00:56 +01:00
benches all stats are sync now 2021-03-28 22:33:01 +02:00
src windows stuff 2023-05-18 17:23:50 +02:00
.envrc allow disabling mdns 2022-07-12 14:57:24 +02:00
.gitignore allow disabling mdns 2022-07-12 14:57:24 +02:00
Cargo.lock windows stuff 2023-05-18 17:23:50 +02:00
Cargo.toml windows stuff 2023-05-18 17:23:50 +02:00
flake.lock prepare for windows impl 2023-05-17 22:55:01 +02:00
flake.nix windows stuff 2023-05-18 17:23:50 +02:00
palantir.service readme 2021-12-12 16:20:20 +01:00
README.md add docker permissions to readme 2021-12-12 16:28:36 +01:00

Palantir

System metrics exporter for prometheus

Exported metrics

  • cpu, memory, io, network and disk usage stats
  • zfs pool usage and arc stats
  • cpu and gpu temperature (gpu temps only for amd cards)
  • cpu power usage on modern amd and intel platforms
  • docker per-container cpu, memory and network stats

Usage

  • Download the binary for your architecture from the releases and place it at /usr/local/bin/palantir
  • Place the palantir.service file in /etc/systemd/system/
  • Create the palantir user: sudo useradd -m palantir
  • Start enable enable the server: sudo systemctl enable --now palantir
  • Metrics will be available at localhost:5665/metrics

Some stats require additional permissions described below.

Power monitoring permissions

In recent kernel versions, precise power monitoring is only accessible to root users to prevent using it as a side-channel attack. In order to get the power monitoring output you'll need to give the palantir user access to this data using the following steps.

  • Create a group using

    sudo groupadd powermonitoring
    
  • Create /etc/udev/rules.d/99-powermonitoring.rules with

    SUBSYSTEM=="powercap", ACTION=="add", RUN+="/bin/chgrp -R powermonitoring /sys%p", RUN+="/bin/chmod -R g=u /sys%p"
    SUBSYSTEM=="powercap", ACTION=="change", ENV{TRIGGER}!="none", RUN+="/bin/chgrp -R powermonitoring /sys%p", RUN+="/bin/chmod -R g=u /sys%p"
    
  • Apply the udev rules

    sudo udevadm control --reload-rules && sudo udevadm trigger
    
  • Add your user to the group

    sudo usermod -a -G powermonitoring palantir
    
  • Verify that you can read energy usage

    sudo su - palantir -c 'cat /sys/class/powercap/intel-rapl:0:0/energy_uj'
    

Docker monitoring permissions

To enable monitoring of docker containers, add the palantir user to the docker group

sudo usermod -a -G docker palantir