From c0732dd3c8a57fbcd39282e6031c7db2e2b7fb8f Mon Sep 17 00:00:00 2001 From: stebifan Date: Sat, 9 Jan 2016 12:33:20 +0100 Subject: [PATCH 1/2] Added collectd tunneldigger Interfaces --- files/collectd.conf.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/files/collectd.conf.j2 b/files/collectd.conf.j2 index 2b18d36..cda8c26 100644 --- a/files/collectd.conf.j2 +++ b/files/collectd.conf.j2 @@ -26,7 +26,13 @@ LoadPlugin processes LoadPlugin users LoadPlugin uptime LoadPlugin interface - +LoadPugin filecount + + + Instance "tunneldigger-connections" + Name "l2tp1*" + + Host "10.188.1.27" From c2f8c109f5ff9aef2c5f48e5446181b21e637b53 Mon Sep 17 00:00:00 2001 From: stebifan Date: Sat, 9 Jan 2016 12:33:59 +0100 Subject: [PATCH 2/2] Create collectd_td_stat.sh --- files/collectd_td_stat.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 files/collectd_td_stat.sh diff --git a/files/collectd_td_stat.sh b/files/collectd_td_stat.sh new file mode 100644 index 0000000..a8de947 --- /dev/null +++ b/files/collectd_td_stat.sh @@ -0,0 +1,14 @@ +#!/bin/bash +#Check if foldes exists +if ! [ -d /opt/freifunk/tunneldigger_interfaces ]; then +mkdir /opt/freifunk/tunneldigger_interfaces +fi +#Remove old Interfaces +rm /opt/freifunk/tunneldigger_interfaces/* +#Create Interace files +for i in `/usr/local/sbin/batctl if | grep l2tp1`; +do + touch /opt/freifunk/tunneldigger_interfaces/$i +done +#Remove Active file +rm /opt/freifunk/tunneldigger_interfaces/active