ARTIFACTORY: How to use Artifactory Health Check

ARTIFACTORY: How to use Artifactory Health Check

Products
Frog_Artifactory
Content Type
User_Guide
AuthorFullName__c
Haritha Arumugam
articleNumber
000005497
FirstPublishedDate
2022-12-11T11:09:03Z
lastModifiedDate
2025-07-28
VersionNumber
19
Artifactory Health Check

The Health check is a rapid and standardized way to validate the status of an API service. It is an API Monitoring method that checks API and alerts when it notices something is amiss. The API health check endpoint must check anything that interrupts the API from serving incoming requests.

Artifactory provides several REST API's to perform health Check. That can be configured in a Load Balancer or any other similar services to automate the health check. The three REST endpoints provided by Artifactory are as follows 
  1. Readiness Probe
  2. Liveness Probe
Readiness Probe

The Readiness probe signals readiness to process the incoming API requests.While it responds successfully, it means that API service is “ready” to receive requests.

The readiness probe replaces the system/ping and gets a simple status response about the state of the Artifactory API services using the new Kubernetes style readiness probe. However system/ping will remain as the legacy artifactory system is still dependent on it .The probe is used to measure the system latency, also it provides customers with a significant metric to monitor and alert according to their own requirements standard.

For example :

To get a readiness probe response about the state of Artifactory use the following command.

curl -XGET http://localhost:8081/artifactory/api/v1/system/readiness -H 'Content-Type: text/plain'
{"code" : "OK"}

User-added image 


Liveness Probe

The Liveness probe says that the component has “liveness”.It means that the component will eventually be able to produce a result.

User-added image 

For example :
To get a liveness probe response about the state of Artifactory use the following command.

curl -XGET http://localhost:8081/artifactory/api/v1/system/liveness -H 'Content-Type: text/plain'
{"code" : "OK"}


Sample Response for Health Check on Artifactory:

For example :

To get an API health response for the different API services that artifactory uses type in the below command. It produces a response by content type in application/json format.

curl -XGET http://localhost:8046/router/api/v1/topology/health -H 'Content-Type: application/json'

User-added image 

As we can see in the above output snippet the , The state property of the json response shows the state of the API services which the artifactory uses . Here the state shows HEALTHY, which means the respective API service is up and running.

Service ID’s returned in the above health check response are  identifiers for JFrog systems. Each microservice has their own Service ID. Access Federation and other E+ systems rely on these IDs to replicate things. Since Artifactory 7.X, different microservices have their own serviceID. 

Artifactory Service ID example: 
jfrt@01d8m3sm6q0rj21rqj47331ayc
Access Service ID example:
jfac@01cbdrkbfvv5t20g5ke9rk0339


A sample use case for unsuccessful scenario:

All of the artifactory services like Access, JFConnect, Event, Frontend, Integration, Metadata
Observability depends on an artifactory license. If the license is not configured all the services will be impacted and the services cannot process incoming requests.

In order to achieve the use case I removed the artifactory.cluster.license file in both HA instances.

Readiness Probe Response:

User-added image 

Liveness Probe Response:

User-added image 

UI Response:

User-added image 

Terminal Response :

As we can see in the below output snippet, The state property of the json response shows the state of the API services that the artifactory uses. Here the state shows UNHEALTHY, which means the respective API service is not up and running, it could be due to different issues. In our use case, since all the API services depend on the artifactory license, the services were down as we removed the license.

User-added image 
User-added image 


The Artifactory health check commands will be accessible externally using DNS. Instead of using localhost, we will utilize the DNS to retrieve the response.

For example:
curl -XGET http://<ARTIFACTORY-DNS>/artifactory/api/v1/system/readiness -H 'Content-Type: text/plain'
OK

For information on Xray health check please refer to this article