mirror of
https://codeberg.org/icewind/palantir.git
synced 2026-06-03 18:24:08 +02:00
fmt
This commit is contained in:
parent
1e2a7c2c8b
commit
2f5cc229f3
5 changed files with 67 additions and 60 deletions
17
README.md
17
README.md
|
|
@ -13,7 +13,9 @@ Opinionated system metrics exporter for prometheus
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
- Download the binary for your architecture from the [releases](https://github.com/icewind1991/palantir/releases/) and place it at `/usr/local/bin/palantir`
|
- Download the binary for your architecture from the
|
||||||
|
[releases](https://github.com/icewind1991/palantir/releases/) and place it at
|
||||||
|
`/usr/local/bin/palantir`
|
||||||
- Place the [palantir.service](palantir.service) file in `/etc/systemd/system/`
|
- Place the [palantir.service](palantir.service) file in `/etc/systemd/system/`
|
||||||
- Create the `palantir` user: `sudo useradd -m palantir`
|
- Create the `palantir` user: `sudo useradd -m palantir`
|
||||||
- Start enable enable the server: `sudo systemctl enable --now palantir`
|
- Start enable enable the server: `sudo systemctl enable --now palantir`
|
||||||
|
|
@ -23,8 +25,10 @@ Some stats require additional permissions described below.
|
||||||
|
|
||||||
## Power monitoring permissions
|
## 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 recent kernel versions, precise power monitoring is only accessible to root
|
||||||
In order to get the power monitoring output you'll need to give the `palantir` user access to this data using the following steps.
|
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
|
- Create a group using
|
||||||
|
|
||||||
|
|
@ -59,7 +63,8 @@ In order to get the power monitoring output you'll need to give the `palantir` u
|
||||||
|
|
||||||
## Docker monitoring permissions
|
## Docker monitoring permissions
|
||||||
|
|
||||||
To enable monitoring of docker containers, add the `palantir` user to the `docker` group
|
To enable monitoring of docker containers, add the `palantir` user to the
|
||||||
|
`docker` group
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo usermod -a -G docker palantir
|
sudo usermod -a -G docker palantir
|
||||||
|
|
@ -67,4 +72,6 @@ sudo usermod -a -G docker palantir
|
||||||
|
|
||||||
## Windows support
|
## Windows support
|
||||||
|
|
||||||
Palantir has limited windows support out of the box, additional sensors can be enabled by running [LibreHardwareMonitor](https://github.com/LibreHardwareMonitor/LibreHardwareMonitor).
|
Palantir has limited windows support out of the box, additional sensors can be
|
||||||
|
enabled by running
|
||||||
|
[LibreHardwareMonitor](https://github.com/LibreHardwareMonitor/LibreHardwareMonitor).
|
||||||
|
|
|
||||||
13
flake.nix
13
flake.nix
|
|
@ -10,7 +10,8 @@
|
||||||
inputs.flakelight.follows = "flakelight";
|
inputs.flakelight.follows = "flakelight";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
outputs = { mill-scale, ... }: mill-scale ./. {
|
outputs = {mill-scale, ...}:
|
||||||
|
mill-scale ./. {
|
||||||
packages.palantir = import ./package.nix;
|
packages.palantir = import ./package.nix;
|
||||||
|
|
||||||
crossTargets = [
|
crossTargets = [
|
||||||
|
|
@ -22,11 +23,11 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
nixosModules = {outputs, ...}: {
|
nixosModules = {outputs, ...}: {
|
||||||
default =
|
default = {
|
||||||
{ pkgs
|
pkgs,
|
||||||
, config
|
config,
|
||||||
, lib
|
lib,
|
||||||
, ...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [./module.nix];
|
imports = [./module.nix];
|
||||||
config = lib.mkIf config.services.palantir.enable {
|
config = lib.mkIf config.services.palantir.enable {
|
||||||
|
|
|
||||||
12
module.nix
12
module.nix
|
|
@ -1,12 +1,12 @@
|
||||||
{ config
|
{
|
||||||
, lib
|
config,
|
||||||
, pkgs
|
lib,
|
||||||
, ...
|
pkgs,
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.services.palantir;
|
cfg = config.services.palantir;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.services.palantir = {
|
options.services.palantir = {
|
||||||
enable = mkEnableOption "Enables the palantir service";
|
enable = mkEnableOption "Enables the palantir service";
|
||||||
|
|
||||||
|
|
|
||||||
13
package.nix
13
package.nix
|
|
@ -1,10 +1,9 @@
|
||||||
{ stdenv
|
{
|
||||||
, rustPlatform
|
stdenv,
|
||||||
, coreutils
|
rustPlatform,
|
||||||
, lib
|
coreutils,
|
||||||
,
|
lib,
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
inherit (lib.sources) sourceByRegex;
|
inherit (lib.sources) sourceByRegex;
|
||||||
inherit (builtins) fromTOML readFile;
|
inherit (builtins) fromTOML readFile;
|
||||||
src = sourceByRegex ./. ["Cargo.*" "(src|benches)(/.*)?"];
|
src = sourceByRegex ./. ["Cargo.*" "(src|benches)(/.*)?"];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue