Rhyme in Arabic poetry is the most professional in the world. Arabs added rhyme as a primary condition to the poetry, and spreaded to the world from the 7th century. Arabic rhyme starts from the vowel before the penultimate consonant in the end of verse to the last consonant. It's condition affects 6 letters.
The grammar is only affected if the poet needs to eliminate or add a vowel when it is not the case ideally. The quality of a poets work is affected by the amount of grammatical rules broken in order to preserve the rhyme.
In Arabic poetry specially gazzalle it's first verse called as matla has end rhym which means two words with same rhym as in English heroic couplet and afterwards comes another line known as misra followed by another line which has the matching rhyming word like of matla and moreover gazzalle is composed in single meter that's called as Baher.