The concept of Lagna seems to have existed during the times of Ramayana. There seems to be some shlokas in Ayodhya Kanda which mentions Lord Ramato be born in Cancer Lagna. Sage Valmiki, the celebrated composer of the Ramayana, records the birth of Rama in Uttarayana (the Divine Half-year), in the Chaitra month, in the bright fortnight, on the ninth day, in the Punarvasu Nakshatra, on a Monday, and under Karka lagna. Valmiki further details the birth with various planetary positions in the zodiac
The epics some how appears to follow the Vedic path. They give us the feel that there existed a system of predictive astrology based on planetary divisions, before the zodiac systems. The astrology dealt in these two huge epics is in tune with that of Vedic knowledge.
The Mahabharata states that a singularly ominous pair of eclipses occurred in - Thirteen days - some time before the war in Kurukshetra. The Bhishma Parva and Udyoga Parva parts of Mahabharata mention some astrological descriptions and warnings just before the Mahabharata war. There is also a description of the draught with several planetary arrangements. A reference about two eclipses, occurrence of solar eclipse and lunar eclipse creating a rare thirteen day lunar fortnight.
Dhritarashtra has told, "Saturn oppresses rohini, some evil is foreboded, O King." And immediately after that, the war started where cousins killed one another. There are references to omens and Jyotish graha positions, in the Bhisma Parva section of the Mahabharata.
The Indian epics deal with astrology not as comprehensively and perfectly as depicted in Skanda Hora (Nirayana Predictive astrology) and Surya sidhanta (Nirayana astronomy). The epics have astral references but it is a section which needs thorough exploration.