# Gateway failover button

**URL:** <https://forum.inductiveautomation.com/t/gateway-failover-button/103249>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 4, 2025, 10:43pm UTC](https://forum.inductiveautomation.com/t/gateway-failover-button/103249 "2025-03-04T22:43:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![christophergammon29](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@christophergammon29](https://forum.inductiveautomation.com/u/christophergammon29)\
**Post date:** [March 4, 2025, 10:43pm UTC](https://forum.inductiveautomation.com/t/gateway-failover-button/103249/1 "2025-03-04T22:43:04Z")

</div>

Hi all,

I am trying to create a button in ignition perspective that will failover the gateway that is associated. I cannot get the button to send a message to the gateway and am kind of lost. Any ideas for this would be great. I have already created the button, my trouble is getting the event script for the button to send a message to the gateway to force failover.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 4, 2025, 10:45pm UTC](https://forum.inductiveautomation.com/t/gateway-failover-button/103249/2 "2025-03-04T22:45:53Z")

</div>

There's no documented way to do that.

---

<div class="post-metadata">

**Author:** ![christophergammon29](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@christophergammon29](https://forum.inductiveautomation.com/u/christophergammon29)\
**Post date:** [March 4, 2025, 10:50pm UTC](https://forum.inductiveautomation.com/t/gateway-failover-button/103249/3 "2025-03-04T22:50:40Z")

</div>

Are there any other ways to accomplish this other than having shift operators going into the gateway during off hours and failing the gateway over manually? Thank you for your response!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 4, 2025, 11:01pm UTC](https://forum.inductiveautomation.com/t/gateway-failover-button/103249/4 "2025-03-04T23:01:16Z")

</div>

Not that I'm aware of. Why are you failing over manually? I'd fix that first. (Perhaps with help from IA support.)

---

<div class="post-metadata">

**Author:** ![christophergammon29](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@christophergammon29](https://forum.inductiveautomation.com/u/christophergammon29)\
**Post date:** [March 4, 2025, 11:15pm UTC](https://forum.inductiveautomation.com/t/gateway-failover-button/103249/5 "2025-03-04T23:15:36Z")

</div>

We are failing over manually due to a controllogix PLC intermittently going into idle on our device connections. We tried to manually reconnect, then disable and re enable and this did not work. We ended up having to fail the gateway over. This was missed for two days due to values showing but they were not updating. We added the alarms for stale data on the PLCs but root cause has not been identified with controllogix yet. So long story short we just wanted an easy way for them to fail the gateway over without going into the gateway web interface itself.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 4, 2025, 11:24pm UTC](https://forum.inductiveautomation.com/t/gateway-failover-button/103249/6 "2025-03-04T23:24:09Z")

</div>

> [@christophergammon29](#):
>
> my trouble is getting the event script for the button to send a message to the gateway to force failover.

Scripts in Perspective are _already_ running on the gateway, so you don't have to do anything.

In theory, if your OS lets you, you could use `system.util.execute` to run `gwcmd` operations to restart the system or shut it down:

> **[system.util.execute | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-execute)**
>
> Executes the given commands via the operating system, in a separate process.

> **[Gateway Command-line Utility - gwcmd | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/gateway/gateway-command-line-utility-gwcmd#command-line-utility-gwcmd-options)**
>
> The Gateway Command-line Utility provides a list of commands you can use to perform specific functions in the Gateway. The Gateway Command-line Utility or gwcmd provides basic commands, such as resetting the main password, changing the Gateway's...

Definitely scares me to be swinging around a sledgehammer to swat a fly, but 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![christophergammon29](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@christophergammon29](https://forum.inductiveautomation.com/u/christophergammon29)\
**Post date:** [March 4, 2025, 11:26pm UTC](https://forum.inductiveautomation.com/t/gateway-failover-button/103249/7 "2025-03-04T23:26:44Z")

</div>

I will try this tomorrow. Are there other avenues you would suggest? Working through the root cause currently but this is a mission critical facility and stale values are a big problem, we failover then go to the redundant gateway.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 4, 2025, 11:29pm UTC](https://forum.inductiveautomation.com/t/gateway-failover-button/103249/8 "2025-03-04T23:29:36Z")

</div>

What Ignition version and what PLC firmware versions are involved? There's been many fixes in recent years.

(There's also my alternate driver..... \* _cough_ \*.)

---

<div class="post-metadata">

**Author:** ![christophergammon29](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@christophergammon29](https://forum.inductiveautomation.com/u/christophergammon29)\
**Post date:** [March 4, 2025, 11:30pm UTC](https://forum.inductiveautomation.com/t/gateway-failover-button/103249/9 "2025-03-04T23:30:32Z")

</div>

I will get this information tomorrow and reply back! Thank you for all of the suggestions and I will keep in touch!
