Anybody have ideas for how to write a bash script to test if a stream is alive or up?
Maybe this is what you're looking for?:
There are some issues with that approach, such as bandwidth, and/or notification latency. Probably a custom Wowza module that would monitor the stream on the server side would be the best way to deal with problem streams.
For example, this IMediaStreamActionNotify2 example will report when a stream appears stalled.