using Arduino with UPS


I'm thinking of using arduino to detect if/when the "mains" -led switches off. Can i run the arduino using a 12V power-supply off the UPS outlet? What I'm trying to ask is, can i just plug the + going to the led into an Arduino input? or do I need to connect the arduino's ground into the Led's ground? Would be easier the first way.
Thx beforehand.

No idea - that LED is in some piece of equipment? What piece of equipement? The UPS? Is
that equipment isolated from mains voltage? sure that "LED" isn't a neon bulb directly on
the mains?

UPS's often have a serial connection, or maybe a status line - that's a good way to talk to them.

Hi. Yes by UPS i meant an Uninterruptible power supply. The led is just a light emitting diode showing the status of the mains power supply. No power - no light. It does have a serial port, but connecting that to an arduino just seems a lot more work than just soldering two wires in place of the led. I quess what i'm asking is whether or not the earth potential is the same if the arduino is powered from one of the outputs of the UPS and the led from the UPS's internal power supply?


ps. Sorry for all the typos. I'm not a native speaker/writer.