In your given example, it is irrelevant.
Invisibility:
The spell ends for a target that attacks or casts a spell. roll20SRD
So, when the Fighter attacks, the invisibility spell ends and the glyph can cast the Hold Monster spell. So, the question becomes which is faster; the glyph or the fighter.
Glyph of Warding:
The spell being stored has no immediate effect when cast in this way. When the glyph is triggered, the stored spell is cast. roll20SRD
This wording is very similar to the Ready action for a spell. In regards to timing, Ready action states:
...take your reaction right after the trigger finishes.
Thus, The Fighter rushes in unseen, makes an attack with advantage and loses invisibility. Since the trigger is the attack, the Fighter gets to roll before the glyph can cast Hold Monster.
In the case that an attack doesn't end the invisibility; Glyph of Warding states (emphasis mine):
For glyphs inscribed within an object, the most Common triggers include opening that object, approaching within a certain distance of the object, or seeing or reading the glyph... If the spell has a target, it Targets the creature that triggered the glyph.
Since it states that a glyph within an object can target a creature outside, it suggests that Line of Sight does not apply to the glyph. The glyph has some other means to determine the trigger. Call it a blindsight for lack of a better term.
Note: Some might try to rule lawyer that "attemp" triggers before the attack. However in terms of plain English, an "attempt to hit" is an attack.