Custom Haproxy exporter

Hi All,

I want to collect haproxy stats from the haproxy socket running on a target server. I am trying to collect the periodic data in the CSV format in a text file. The data format is as shown below :

galera-front-1,FRONTEND,0,0,4096,0,0,0,0,0,0,OPEN,1,7,0,0,0,0,0,0,0,0,0,0,0,0,tcp,0,0,0,0,0,

galera-back,test1_galera_container-4f8adffd,0,0,0,0,0,0,0,0,0,0,0,0,UP,1,1,0,0,0,19207,0,1,8,1,0,2,0,0,L7OK,200,23,0,0,-1,OK,0,0,0,0,Layer7 check passed,1,1,1,10.50.22.193:3306,tcp,

galera-back,test2_galera_container-32191bb1,0,0,0,0,0,0,0,0,0,0,0,0,UP,1,0,1,0,0,19207,0,1,8,2,0,2,0,0,L7OK,200,25,0,0,-1,OK,0,0,0,0,Layer7 check passed,2,2,3,10.50.22.200:3306,tcp,

galera-back,test3_galera_container-c29e68a8,0,0,0,0,0,0,0,0,0,0,0,0,UP,1,0,1,0,0,19207,0,1,8,3,0,2,0,0,L7OK,200,26,0,0,-1,OK,0,0,0,0,Layer7 check passed,2,2,3,10.50.21.74:3306,tcp,

galera-back,BACKEND,0,0,0,0,410,0,0,0,0,0,0,0,0,0,UP,1,1,2,0,19207,0,1,8,0,0,1,0,0,0,0,0,0,0,0,-1,0,0,0,0,tcp,leastconn,


How do I push these CSV text files to be read by prometheus ? Later I want to show the status of each backend as UP or DOWN in Grafana. Please help me as I am a novice in this area.
Any useful information appreciated.

Thanks
GK