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

High CPU consumption by mailer handler #62

Open gandham-santhosh opened 7 years ago

gandham-santhosh commented 7 years ago

Hi, I am using sensu-plugins-mailer for alerts and notifications. I noticed that handler-mailer.rb is consuming 10 to 14% of CPU. I always see that sensu server CPU consumption is 100% as there are too many alert notifications. Can you please let me know if this is normal and what could be other alternatives? Following is the content in my handler.json

"infra_alert": { "type": "set", "handlers": [ "debug", "slack_infra_alerts", "mail_alert" ] }, "mail_alert": { "type": "set", "filters": [ "not_wip" ], "handlers": [ "mail_admin", "mail_at_team_api" ] }, "mail_admin": { "type": "pipe", "command": "handler-mailer.rb -j mailer_admin_team", "filters": [ "status_not_ok" ] },

gandham-santhosh commented 7 years ago

I see that 8 to 10 mailer handlers are getting initiated for every 3 to 5 seconds which is consuming 100% of CPU always. But I am not getting why it is initiating so many mailers threads. I really appreciate if someone help me understand