1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

Fixed an error in ejabberd_scanlog plugin

This commit is contained in:
Artem Sheremet 2012-02-28 02:31:32 +03:00
parent 23eac3fd95
commit 6b3012f8d7

View file

@ -55,7 +55,7 @@ LABELS = {
:other_sql_cmd_timeout => 'Other sql_cmd timeout', :other_sql_cmd_timeout => 'Other sql_cmd timeout',
:UNKNOWN => 'Unknown error/warning' :UNKNOWN => 'Unknown error/warning'
} }
def log_type(text) def log_type(text, debug_mode)
if text.include? 'ejabberd_odbc_sup' if text.include? 'ejabberd_odbc_sup'
:ejabberd_odbc_failure :ejabberd_odbc_failure
elsif text.include? "mod_pubsub_odbc,'-unsubscribe" elsif text.include? "mod_pubsub_odbc,'-unsubscribe"
@ -99,7 +99,7 @@ new_data.split("\n=").each { |report|
next unless type and time and text next unless type and time and text
log_info[type] = (log_info[type] || 0) + 1 log_info[type] = (log_info[type] || 0) + 1
if sub_type = log_type(text) if sub_type = log_type(text, debug_mode)
log_info[sub_type] = (log_info[sub_type] || 0) + 1 log_info[sub_type] = (log_info[sub_type] || 0) + 1
end end
} }