From 2f4a9c9d1ba4b42d3cb193f6ec10ceb718741c57 Mon Sep 17 00:00:00 2001 From: f Date: Sun, 19 Jun 2022 03:00:59 -0300 Subject: [PATCH] configure node for exporting network data --- tasks/post_install.yml | 1 + templates/etc/conf.d/node-exporter.j2 | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 templates/etc/conf.d/node-exporter.j2 diff --git a/tasks/post_install.yml b/tasks/post_install.yml index 5474a79..48ffc9b 100644 --- a/tasks/post_install.yml +++ b/tasks/post_install.yml @@ -59,6 +59,7 @@ - /etc/conf.d/iptables - /etc/conf.d/ip6tables - /etc/conf.d/tinc.networks + - /etc/conf.d/node-exporter - /etc/iptables/rules6-save - /etc/iptables/rules-save - /etc/ipset.d/blocklist4 diff --git a/templates/etc/conf.d/node-exporter.j2 b/templates/etc/conf.d/node-exporter.j2 new file mode 100644 index 0000000..abe3642 --- /dev/null +++ b/templates/etc/conf.d/node-exporter.j2 @@ -0,0 +1,7 @@ +# /etc/conf.d/node-exporter + +# Custom arguments can be specified like: +# +# ARGS="--web.listen-address=':9100'" + +ARGS="--collector.netstat.fields='^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*|TCPSynRetrans|TCPFastOpen(Active(Fail)?|Passive(Fail|AltKey)?|ListenOverflow|CookieReqd|Blackhole))|Tcp_(ActiveOpens|InSegs|OutSegs|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts|RcvbufErrors|SndbufErrors))$'"