Use monitoring for an app¶
This topic describes how providers can monitor consumer app health for a Snowflake Native App.
Monitor consumer application health¶
Your application can report its health status to Snowflake, which allows you to monitor the health of consumer instances of your app.
To report health status, your app uses the system-defined
SYSTEM$REPORT_HEALTH_STATUS(VARCHAR) function, passing in the health status
as an enum value:
OK: The consumer instance is healthy.FAILED: The consumer instance is in an error state.PAUSED: The consumer manually paused the app.
You can use the LAST_HEALTH_STATUS and LAST_HEALTH_STATUS_UPDATED_ON fields
of the APPLICATION_STATE view
to monitor the health of consumer instances of your app. The LAST_HEALTH_STATUS
field has the most recent value passed in by the app running in the consumer account.
The following code sample demonstrates using the APPLICATION_STATE view to retrieve the health status of all consumer instances of your app:
The preceding query may return results similar to the following: