Netdata: Difference between revisions

From NixOS Wiki
imported>MrVanDalo
Created page with " [https://www.netdata.cloud/ netdata] is a metrics tool, which comes with a lot of sane preconfiguration. It contains of various plugins, which need to be enabled sometimes w..."
 
imported>MrVanDalo
add toc
Line 1: Line 1:
__TOC__


[https://www.netdata.cloud/ netdata] is a metrics tool, which comes with a lot of sane preconfiguration.
[https://www.netdata.cloud/ netdata] is a metrics tool, which comes with a lot of sane preconfiguration.

Revision as of 05:46, 26 September 2022

netdata is a metrics tool, which comes with a lot of sane preconfiguration.

It contains of various plugins, which need to be enabled sometimes with additional effort.

Python Plugins

nvidia-smi

To enable the nvidia-smi plugin you have to make sure nvidia-smi can be called by netdata.

systemd.services.enable = true;
systemd.services.netdata.path = [pkgs.linuxPackages.nvidia_x11];
services.netdata.configDir."python.d.conf" = pkgs.writeText "python.d.conf" ''
  nvidia_smi: yes
'';

samba

To enable samba plugin a lot of things need to be done.

Still I could not make samba to work, because systemd services seem to be forbidden to run sudo. Please update if you are able to make it work.

systemd.services.enable = true;
services.netdata.configDir."python.d.conf" = pkgs.writeText "python.d.conf" ''
  samba: yes
'';

# add samba and sudo to path of python plugin
systemd.services.netdata.path = [ pkgs.sudo pkgs.samba ];

# permit to run sudo smbstatus -P
security.sudo.extraConfig = ''
  netdata ALL=(root) NOPASSWD: ${pkgs.samba}/bin/smbstatus
'';
# as documented here : https://learn.netdata.cloud/docs/agent/collectors/python.d.plugin/samba
# but seem not to work
systemd.services.netdata.serviceConfig.CapabilityBoundingSet = ["~"];