summaryrefslogtreecommitdiffstats
path: root/munin/authentic_count_cmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'munin/authentic_count_cmd.py')
-rw-r--r--munin/authentic_count_cmd.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/munin/authentic_count_cmd.py b/munin/authentic_count_cmd.py
new file mode 100644
index 0000000..b36acac
--- /dev/null
+++ b/munin/authentic_count_cmd.py
@@ -0,0 +1,13 @@
+from django.db import connection
+from django.contrib.auth import get_user_model
+from authentic2_auth_fc.models import FcAccount
+
+User = get_user_model()
+
+total_user_count = User.objects.filter(userexternalid__isnull=True, ).count()
+total_logged_count = User.objects.filter(userexternalid__isnull=True, last_login__isnull=False).count()
+fc_count = FcAccount.objects.all().count()
+
+print 'total_count.value', total_user_count
+print 'total_logged_count.value', total_logged_count
+print 'fc_count.value', fc_count