Open jobezic opened 8 years ago
Out of interest we have a collectd script that looks a bit like this:
#!/bin/sh
HOSTNAME="${COLLECTD_HOSTNAME:-`hostname`}"
INTERVAL="${COLLECTD_INTERVAL:-10}"
while sleep "$INTERVAL"
do
for f in /var/run/chilli.*.sock;
do
tap=$(chilli_query -s $f route | grep dev: | awk '{print $4}')
connected_clients=$(chilli_query -s $f list | wc -l)
current_sessions=$(chilli_query -s $f list | grep pass | wc -l)
echo "PUTVAL \"$HOSTNAME/coovachilli-$tap/current_connections\" interval=$INTERVAL N:$connected_clients"
echo "PUTVAL \"$HOSTNAME/coovachilli-$tap/current_sessions\" interval=$INTERVAL N:$current_sessions"
done
done
snmpd plugin will be good for it
Add collectd statistics (to enable with an option in config) for users in pass, dnat in real time.