Commit fa8ba1e3 authored by taggart's avatar taggart
Browse files

add comments to munin plugins about needing db access, stop overriding defaults file

parent 9e54fc9c
#!/bin/sh
#
# Plugin to monitor number of sympa lists
# NOTE: assumes user running has read access to the database, like by the
# munin user having a ~/.my.cnf that allows read-only access
#
#%# family=contrib
#%# capabilities=autoconf
......@@ -22,5 +24,5 @@ EOF
esac
cat <<EOF
lists.value `mysql --defaults-file=/etc/mysql/debian.cnf -s --batch --database=sympa --execute "select count(name_list) from list_table where status_list = 'open'"`
lists.value `mysql -s --batch --database=sympa --execute "select count(name_list) from list_table where status_list = 'open'"`
EOF
#!/bin/sh
#
# Plugin to monitor sympa spools
# NOTE: assumes user running has read access to the database, like by the
# munin user having a ~/.my.cnf that allows read-only access
#
#%# family=contrib
#%# capabilities=autoconf
......@@ -65,7 +67,7 @@ cd $SPOOLDIR >/dev/null 2>/dev/null || {
exit 1
}
mysql="mysql --defaults-file=/etc/mysql/debian.cnf -s --batch --database=sympa --execute"
mysql="mysql -s --batch --database=sympa --execute"
bulkspool_count=`$mysql "select count(*) from bulkspool_table"`
bulkspool_legit=`$mysql "select count(*) from bulkspool_table left join bulkmailer_table on bulkmailer_table.messagekey_bulkmailer=bulkspool_table.messagekey_bulkspool where bulkmailer_table.messagekey_bulkmailer IS NULL;"`
let "bulkspool_remaining = bulkspool_count - bulkspool_legit"
......
#!/bin/sh
#
# Plugin to monitor number of sympa subscribers
# NOTE: assumes user running has read access to the database, like by the
# munin user having a ~/.my.cnf that allows read-only access
#
#%# family=contrib
#%# capabilities=autoconf
......@@ -22,5 +24,5 @@ EOF
esac
cat <<EOF
subscribers.value `mysql --defaults-file=/etc/mysql/debian.cnf -s --batch --database=sympa --execute "select count(user_subscriber) from subscriber_table"`
subscribers.value `mysql -s --batch --database=sympa --execute "select count(user_subscriber) from subscriber_table"`
EOF
#!/bin/sh
#
# Plugin to monitor number of sympa users
# NOTE: assumes user running has read access to the database, like by the
# munin user having a ~/.my.cnf that allows read-only access
#
#%# family=contrib
#%# capabilities=autoconf
......@@ -22,5 +24,5 @@ EOF
esac
cat <<EOF
users.value `mysql --defaults-file=/etc/mysql/debian.cnf -s --batch --database=sympa --execute "select count(email_user) from user_table"`
users.value `mysql -s --batch --database=sympa --execute "select count(email_user) from user_table"`
EOF
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment