{question}
How to monitor license expiration date (Seconds_until_expiration) ?
{question}
{answer}
In case it is required to monitor license expiry, then Seconds_until_expiration value in the SHOW GLOBAL STATUS; is the option to go with, but most monitoring tools cannot specifically fetch variables from the SHOW GLOBAL STATUS; command but can fetch details from a table.
Variables related to license expiration:
license_expiration It gives the expiration date/time as Unix timestamp.
seconds_until_expiration It provides the seconds left to license expiry.
We can get the above details from the information_schema.mv_global_status
Below is the query which needed to be used for monitoring license expiry:
select variable_value as Seconds_until_expiration from information_schema.mv_global_status where variable_name = 'Seconds_until_expiration' and node_type = 'MA';
{answer}