Categories:

System functions (Information)

SYSTEM$REPORT_HEALTH_STATUS

Sends application health information from a consumer app to the provider account.

语法

SYSTEM$REPORT_HEALTH_STATUS( '<status>' )

实参

'status'

VARCHAR 类型的字符串字面量可指示应用程序的运行状况。您可以指定以下值中的一个:

  • 'OK': The consumer instance is healthy.
  • 'FAILED': The consumer instance is in an error state.
  • 'PAUSED': The consumer manually paused the app.

使用说明

  • This function is intended to be called by consumer applications. Your application should call this function periodically to report its health status to the provider account.
  • Your application logic determines what health status to report based on its own monitoring and error handling.
  • The health status reported by this function is visible to the provider account via the GET_HEALTH_STATUS function. You should call GET_HEALTH_STATUS periodically from the provider account to monitor the health of consumer instances. If you use a task or monitored task to call this function, ensure that the application has the correct privileges to run the task. Consider setting up alerts to notify you when a consumer instance reports a FAILED status, a PAUSED status, or stops reporting its status.
  • Snowflake only retains the most recent health status reported by each consumer instance of the application.
  • To avoid excessive load on Snowflake, this function is rate limited. If the function is called again within 55 minutes from the same consumer instance, it will return false to indicate that the status report was not accepted.
  • For more information about monitoring application health from the provider side, see Monitor a native app.

返回值

  • 如果运行状态报告成功,此函数返回 TRUE。
  • This function returns FALSE if the status report failed due to being rate limited.