On your management server run cpstat -f log_server mg which will show all connected gateways, when the logging connections were first established and the receive rate. Shouldn't be too hard to script something that runs this command every so often and alerts you if a gateway is not shown.
In regards to those older gateways no longer sending logs, the easiest way to rectify is killing the fwd daemon on the problematic gateway and letting it respawn. Assuming there are not problems with the log reception mechanism on the SMS I've found this will fix most logging problems, especially on pre-R77 gateways.
Attend my 60-minute "Be your Own TAC: Part Deux" Presentation
Exclusively at CPX 2025 Las Vegas Tuesday Feb 25th @ 1:00pm