
The top combinator should be powered by the accumulators of the system being monitored. The bottom combinator is always powered.
The top one is set to YELLOW * -1 and outputs YELLOW. The bottom one is set to YELLOW + 1 and outputs YELLOW. The connections are what they look like (red wire connects top combinator input, bottom combinator input, and bottom combinator output).
Run a green wire out from the top combinator and a red wire out from the bottom (or a green wire out from both), and the sum of YELLOW on the two circuits will be 1 when the power is OK and >1 when the power is out.
The lamp is not necessary, it is just an example. The lamp here is set to YELLOW > 1 and lights up when the power is out.
You can use a decider to translate that to whatever signal you need.
The idea is that the bottom combinator is a counter, and the top combinator always outputs its negative value as long as it has power. The reason for using a counter is to keep a signal change happening constantly, which requires power. So while there is power the sum of the two outputs will be 1 (it's 1 not 0 because it takes a tick for the value to be computed, but that's not important here). When there is no longer power, the top combinator stops updating, and so the sum of the two outputs becomes a count of the number of ticks since the power went out.
When monitoring accumulators it's pretty clean cut. If monitoring the main system, insufficient power will cause the top accumulator to slow down, so the output sum will reset more and more slowly until it stops resetting.