Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable / re-enable a health check via REST API or ScriptRunner?

David Merrill
Contributor
March 15, 2023

We're running Jira Data Center 8.20 in a two-node cluster configuration.

 

When we do a full re-index, the re-indexing node goes into maintenance status, causing in the index replication and cache replication to stop temporarily.  This is expected, but it causes Jira to start throwing health check errors, which are annoying ( ATST-1106 ).

I'm looking for a way to disable the affected health checks using REST calls (or even a scriptrunner script) before starting the re-index, then use a similar method to re-enable them after the re-index is done.  Then I can launch the re-index using an external script and it won't bug me (and our other jira admins) with spurious alerts. 

The REST API docs show /rest/troubleshooting/1.0/setEnabled as an available POST request but I don't see documentation on what the request body should look like (and my experiments using guesses based on the output from /rest/troubleshooting/1.0/list did not bear fruit).

Anyone have a way of doing this?

1 answer

0 votes
David Merrill
Contributor
July 24, 2025

I'm experimenting with the following rest calls but I'm not 100% sure about them:

curl -X POST -n -H  "Content-Type: application/json" -d '{"healthCheckKey": "com.atlassian.troubleshooting.plugin-jira:clusterReplicationHealthCheck", "enabled": false}' https://$JIRA_SERVER/rest/troubleshooting/1.0/setEnabledcurl -X POST -n -H  "Content-Type: application/json" -d '{"healthCheckKey": "com.atlassian.troubleshooting.plugin-jira:clusterIndexReplicationHealthCheck", "enabled": false}' https://$JIRA_SERVER/rest/troubleshooting/1.0/setEnabled

 

Suggest an answer

Log in or Sign up to answer