As the information is stored in the back end database this would be difficult.
Your lua script would need to connect to the back end database run a query to check if the host is in maintenance.
then update the message as needed.
the potential problem with doing this is that if the script get hubng. IE waiting on response from your database all alarm processing will stop...
Support does not recommend making database connections in lua scripts...