1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41: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',
:UNKNOWN => 'Unknown error/warning'
}
def log_type(text)
def log_type(text, debug_mode)
if text.include? 'ejabberd_odbc_sup'
:ejabberd_odbc_failure
elsif text.include? "mod_pubsub_odbc,'-unsubscribe"
@ -99,7 +99,7 @@ new_data.split("\n=").each { |report|
next unless type and time and text
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
end
}