# Setting variables using runtime api

**URL:** <https://discourse.haproxy.org/t/setting-variables-using-runtime-api/9602>\
**Category:** Help!\
**Created:** [March 10, 2024, 3:42am UTC](https://discourse.haproxy.org/t/setting-variables-using-runtime-api/9602 "2024-03-10T03:42:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sameergn](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sameergn](https://discourse.haproxy.org/u/sameergn)\
**Post date:** [March 10, 2024, 3:42am UTC](https://discourse.haproxy.org/t/setting-variables-using-runtime-api/9602/1 "2024-03-10T03:42:43Z")

</div>

I am trying to use a variable to fail haproxy health checks  
`monitor fail if { var(proc.is_healthy) eq 0 }`

We run 4 HAProxy processes. When I send command to set is\_healthy to 0, then health checks from some processes still return 200, I have to repeatedly set variable to zero hoping that it has been set to zero in all child processes.

Is it possible to send command to each child process?

---

<div class="post-metadata">

**Author:** ![sameergn](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sameergn](https://discourse.haproxy.org/u/sameergn)\
**Post date:** [March 11, 2024, 5:32am UTC](https://discourse.haproxy.org/t/setting-variables-using-runtime-api/9602/2 "2024-03-11T05:32:31Z")

</div>

HAProxy Version 2.4.17
