Dear community
I need to set a cron job service that would send heartbeats to opsgenie to ensure that every node is healthy.
We have a Jira Data Center setup with multiple node.
Based on my analysis of scheduling groovy scripts via the scriptrunner jobs I see that the scriprunner service runs only one node per schedule. Is it possible to configure it e.q for all nodes or pin it to a specific one.
reading through the developer documentation of Atlassian I've found a way doing it with an custom plugin (https://developer.atlassian.com/server/jira/platform/developing-for-high-availability-and-clustering),but the effort would be far too great for this use case.
I would like to ask if you have scriptrunner script that can check the nodes status. Can you share with me.
Thanks
Hi @Rodolfo So
The following code snippet can give you node status and other details as well.
import com.atlassian.jira.cluster.ClusterManager
import com.atlassian.jira.component.ComponentAccessor
def componentAccessor = ComponentAccessor.newInstance()
def clusterManager = componentAccessor.getOSGiComponentInstanceOfType(ClusterManager.class)
Set clusterInfo = clusterManager.getAllNodes()
clusterInfo.each { it ->
log. info it.getState().getI18nKey()
}
You can run this script as a job and send output to a file or send this information using email as well.
Thanks
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Looks better to check from outside healthy of nodes. Instead from platform
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!
Help us plant more trees
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.