Hamstring problems...any advice?

Hi all,
I am a mid-40’s female with a re-occuring tender hamstring issue on one leg. I seemed to have tweaked it racing a spring triathlon last summer…then it got better with stretching, using foam roller, raced IM with no problems and then tweaked it again running on the track last week. It doesn’t bother me on the bike. I am gearing up for another IM and wondering if I should pull the plug on the race. I can run with it…it is manageable running. Anyone else had this issue? I believe it is caused by my lower back/hips being out of line?

KK
Meow