rechargable batteries for uninterruptible power supply

karlok:
And if I have an always current flowing though the voltage divider and the analog input, what do you think, how much current is drawn?
Additionally, I am interested in the way of how to calculate the current drawn and the estimated life using what the battery says about its mAh ...

It's tough to exactly specify the relationship between charge level, battery capacity, current and voltage. There is a relationship there, but there are a million factors that affect it. I believe your battery type should be primary Alkaline AA cells. Googling around for Alkaline battery discharge curves, I get things like this: Discharge tests of Alkaline AA batteries 100mA to 2A

The take away from this is that the voltage/charge state is relatively linear until the battery is about 80% finished.
So where you set your threshold of acceptable charge is gonna be somewhere on this relatively flat part of the curve.

So, assuming R3=10K, R4=1K. Higher resistor values decrease the current drawn, AFAIK.
Battery full = 9V, i.e. 9V*1K/(10K+1K)=9V/11 =0.8V (analogRead = 164)
But how to calculate the current drawn ??

Current drawn is 9V / (10K + 1K) = 0.82mA

This is a quite light current draw -- probably 2% of what your project would draw. You get a better clue about the state of charge on alkaline cells if you place a load on them and look at the voltage they generate under load. At a guess, your project would draw a few dozen mA. Let's say 35 mA.

In order to place a load of 35mA on a 9V nominal battery, you would need a resistance of 260 ohms. To drop 9V nominal voltage into a 0..5V A2D input range, you need the centre of the divider around half way.

100R + 180R = 280R total, which would draw a current of 32mA -- pretty close.

Then 9.2V / 280R * 100R = 3.3V -- your maximum reading for fully charges batteries.