#!/bin/sh # munin plugin to monitor the number of logged in users # and the number of hosts they're spread across on a windows domain. # uses output dump of "net sess" from the domain controller. # (c) 2011 jon@jon.bpa.nu #%# family=manual SESSIONS="/srv/pub/kram/dud" case $1 in config) cat <\*\+=\|\\/\?,]" { if(length($2)>=2) ua[tolower($2)] } $1 !~ "\:" { ha[$1] } END{ print "users.value",length(ua); print "hosts.value",length(ha) }' 2>/dev/null