Does a spellcaster know when concentration ends?

Does a spellcaster know when concentration ends on one of their spells?

For example, when a wizard casts invisibility, that target is invisible until they attack or after one hour. So if the character attacks and the spell ends is the wizard aware that their spell that they are concentrating on ended earlier than expected?