Health Check API Configuration

MetaDefender ICAP Server version 5.1.1 or newer

Health check API feature supports you to verify MetaDefender ICAP Server application readiness.

The readiness condition is determined via product configurations, see more at Configure health check policy.

Using the health check API

Health check API expects to return HTTP(S) 200 Successful only when all pre-configured conditions met.

Request:

MethodURLAuthFunction
GET/readyzNoneHeath check endpoint

Request query params :

NameTypeDetailRequired
verboseBooleanShow detailed result of health checkno

Response status code:

HTTP status codeDescription
200Healthy. ICAP service is fully up and running, and ready for process request
503Not healthy. ICAP service is not ready to handle any request yet or got issues
500ICAP service is down. Internal Server Error

Response body (only response when verbose enabled)

Json elementtypeDescriptionSupport from
databaseobjectDatabase connection5.1.1
statusstringDatabase connection status true/false
license5.1.1
statusstring

License status

expired,invalid,ok

server_profilesThe status of server profiles5.2.1
requiredBooleanIndicate whether the status of server profiles checking affects the final result or not
statusBoolean

The connection status between the ICAP Server and the Scan Server (MD-Core, MD-Cloud)

  • true: healthy
  • false: unhealthy
enginesobjectThe status of ICAP Server's engines5.10.0
engines.filetypeobjectThe status of the FileType engines5.10.0
requiredBooleanIndicate whether the status of the FileType engine checking affects the final result or not
statusBoolean

The status of the FileType engine

  • true: healthy
  • false: unhealthy

Example:

request
Copy
respond
Copy

Configure health check policy

You are supported to adjust thresholds on vital criterias as your own policy tailored for heath check verification, via both REST API and MetaDefender ICAP Server management console.

Using UI

The relevant settings could be found under "Settings" page.

ValueDescriptionSupport from
Enable Health CheckOn / OffEnabling this option will allow MetaDefender ICAP Server automatically run a background task to collect application operational data for health check logic.5.1.1
Check Server ProfilesOn / OffDefines if server profile availability should be considered for health status.5.2.1
Condition

Defines when to report unhealthy status:

- "Any profile is unavailable": If any profile is unavailable, report unhealthy.

- "All profiles are unavailable": Only report unhealthy if all profiles are unavailable.

Check FileType EngineOn / OffIf true, the FileType engine availability will be included in the health check evaluation.5.10.0

Using administrative REST API

Get setting heath check

Request:

MethodURLAuthFunction
GET/admin/config/healthcheckAdministratorHeath check endpoint

Response Body:

  • enable_feature enable or disable this feature

  • database: true - always enable when enabled enable_feature

  • license: true - always enable when enabled enable_feature

  • server_profiles

    • enable enable or disable this feature
    • config
      • check_all_rules:
        • true : /readyz will return status code 503 if ALL MD Core rules are not available (mean: all MD Core connect to ICAP are down or ALL MD Core rules are deleted from MD Core)
        • false : /readyz will return status code 503 if ALL MD Core rules are not available (mean: all MD Core connect to ICAP are down or ALL MD Core rules are deleted from MD Core)
  • engines

    • filetype
      • enable enable or disable this feature

Example:

JSON
Copy

Set setting heath check

Request:

MethodURLAuthFunction
POST/admin/config/healthcheckAdministratorSet setting heath check

Request headers

KeyValue
apikeyAdministrator's API Key

Request body:

  • enable_feature enable or disable this feature

  • server_profiles

    • enable enable or disable this feature (default: false)
    • config
      • check_all_rules: (default: false)
        • true : /readyz will return status code 503 if ALL MD Core rules are not available (mean: all MD Core connect to ICAP are down or ALL MD Core rules are deleted from MD Core)
        • false : /readyz will return status code 503 if ALL MD Core rules are not available (mean: all MD Core connect to ICAP are down or ALL MD Core rules are deleted from MD Core)
  • engines

    • filetype
      • enable enable or disable this feature (default: false)

Example:

JSON
Copy

From ICAP Server 5.2.1 the core_rules and core_rules.config have been replaced by server_profiles to make the API more friendly. The core_rules and core_rules.config still responds in the API for backward compatibility purposes, but we do not recommend using it.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated