# Using a main agent for check running and others as fallback

**URL:** <https://discourse.sensu.io/t/using-a-main-agent-for-check-running-and-others-as-fallback/2502>\
**Category:** Sensu Go\
**Created:** [March 16, 2021, 1:30pm UTC](https://discourse.sensu.io/t/using-a-main-agent-for-check-running-and-others-as-fallback/2502 "2021-03-16T13:30:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eldingsson](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/eldingsson/32/586_2.png) [@Eldingsson](https://discourse.sensu.io/u/Eldingsson)\
**Post date:** [March 16, 2021, 1:30pm UTC](https://discourse.sensu.io/t/using-a-main-agent-for-check-running-and-others-as-fallback/2502/1 "2021-03-16T13:30:36Z")

</div>

Is there any way I can configure a check to be run by one agent every time and fallback to other agents only if the “master” is down? For example, say I’m trying to monitor which pods in a Kubernetes cluster are not running and send the result to Telegram. I have 3 nodes that can do that but I don’t want all 3 of them to run the check and receive 3 messages from 3 different nodes on Telegram. Instead, I would like to have one agent always monitoring these pods and only use one of the remaining agents if the “master” aka node one becomes unavailable.  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![calebhailey](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/calebhailey/32/46_2.png) [@calebhailey](https://discourse.sensu.io/u/calebhailey)\
**Post date:** [March 16, 2021, 3:47pm UTC](https://discourse.sensu.io/t/using-a-main-agent-for-check-running-and-others-as-fallback/2502/2 "2021-03-16T15:47:28Z")

</div>

Hey @Eldingsson 👋 - great question! What you’re looking for is called round robin check scheduling.

[https://docs.sensu.io/sensu-go/latest/observability-pipeline/observe-schedule/checks/#round-robin-checks](https://docs.sensu.io/sensu-go/latest/observability-pipeline/observe-schedule/checks/#round-robin-checks)

It doesn’t work exactly how you described (it’s not an IFTTT style scheduler), but it does guarantee that only one agent out of pool of agents will execute a check.

I hope this helps!

---

<div class="post-metadata">

**Author:** ![Eldingsson](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/eldingsson/32/586_2.png) [@Eldingsson](https://discourse.sensu.io/u/Eldingsson)\
**Post date:** [March 16, 2021, 5:16pm UTC](https://discourse.sensu.io/t/using-a-main-agent-for-check-running-and-others-as-fallback/2502/3 "2021-03-16T17:16:44Z")

</div>

Thanks for your reply @calebhailey 😁 that is exactly what I am using at the moment but I will still get messages on my Telegram if the problem isn’t solved when the next agent performs the check as it will see that the last time it ran the check the status was OK, which will be allowed on my filter and trigger a message to be sent to Telegram.  
So there’s no such thing that makes the check work exactly as I tried to describe?

---

<div class="post-metadata">

**Author:** ![calebhailey](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/calebhailey/32/46_2.png) [@calebhailey](https://discourse.sensu.io/u/calebhailey)\
**Post date:** [March 16, 2021, 9:17pm UTC](https://discourse.sensu.io/t/using-a-main-agent-for-check-running-and-others-as-fallback/2502/4 "2021-03-16T21:17:54Z")

</div>

I’m not sure if I’m following. Round robin checks are best used with the `proxy_entity_name` attribute, prompting Sensu to associate the check result with a common entity rather than the agent entity which executed the check.

See here for more information:

[https://docs.sensu.io/sensu-go/latest/observability-pipeline/observe-schedule/checks/#proxy-entity-name-attribute](https://docs.sensu.io/sensu-go/latest/observability-pipeline/observe-schedule/checks/#proxy-entity-name-attribute)

Does that help?
