97, rodeo starts randomly

I have a 97 rodeo with 80,000 miles recently I was driving and it appeared as if I was losing power, headlights, were dimming and the battery meter was reading very low volts. I got home turned it off and went to re-start
it nothing happened no noise. next morning go to start it, starts right up. Next few times I drive no problem. Today I go to start it I and get a loud clicking noise but the engine is not turning, after keeping the key cranked the sound stops and its like I have a dead battery. I can wait a little while and get the same response. All the lights and radio work so I am getting some power from the battery, there is no check engine light or any other warning signs. What should I look for? Thanks for your help Any suggestion would be wonderful
Ps.The only other thing I can think of is the last time I drove it before it didnít start the courtesy lights were acting up (working, not working), I donít know if this has anything to do with the problem but I thought I would mention it.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file

Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.