You could keep an array of 50 unsigned long elements and store millis in the appropriate cell whenever the sensor sends a reading. Check for any that have too long an interval between millis and the stored time. Alternatively, create another web page that queries the database, displays the IDs of the non-responsive nodes and the mega can parse them out. What are you going to do when you detect a failure?
The question is then, whether the Arduino need be involved at all in the alerts. You could simply have a process on the web server that queries this info out of the database periodically and sends alerts when appropriate. Alternatively, you could run the check whenever the arduino sends a reading.I think I'd want the logic on the server - you'll need to keep track of when alerts were sent, unless you want to end up spamming the mailboxes of the lucky recipients.