grafana: more things
All checks were successful
Build and Deploy / deploy (push) Successful in 2m38s
All checks were successful
Build and Deploy / deploy (push) Successful in 2m38s
1. Smoothed out power draw - UPS only reports on 9 watt intervals, so smoothing it out gives more relative detail on trends 2. Add jellyfin integration - Good for seeing correlations between statistics and jellyfin streams 3. intel gpu stats - Provides info on utilization of the gpu
This commit is contained in:
40
services/jellyfin-annotations.nix
Normal file
40
services/jellyfin-annotations.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
service_configs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
systemd.services.jellyfin-annotations = {
|
||||
description = "Jellyfin stream annotation service for Grafana";
|
||||
after = [
|
||||
"network.target"
|
||||
"grafana.service"
|
||||
];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.python3}/bin/python3 ${./jellyfin-annotations.py}";
|
||||
Restart = "always";
|
||||
RestartSec = "10s";
|
||||
LoadCredential = "jellyfin-api-key:${config.age.secrets.jellyfin-api-key.path}";
|
||||
DynamicUser = true;
|
||||
StateDirectory = "jellyfin-annotations";
|
||||
NoNewPrivileges = true;
|
||||
ProtectSystem = "strict";
|
||||
ProtectHome = true;
|
||||
PrivateTmp = true;
|
||||
RestrictAddressFamilies = [
|
||||
"AF_INET"
|
||||
"AF_INET6"
|
||||
];
|
||||
MemoryDenyWriteExecute = true;
|
||||
};
|
||||
environment = {
|
||||
JELLYFIN_URL = "http://127.0.0.1:${toString service_configs.ports.private.jellyfin.port}";
|
||||
GRAFANA_URL = "http://127.0.0.1:${toString service_configs.ports.private.grafana.port}";
|
||||
STATE_FILE = "/var/lib/jellyfin-annotations/state.json";
|
||||
POLL_INTERVAL = "30";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user