sensu-plugins/sensu-plugins-mailer

UTF-8 handling error.

kai101 opened this issue · 0 comments

I have a chinese windows server which send error message in chinese by the OS.

input:
'check_winping' 不是内部或外部指令,也不是可运行的程序或批处理文件

error on handle:
{ handle: { "type": "pipe", "command": "handler-mailer.rb", "name": "email_handler" }, "output": ["/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-0.3.1/bin/handler-mailer.rb:143:in gsub': invalid byte sequence in UTF-8 (ArgumentError)\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-0.3.1/bin/handler-mailer.rb:143:in build_body'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-0.3.1/bin/handler-mailer.rb:169:in handle'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.3.0/lib/sensu-handler.rb:57:in block in <class:Handler>'\n"] }