Status Check Extension

Status Check Extension

Extension Description

Checks the status of various resources that the service depends on. This status check can be used for both telnet’s status command and hosting’s status page.

Extension Interface

org.apache.dubbo.common.status.StatusChecker

Extension Configuration

  1. <dubbo:protocol status="xxx,yyy" />
  2. <!-- Default value setting. When the <dubbo:protocol> does not have a status attribute configured, this configuration is used -->
  3. <dubbo:provider status="xxx,yyy" />

Known Extensions

  • org.apache.dubbo.common.status.support.MemoryStatusChecker
  • org.apache.dubbo.common.status.support.LoadStatusChecker
  • org.apache.dubbo.rpc.dubbo.status.ServerStatusChecker
  • org.apache.dubbo.rpc.dubbo.status.ThreadPoolStatusChecker
  • org.apache.dubbo.registry.directory.RegistryStatusChecker
  • org.apache.dubbo.rpc.config.spring.status.SpringStatusChecker
  • org.apache.dubbo.rpc.config.spring.status.DataSourceStatusChecker

Extension Example

Maven project structure:

  1. src
  2. |-main
  3. |-java
  4. |-com
  5. |-xxx
  6. |-XxxStatusChecker.java (implements StatusChecker interface)
  7. |-resources
  8. |-META-INF
  9. |-dubbo
  10. |-org.apache.dubbo.common.status.StatusChecker (plain text file, content: xxx=com.xxx.XxxStatusChecker)

XxxStatusChecker.java:

  1. package com.xxx;
  2. import org.apache.dubbo.common.status.StatusChecker;
  3. public class XxxStatusChecker implements StatusChecker {
  4. public Status check() {
  5. // ...
  6. }
  7. }

META-INF/dubbo/org.apache.dubbo.common.status.StatusChecker:

  1. xxx=com.xxx.XxxStatusChecker

Feedback

Was this page helpful?

Yes No

Last modified September 30, 2024: Update & Translate Overview Docs (#3040) (d37ebceaea7)