[smuxi: 1/3] munin: munin plugin for smuxi-feed-stats
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi: 1/3] munin: munin plugin for smuxi-feed-stats
- Date: Sat, 13 Jun 2015 00:30:39 +0000 (UTC)
commit a8fa4338caade7d72b2ea2af02eb2820a848581c
Author: Mirco Bauer <meebey meebey net>
Date: Sat Jun 13 00:23:27 2015 +0200
munin: munin plugin for smuxi-feed-stats
build/munin-plugins/smuxi-feed-stats-users | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/build/munin-plugins/smuxi-feed-stats-users b/build/munin-plugins/smuxi-feed-stats-users
new file mode 100644
index 0000000..97db675
--- /dev/null
+++ b/build/munin-plugins/smuxi-feed-stats-users
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+if [ "$1" = "autoconf" ]; then
+ echo yes
+ exit 0
+fi
+
+if [ "$1" = "config" ]; then
+
+ echo 'graph_title Smuxi Stats'
+ echo 'graph_vlabel users / day'
+ echo 'graph_args --base 1000 -l 0'
+ echo 'graph_scale no'
+ echo 'unique_ips.label news feed unique IPs'
+ echo 'channel_users.label \#smuxi channel users'
+ exit 0
+fi
+
+UNIQUE_IPS=$(grep IPs /home/meebey/smuxi-feed-stats.out | cut -d ':' -f 2)
+UNIQUE_IPS=$(echo $UNIQUE_IPS)
+CHANNEL_USERS=$(tail -n 1 /home/meebey/smuxi-channel-stats.out | cut -d ':' -f 4)
+CHANNEL_USERS=$(echo $CHANNEL_USERS)
+echo "unique_ips.value $UNIQUE_IPS"
+echo "channel_users.value $CHANNEL_USERS"
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]