mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-31 21:33:43 +00:00
- have some dirs
This commit is contained in:
parent
0b089ea777
commit
08346aac58
687 changed files with 0 additions and 0 deletions
25
plugins/network/windows_domain
Executable file
25
plugins/network/windows_domain
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/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 <<CFG
|
||||
graph_title windows domain
|
||||
graph_vlabel users/hosts
|
||||
graph_category network
|
||||
users.label users
|
||||
hosts.label hosts
|
||||
CFG
|
||||
exit 0;;
|
||||
esac
|
||||
|
||||
tail -n+5 "$SESSIONS" | head -n-2 | awk '$2 !~ "[\[\]\(\)\:;\"<>\*\+=\|\\/\?,]" { if(length($2)>=2) ua[tolower($2)] }
|
||||
$1 !~ "\:" { ha[$1] }
|
||||
END{ print "users.value",length(ua);
|
||||
print "hosts.value",length(ha) }' 2>/dev/null
|
Loading…
Add table
Add a link
Reference in a new issue