Ignition Gateway DOWN alarm

I’m trying to figure out a way to get an emailed alert if my Ignition Gateway goes down for some reason, but it has to be more than just a server down condition like a ping; I want to know the Gateway application is running. The trick is trying to use Ignition itself to send this alarm…doesn’t seem possible if the Gateway if offline! It seems like the trick to get this to work will be to set up a notification that it WAS down if it comes back up; that doesn’t help us know when its crashed/erred/frozen/etc but it does at least tell us that something happened. Is there a script of some kind that can do this?

You could maybe send a message from windows when the Ignition Gateway service faults?

I had that thought too, but the team I work on is stuck on the idea of using the Ignition “alarm pipeline” to send the alert due to concerns about consistency in our alerting structure.

You can use Gateway Startup Scripts to run some code after the gateway has started back up again - but your initial suggestion is totally correct; if the Ignition service crashes then there’s no way for Ignition to send out a notification of that event.

1 Like

Without knowing anything about them (yet), “Gateway Startup Scripts” is probably exactly what I’m after. Thanks for the tip, I’ll educate myself on the topic.

Here’s the script that I’ve been using for a long time to do the same thing. Drop this in a Shutdown Gateway Event Script, and modify for your needs:

import time
now = time.strftime("%c")
body = "I shut down @ %s" % now
recipients = ["my email address"]
system.net.sendEmail(smtpProfile="CityEmail", fromAddr="we have a SCADA email account", subject="Going down!", body=body, html=0, to=recipients)

I also have a very similar one on a Startup script to alert me when it comes back up.

3 Likes

Thanks @hamlinjr, that works perfectly!

Beware! That’ll only work if it goes down deliberately. If it crashes, you won’t get any notice.

1 Like

I would use something like statping to keep track of server uptime and to notify you of downtime.

1 Like

I ended up additionally setting up a gateway network between two gateways. Each gateway monitors the “GatewayRunning” tag of the other gateway and sends out an email if the tag is false.