sensu-plugins / sensu-plugins-mailer

This plugin is an email handler for Sensu.
http://sensu-plugins.io
MIT License
17 stars 37 forks source link

UTF-8 handling error. #34

Open kai101 opened 8 years ago

kai101 commented 8 years ago

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:ingsub': 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:inhandle'\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"] }