diff --git a/plugins/ejabberd/ejabberd_scanlog/ejabberd_scanlog b/plugins/ejabberd/ejabberd_scanlog/ejabberd_scanlog index f18ab68e..e821871b 100755 --- a/plugins/ejabberd/ejabberd_scanlog/ejabberd_scanlog +++ b/plugins/ejabberd/ejabberd_scanlog/ejabberd_scanlog @@ -65,6 +65,13 @@ LABELS = { :system_ports_limit => 'System limit hit: ports', # check with length(erlang:ports())., set in ejabberdctl config file :system_limit => 'Other system limit hit', # processes? check with erlang:system_info(process_count)., erlang:system_info(process_limit)., set in ejabberdctl cfg :generic_server_terminating => 'Generic server terminating', + :mnesia_table_shrinked => 'Mnesia table shrinked', + :admin_access_failed => 'Admin access failed', + :mysql_sock_timedout => 'MySQL sock timedout', + :config_error => 'Configuration error', + :vcard_error => 'Strange vCard error (vhost)', + :mnesia_overload => 'Mnesia is overloaded', + :mysql_init_recv_failed => 'MySQL: init failed recv data', :UNKNOWN => 'Unknown error/warning' } def log_type(text) @@ -104,6 +111,20 @@ def log_type(text) :system_limit elsif text.include?('Generic server') and text.include?('terminating') :generic_server_terminating + elsif text.include?('shrinking table') + :mnesia_table_shrinked + elsif text.include?('Access of') and text.include?('failed with error') + :admin_access_failed + elsif text.include?('mysql_') and text.include?(': Socket') and text.include?('timedout') + :mysql_sock_timedout + elsif text.include?('{badrecord,config}') + :config_error + elsif text.include?('error found when trying to get the vCard') + :vcard_error + elsif text.include?('Mnesia is overloaded') + :mnesia_overload + elsif text.include?('mysql_conn: init failed receiving data') + :mysql_init_recv_failed else warn "Cannot parse text: #{text}" if $debug_mode :UNKNOWN @@ -128,7 +149,7 @@ File.open(CACHE_FILE, 'w') { |f| f.write log_info.to_yaml } unless $debug_mode if ARGV.first == 'config' puts < +# + +#%# family=auto +#%# capabilities=autoconf + +TCPSTAT=/proc/net/tcp case $1 in + autoconf) + [ -r $TCPSTAT -o -r ${TCPSTAT}6 ] && echo "yes" || echo "no" + ;; config) - cat <