Merge pull request #4 from Freifunk-Troisdorf/master

Added Collectd stats for Tunneldigger Connections
This commit is contained in:
rojoka 2016-01-09 12:49:39 +01:00
commit 699116600e
2 changed files with 21 additions and 1 deletions

View File

@ -26,7 +26,13 @@ LoadPlugin processes
LoadPlugin users LoadPlugin users
LoadPlugin uptime LoadPlugin uptime
LoadPlugin interface LoadPlugin interface
LoadPugin filecount
<Plugin "filecount">
<Directory "/opt/freifunk/tunneldigger_interfaces">
Instance "tunneldigger-connections"
Name "l2tp1*"
</Directory>
</Plugin>
<Plugin write_graphite> <Plugin write_graphite>
<Carbon> <Carbon>
Host "10.188.1.27" Host "10.188.1.27"

14
files/collectd_td_stat.sh Normal file
View File

@ -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