I am using my own handler with command running on python. The handler is executed with checks. But the handler is running on only one node out of three node cluster. The node where the handler is executed has high cpu utilization. But rest other two node has no effect of handler. Any solution to execute checks with handler on all nodes without affecting CPU utilization ?
The sensu backend that receives and event will be the backend that handles the event. The best way to balance the load across sensu-backend services is to balance the number of agents connected to each.
Start with making sure all the agents have all of your sensu-backends listed in their
backend_url configuration array. Agents will shuffle that list prior to connection in an effort to equal the connection load.
After that to start looking at using an external etcd cluster and have your sensu-backends act as etcd clients. And put a load balancer in front of your sensu backends for agent connection load balancing.
Hope this helps.
In my case, the checks are executed from proxy server. Is that the reason , the handler is executed on only one node of sensu cluster ?
That could be the reason.
If you are using a simple proxy check configuration without making use of the round-robin to spread the proxy checks across multiple agents, then yes all the proxy checks will be handled by the single backend the agent is connected to.