Skip to content

Instantly share code, notes, and snippets.

@cransom
Last active October 17, 2017 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cransom/5fc5ec793e3f01377c889134057d5cba to your computer and use it in GitHub Desktop.
Save cransom/5fc5ec793e3f01377c889134057d5cba to your computer and use it in GitHub Desktop.
security.wrappers.fping = {
source = "${pkgs.fping.out}/bin/fping";
capabilities = "cap_net_raw+ep";
};
services.netdata = {
enable = true;
configText = ''
[global]
config directory = /etc/netdata
plugins directory = ${pkgs.netdata}/libexec/netdata/plugins.d
'';
};
systemd.services.netdata.path = [ pkgs.gawk pkgs.curl ];
environment.etc."netdata/fping.conf".text = ''
# uncomment the following line - it should already be there
fping="/run/wrappers/bin/fping"
# set here all the hosts you need to ping
# I suggest to use hostnames and put their IPs in /etc/hosts
hosts="nr1.mad.hubns.net petit.hubns.net"
# override the chart update frequency - the default is inherited from netdata
#update_every=1
# time in milliseconds (1 sec = 1000 ms) to ping the hosts
# 200 = 5 pings per second
ping_every=200
# other fping options - these are the defaults
fping_opts="-R -b 56 -i 1 -r 0 -t 5000"
'';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment